File tree 4 files changed +12
-12
lines changed
physical-plan/src/aggregates 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -2436,25 +2436,21 @@ mod tests {
2436
2436
"labels" . to_string( ) ,
2437
2437
DataType :: Struct (
2438
2438
vec![
2439
- Field :: new_dict (
2439
+ Field :: new (
2440
2440
"a" . to_string( ) ,
2441
2441
DataType :: Dictionary (
2442
2442
Box :: new( DataType :: Int32 ) ,
2443
2443
Box :: new( DataType :: Utf8 ) ,
2444
2444
) ,
2445
2445
true ,
2446
- 0 ,
2447
- false ,
2448
2446
) ,
2449
- Field :: new_dict (
2447
+ Field :: new (
2450
2448
"b" . to_string( ) ,
2451
2449
DataType :: Dictionary (
2452
2450
Box :: new( DataType :: Int32 ) ,
2453
2451
Box :: new( DataType :: Utf8 ) ,
2454
2452
) ,
2455
2453
true ,
2456
- 0 ,
2457
- false ,
2458
2454
) ,
2459
2455
]
2460
2456
. into( ) ,
@@ -2466,15 +2462,13 @@ mod tests {
2466
2462
vec ! [
2467
2463
Arc :: new( StructArray :: from( vec![
2468
2464
(
2469
- Arc :: new( Field :: new_dict (
2465
+ Arc :: new( Field :: new (
2470
2466
"a" . to_string( ) ,
2471
2467
DataType :: Dictionary (
2472
2468
Box :: new( DataType :: Int32 ) ,
2473
2469
Box :: new( DataType :: Utf8 ) ,
2474
2470
) ,
2475
2471
true ,
2476
- 0 ,
2477
- false ,
2478
2472
) ) ,
2479
2473
Arc :: new(
2480
2474
vec![ Some ( "a" ) , None , Some ( "a" ) ]
@@ -2483,15 +2477,13 @@ mod tests {
2483
2477
) as ArrayRef ,
2484
2478
) ,
2485
2479
(
2486
- Arc :: new( Field :: new_dict (
2480
+ Arc :: new( Field :: new (
2487
2481
"b" . to_string( ) ,
2488
2482
DataType :: Dictionary (
2489
2483
Box :: new( DataType :: Int32 ) ,
2490
2484
Box :: new( DataType :: Utf8 ) ,
2491
2485
) ,
2492
2486
true ,
2493
- 0 ,
2494
- false ,
2495
2487
) ) ,
2496
2488
Arc :: new(
2497
2489
vec![ Some ( "b" ) , Some ( "c" ) , Some ( "b" ) ]
Original file line number Diff line number Diff line change @@ -321,6 +321,8 @@ impl TryFrom<&protobuf::Field> for Field {
321
321
fn try_from ( field : & protobuf:: Field ) -> Result < Self , Self :: Error > {
322
322
let datatype = field. arrow_type . as_deref ( ) . required ( "arrow_type" ) ?;
323
323
let field = if field. dict_id != 0 {
324
+ // TODO file a ticket about handling deprecated dict_id attributes
325
+ #[ allow( deprecated) ]
324
326
Self :: new_dict (
325
327
field. name . as_str ( ) ,
326
328
datatype,
@@ -365,6 +367,8 @@ impl TryFrom<&protobuf::ScalarValue> for ScalarValue {
365
367
. as_ref ( )
366
368
. ok_or_else ( || Error :: required ( "value" ) ) ?;
367
369
370
+ // TODO file a ticket about handling deprecated dict_id attributes
371
+ #[ allow( deprecated) ]
368
372
Ok ( match value {
369
373
Value :: BoolValue ( v) => Self :: Boolean ( Some ( * v) ) ,
370
374
Value :: Utf8Value ( v) => Self :: Utf8 ( Some ( v. to_owned ( ) ) ) ,
Original file line number Diff line number Diff line change @@ -97,6 +97,8 @@ impl TryFrom<&Field> for protobuf::Field {
97
97
nullable : field. is_nullable ( ) ,
98
98
children : Vec :: new ( ) ,
99
99
metadata : field. metadata ( ) . clone ( ) ,
100
+ // TODO file a ticket about handling deprecated dict_id attributes
101
+ #[ allow( deprecated) ]
100
102
dict_id : field. dict_id ( ) . unwrap_or ( 0 ) ,
101
103
dict_ordered : field. dict_is_ordered ( ) . unwrap_or ( false ) ,
102
104
} )
Original file line number Diff line number Diff line change @@ -1777,6 +1777,8 @@ fn round_trip_datatype() {
1777
1777
}
1778
1778
}
1779
1779
1780
+ // TODO file a ticket about handling deprecated dict_id attributes
1781
+ #[ allow( deprecated) ]
1780
1782
#[ test]
1781
1783
fn roundtrip_dict_id ( ) -> Result < ( ) > {
1782
1784
let dict_id = 42 ;
You can’t perform that action at this time.
0 commit comments