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 1
1
[package ]
2
2
name = " datafusion-functions-json"
3
- version = " 0.48 .0"
3
+ version = " 0.49 .0"
4
4
edition = " 2021"
5
5
description = " JSON functions for DataFusion"
6
6
readme = " README.md"
@@ -11,16 +11,16 @@ repository = "https://github.com/datafusion-contrib/datafusion-functions-json/"
11
11
rust-version = " 1.85.1"
12
12
13
13
[dependencies ]
14
- datafusion = { version = " 48 " , default-features = false }
14
+ datafusion = { version = " 49 " , default-features = false }
15
15
jiter = " 0.10"
16
- paste = " 1"
17
16
log = " 0.4"
17
+ paste = " 1"
18
18
19
19
[dev-dependencies ]
20
- datafusion = { version = " 48" , default-features = false , features = [
20
+ codspeed-criterion-compat = " 2.6"
21
+ datafusion = { version = " 49" , default-features = false , features = [
21
22
" nested_expressions" ,
22
23
] }
23
- codspeed-criterion-compat = " 2.6"
24
24
tokio = { version = " 1.43" , features = [" full" ] }
25
25
26
26
[lints .clippy ]
Original file line number Diff line number Diff line change @@ -113,14 +113,15 @@ impl<'s> JsonPathArgs<'s> {
113
113
. iter ( )
114
114
. enumerate ( )
115
115
. 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 ) ) ,
119
119
ColumnarValue :: Scalar ( ScalarValue :: UInt64 ( Some ( i) ) ) => Ok ( ( * i) . into ( ) ) ,
120
120
ColumnarValue :: Scalar ( ScalarValue :: Int64 ( Some ( i) ) ) => Ok ( ( * i) . into ( ) ) ,
121
121
ColumnarValue :: Scalar (
122
122
ScalarValue :: Null
123
123
| ScalarValue :: Utf8 ( None )
124
+ | ScalarValue :: Utf8View ( None )
124
125
| ScalarValue :: LargeUtf8 ( None )
125
126
| ScalarValue :: UInt64 ( None )
126
127
| 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>(
40
40
if let Some ( ( type_id, value) ) = type_id_value {
41
41
// we only want to take the ScalarValue string if the type_id indicates the value represents nested JSON
42
42
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 ( ) {
44
44
return s. as_deref ( ) ;
45
45
}
46
46
}
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ fn optimise_json_get_cast(cast: &Cast) -> Option<Transformed<Expr>> {
44
44
crate :: json_get_float:: json_get_float_udf ( )
45
45
}
46
46
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 ( ) ,
48
48
_ => return None ,
49
49
} ;
50
50
Some ( Transformed :: yes ( Expr :: ScalarFunction ( ScalarFunction {
You can’t perform that action at this time.
0 commit comments