File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ license = "Apache-2.0"
88keywords = [" datafusion" , " JSON" , " SQL" ]
99categories = [" database-implementations" , " parsing" ]
1010repository = " https://github.com/datafusion-contrib/datafusion-functions-json/"
11- rust-version = " 1.82.0 "
11+ rust-version = " 1.85.1 "
1212
1313[dependencies ]
1414datafusion = { version = " 49" , default-features = false }
Original file line number Diff line number Diff line change @@ -113,14 +113,15 @@ impl<'s> JsonPathArgs<'s> {
113113 . iter ( )
114114 . enumerate ( )
115115 . map ( |( pos, arg) | match arg {
116- ColumnarValue :: Scalar ( ScalarValue :: Utf8 ( Some ( s ) ) | ScalarValue :: LargeUtf8 ( Some ( s ) ) ) => {
117- Ok ( JsonPath :: Key ( s) )
118- }
116+ ColumnarValue :: Scalar (
117+ ScalarValue :: Utf8 ( Some ( s ) ) | ScalarValue :: Utf8View ( Some ( s) ) | ScalarValue :: LargeUtf8 ( Some ( s ) ) ,
118+ ) => Ok ( JsonPath :: Key ( s ) ) ,
119119 ColumnarValue :: Scalar ( ScalarValue :: UInt64 ( Some ( i) ) ) => Ok ( ( * i) . into ( ) ) ,
120120 ColumnarValue :: Scalar ( ScalarValue :: Int64 ( Some ( i) ) ) => Ok ( ( * i) . into ( ) ) ,
121121 ColumnarValue :: Scalar (
122122 ScalarValue :: Null
123123 | ScalarValue :: Utf8 ( None )
124+ | ScalarValue :: Utf8View ( None )
124125 | ScalarValue :: LargeUtf8 ( None )
125126 | ScalarValue :: UInt64 ( None )
126127 | ScalarValue :: Int64 ( None ) ,
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ pub(crate) fn json_from_union_scalar<'a>(
4040 if let Some ( ( type_id, value) ) = type_id_value {
4141 // we only want to take the ScalarValue string if the type_id indicates the value represents nested JSON
4242 if fields == & union_fields ( ) && ( * type_id == TYPE_ID_ARRAY || * type_id == TYPE_ID_OBJECT ) {
43- if let ScalarValue :: Utf8 ( s) = value. as_ref ( ) {
43+ if let ScalarValue :: Utf8 ( s) | ScalarValue :: Utf8View ( s ) | ScalarValue :: LargeUtf8 ( s ) = value. as_ref ( ) {
4444 return s. as_deref ( ) ;
4545 }
4646 }
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ fn optimise_json_get_cast(cast: &Cast) -> Option<Transformed<Expr>> {
4444 crate :: json_get_float:: json_get_float_udf ( )
4545 }
4646 DataType :: Int64 | DataType :: Int32 => crate :: json_get_int:: json_get_int_udf ( ) ,
47- DataType :: Utf8 => crate :: json_get_str:: json_get_str_udf ( ) ,
47+ DataType :: Utf8 | DataType :: Utf8View | DataType :: LargeUtf8 => crate :: json_get_str:: json_get_str_udf ( ) ,
4848 _ => return None ,
4949 } ;
5050 Some ( Transformed :: yes ( Expr :: ScalarFunction ( ScalarFunction {
You can’t perform that action at this time.
0 commit comments