Skip to content

Commit 5dedf29

Browse files
committed
Prepare for datafusion v50
These derives will be needed for udfs going forward.
1 parent 52fae14 commit 5dedf29

14 files changed

+14
-13
lines changed

src/common_macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ macro_rules! make_udf_function {
3030
static [< STATIC_ $expr_fn_name:upper >]: std::sync::OnceLock<std::sync::Arc<datafusion::logical_expr::ScalarUDF>> =
3131
std::sync::OnceLock::new();
3232

33-
/// ScalarFunction that returns a [`ScalarUDF`] for [`$udf_impl`]
33+
/// `ScalarFunction` that returns a [`ScalarUDF`] for [`$udf_impl`]
3434
///
3535
/// [`ScalarUDF`]: datafusion::logical_expr::ScalarUDF
3636
pub fn [< $expr_fn_name _udf >]() -> std::sync::Arc<datafusion::logical_expr::ScalarUDF> {

src/common_union.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ impl JsonUnionEncoder {
257257
///
258258
/// Panics if the idx is outside the union values or an invalid type id exists in the union.
259259
#[must_use]
260-
pub fn get_value(&self, idx: usize) -> JsonUnionValue {
260+
pub fn get_value(&self, idx: usize) -> JsonUnionValue<'_> {
261261
let type_id = self.type_ids[idx];
262262
match type_id {
263263
TYPE_ID_NULL => JsonUnionValue::JsonNull,

src/json_as_text.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ make_udf_function!(
1717
r#"Get any value from a JSON string by its "path", represented as a string"#
1818
);
1919

20-
#[derive(Debug)]
20+
#[derive(Debug, PartialEq, Eq, Hash)]
2121
pub(super) struct JsonAsText {
2222
signature: Signature,
2323
aliases: [String; 1],

src/json_contains.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ make_udf_function!(
1717
r#"Does the key/index exist within the JSON value as the specified "path"?"#
1818
);
1919

20-
#[derive(Debug)]
20+
#[derive(Debug, PartialEq, Eq, Hash)]
2121
pub(super) struct JsonContains {
2222
signature: Signature,
2323
aliases: [String; 1],

src/json_get.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ make_udf_function!(
2323

2424
// build_typed_get!(JsonGet, "json_get", Union, Float64Array, jiter_json_get_float);
2525

26-
#[derive(Debug)]
26+
#[derive(Debug, PartialEq, Eq, Hash)]
2727
pub(super) struct JsonGet {
2828
signature: Signature,
2929
aliases: [String; 1],

src/json_get_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ make_udf_function!(
1717
r#"Get an arrow array from a JSON string by its "path""#
1818
);
1919

20-
#[derive(Debug)]
20+
#[derive(Debug, PartialEq, Eq, Hash)]
2121
pub(super) struct JsonGetArray {
2222
signature: Signature,
2323
aliases: [String; 1],

src/json_get_bool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ make_udf_function!(
1616
r#"Get an boolean value from a JSON string by its "path""#
1717
);
1818

19-
#[derive(Debug)]
19+
#[derive(Debug, PartialEq, Eq, Hash)]
2020
pub(super) struct JsonGetBool {
2121
signature: Signature,
2222
aliases: [String; 1],

src/json_get_float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ make_udf_function!(
1717
r#"Get a float value from a JSON string by its "path""#
1818
);
1919

20-
#[derive(Debug)]
20+
#[derive(Debug, PartialEq, Eq, Hash)]
2121
pub(super) struct JsonGetFloat {
2222
signature: Signature,
2323
aliases: [String; 1],

src/json_get_int.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ make_udf_function!(
1717
r#"Get an integer value from a JSON string by its "path""#
1818
);
1919

20-
#[derive(Debug)]
20+
#[derive(Debug, PartialEq, Eq, Hash)]
2121
pub(super) struct JsonGetInt {
2222
signature: Signature,
2323
aliases: [String; 1],

src/json_get_json.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ make_udf_function!(
1515
r#"Get a nested raw JSON string from a JSON string by its "path""#
1616
);
1717

18-
#[derive(Debug)]
18+
#[derive(Debug, PartialEq, Eq, Hash)]
1919
pub(super) struct JsonGetJson {
2020
signature: Signature,
2121
aliases: [String; 1],

0 commit comments

Comments
 (0)