@@ -78,18 +78,19 @@ impl GetFieldAccessSchema {
78
78
Self :: ListIndex { key_dt } => {
79
79
match ( data_type, key_dt) {
80
80
( DataType :: List ( lt) , DataType :: Int64 ) => Ok ( Field :: new ( "list" , lt. data_type ( ) . clone ( ) , true ) ) ,
81
- ( DataType :: List ( _) , _) => plan_err ! (
82
- "Only ints are valid as an indexed field in a list"
81
+ ( DataType :: LargeList ( lt) , DataType :: Int64 ) => Ok ( Field :: new ( "large_list" , lt. data_type ( ) . clone ( ) , true ) ) ,
82
+ ( DataType :: List ( _) , _) | ( DataType :: LargeList ( _) , _) => plan_err ! (
83
+ "Only ints are valid as an indexed field in a List/LargeList"
83
84
) ,
84
- ( other, _) => plan_err ! ( "The expression to get an indexed field is only valid for `List` or `Struct` types, got {other}" ) ,
85
+ ( other, _) => plan_err ! ( "The expression to get an indexed field is only valid for `List`, `LargeList` or `Struct` types, got {other}" ) ,
85
86
}
86
87
}
87
88
Self :: ListRange { start_dt, stop_dt, stride_dt } => {
88
89
match ( data_type, start_dt, stop_dt, stride_dt) {
89
90
( DataType :: List ( _) , DataType :: Int64 , DataType :: Int64 , DataType :: Int64 ) => Ok ( Field :: new ( "list" , data_type. clone ( ) , true ) ) ,
90
91
( DataType :: LargeList ( _) , DataType :: Int64 , DataType :: Int64 , DataType :: Int64 ) => Ok ( Field :: new ( "large_list" , data_type. clone ( ) , true ) ) ,
91
92
( DataType :: List ( _) , _, _, _) | ( DataType :: LargeList ( _) , _, _, _) => plan_err ! (
92
- "Only ints are valid as an indexed field in a list "
93
+ "Only ints are valid as an indexed field in a List/LargeList "
93
94
) ,
94
95
( other, _, _, _) => plan_err ! ( "The expression to get an indexed field is only valid for `List`, `LargeList` or `Struct` types, got {other}" ) ,
95
96
}
0 commit comments