File tree Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " datafusion-functions-json"
3- version = " 0.48 .0"
3+ version = " 0.49 .0"
44edition = " 2021"
55description = " JSON functions for DataFusion"
66readme = " README.md"
@@ -11,16 +11,16 @@ repository = "https://github.com/datafusion-contrib/datafusion-functions-json/"
1111rust-version = " 1.85.1"
1212
1313[dependencies ]
14- datafusion = { version = " 48 " , default-features = false }
14+ datafusion = { version = " 49 " , default-features = false }
1515jiter = " 0.10"
16- paste = " 1"
1716log = " 0.4"
17+ paste = " 1"
1818
1919[dev-dependencies ]
20- datafusion = { version = " 48" , default-features = false , features = [
20+ codspeed-criterion-compat = " 2.6"
21+ datafusion = { version = " 49" , default-features = false , features = [
2122 " nested_expressions" ,
2223] }
23- codspeed-criterion-compat = " 2.6"
2424tokio = { version = " 1.43" , features = [" full" ] }
2525
2626[lints .clippy ]
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