From fee90be613446d2c61c3bd129a201c7faecef521 Mon Sep 17 00:00:00 2001 From: Adam Gutglick Date: Tue, 31 Mar 2026 19:34:44 +0100 Subject: [PATCH 1/3] Misc minor optimizations to query optimizer performance (#21128) ## Which issue does this PR close? - Closes #. ## Rationale for this change Inspired by @blaginin, trying to find more places that might drag the optimizer's performance. On my laptop , this improves many of the sql planner's benchmarks by a fairly consistent 2-5%. ## What changes are included in this PR? A slew of minor optimization in the logical planner, trying to avoid wasted work or repeated allocations ## Are these changes tested? Existing tests. ## Are there any user-facing changes? None --------- Signed-off-by: Adam Gutglick Co-authored-by: Andrew Lamb --- .../optimizer/src/analyzer/type_coercion.rs | 6 +- .../optimizer/src/common_subexpr_eliminate.rs | 6 +- .../optimizer/src/extract_leaf_expressions.rs | 46 ++++++-------- datafusion/optimizer/src/optimize_unions.rs | 4 +- datafusion/optimizer/src/push_down_filter.rs | 63 ++++++++++--------- datafusion/optimizer/src/push_down_limit.rs | 2 +- .../simplify_expressions/expr_simplifier.rs | 53 ++++++++-------- datafusion/optimizer/src/utils.rs | 46 +++++++++++++- 8 files changed, 127 insertions(+), 99 deletions(-) diff --git a/datafusion/optimizer/src/analyzer/type_coercion.rs b/datafusion/optimizer/src/analyzer/type_coercion.rs index 6f6898e219b7d..bf91595e956c3 100644 --- a/datafusion/optimizer/src/analyzer/type_coercion.rs +++ b/datafusion/optimizer/src/analyzer/type_coercion.rs @@ -20,7 +20,7 @@ use arrow::compute::can_cast_types; use datafusion_expr::binary::BinaryTypeCoercer; use itertools::{Itertools as _, izip}; -use std::sync::Arc; +use std::sync::{Arc, LazyLock}; use crate::analyzer::AnalyzerRule; use crate::utils::NamePreserver; @@ -91,11 +91,11 @@ impl AnalyzerRule for TypeCoercion { } fn analyze(&self, plan: LogicalPlan, config: &ConfigOptions) -> Result { - let empty_schema = DFSchema::empty(); + static EMPTY_SCHEMA: LazyLock = LazyLock::new(DFSchema::empty); // recurse let transformed_plan = plan - .transform_up_with_subqueries(|plan| analyze_internal(&empty_schema, plan))? + .transform_up_with_subqueries(|plan| analyze_internal(&EMPTY_SCHEMA, plan))? .data; // finish diff --git a/datafusion/optimizer/src/common_subexpr_eliminate.rs b/datafusion/optimizer/src/common_subexpr_eliminate.rs index 88dba57d75b1d..4213c23ccc897 100644 --- a/datafusion/optimizer/src/common_subexpr_eliminate.rs +++ b/datafusion/optimizer/src/common_subexpr_eliminate.rs @@ -325,11 +325,7 @@ impl CommonSubexprEliminate { .map(|expr| Some(name_preserver.save(expr))) .collect::>() } else { - new_aggr_expr - .clone() - .into_iter() - .map(|_| None) - .collect::>() + (0..new_aggr_expr.len()).map(|_| None).collect() }; let mut agg_exprs = common_exprs diff --git a/datafusion/optimizer/src/extract_leaf_expressions.rs b/datafusion/optimizer/src/extract_leaf_expressions.rs index a57f71ea678f0..d3a84c0172e7b 100644 --- a/datafusion/optimizer/src/extract_leaf_expressions.rs +++ b/datafusion/optimizer/src/extract_leaf_expressions.rs @@ -32,7 +32,7 @@ use datafusion_expr::{Expr, ExpressionPlacement, Projection}; use crate::optimizer::ApplyOrder; use crate::push_down_filter::replace_cols_by_name; -use crate::utils::has_all_column_refs; +use crate::utils::{ColumnReference, has_all_column_refs, schema_columns}; use crate::{OptimizerConfig, OptimizerRule}; /// Prefix for aliases generated by the extraction optimizer passes. @@ -213,10 +213,11 @@ fn extract_from_plan( .collect(); // Build per-input column sets for routing expressions to the correct input - let input_column_sets: Vec> = input_schemas - .iter() - .map(|schema| schema_columns(schema.as_ref())) - .collect(); + let input_column_sets: Vec> = + input_schemas + .iter() + .map(|schema| schema_columns(schema.as_ref())) + .collect(); // Transform expressions via map_expressions with routing let transformed = plan.map_expressions(|expr| { @@ -272,7 +273,7 @@ fn extract_from_plan( /// in both sides of a join). fn find_owning_input( expr: &Expr, - input_column_sets: &[std::collections::HashSet], + input_column_sets: &[std::collections::HashSet], ) -> Option { let mut found = None; for (idx, cols) in input_column_sets.iter().enumerate() { @@ -292,7 +293,7 @@ fn find_owning_input( fn routing_extract( expr: Expr, extractors: &mut [LeafExpressionExtractor], - input_column_sets: &[std::collections::HashSet], + input_column_sets: &[std::collections::HashSet], ) -> Result> { expr.transform_down(|e| { // Skip expressions already aliased with extracted expression pattern @@ -340,19 +341,6 @@ fn routing_extract( }) } -/// Returns all columns in the schema (both qualified and unqualified forms) -fn schema_columns(schema: &DFSchema) -> std::collections::HashSet { - schema - .iter() - .flat_map(|(qualifier, field)| { - [ - Column::new(qualifier.cloned(), field.name()), - Column::new_unqualified(field.name()), - ] - }) - .collect() -} - /// Rewrites extraction pairs and column references from one qualifier /// space to another. /// @@ -1072,7 +1060,7 @@ fn route_to_inputs( pairs: &[(Expr, String)], columns: &IndexSet, node: &LogicalPlan, - input_column_sets: &[std::collections::HashSet], + input_column_sets: &[std::collections::HashSet], input_schemas: &[Arc], ) -> Result>> { let num_inputs = input_schemas.len(); @@ -1173,7 +1161,7 @@ fn try_push_into_inputs( // Build per-input schemas and column sets for routing let input_schemas: Vec> = inputs.iter().map(|i| Arc::clone(i.schema())).collect(); - let input_column_sets: Vec> = + let input_column_sets: Vec> = input_schemas.iter().map(|s| schema_columns(s)).collect(); // Route pairs and columns to the appropriate inputs @@ -2436,16 +2424,18 @@ mod tests { // Simulate schema_columns output for two sides of a join where both // have a "user" column — each set contains the qualified and // unqualified form. - let left_cols: HashSet = [ - Column::new(Some("test"), "user"), - Column::new_unqualified("user"), + let relation = "test".into(); + let left_cols: HashSet = [ + ColumnReference::new(Some(&relation), "user"), + ColumnReference::new_unqualified("user"), ] .into_iter() .collect(); - let right_cols: HashSet = [ - Column::new(Some("right"), "user"), - Column::new_unqualified("user"), + let relation = "right".into(); + let right_cols: HashSet = [ + ColumnReference::new(Some(&relation), "user"), + ColumnReference::new_unqualified("user"), ] .into_iter() .collect(); diff --git a/datafusion/optimizer/src/optimize_unions.rs b/datafusion/optimizer/src/optimize_unions.rs index 900757b9a0607..80f8ebeef1697 100644 --- a/datafusion/optimizer/src/optimize_unions.rs +++ b/datafusion/optimizer/src/optimize_unions.rs @@ -64,11 +64,11 @@ impl OptimizerRule for OptimizeUnions { let inputs = inputs .into_iter() .flat_map(extract_plans_from_union) - .map(|plan| coerce_plan_expr_for_schema(plan, &schema)) + .map(|plan| Ok(Arc::new(coerce_plan_expr_for_schema(plan, &schema)?))) .collect::>>()?; Ok(Transformed::yes(LogicalPlan::Union(Union { - inputs: inputs.into_iter().map(Arc::new).collect_vec(), + inputs, schema, }))) } diff --git a/datafusion/optimizer/src/push_down_filter.rs b/datafusion/optimizer/src/push_down_filter.rs index 36deb0f67d77e..a1a636cfef9af 100644 --- a/datafusion/optimizer/src/push_down_filter.rs +++ b/datafusion/optimizer/src/push_down_filter.rs @@ -45,7 +45,9 @@ use datafusion_expr::{ use crate::optimizer::ApplyOrder; use crate::simplify_expressions::simplify_predicates; -use crate::utils::{has_all_column_refs, is_restrict_null_predicate}; +use crate::utils::{ + ColumnReference, has_all_column_refs, is_restrict_null_predicate, schema_columns, +}; use crate::{OptimizerConfig, OptimizerRule}; use datafusion_expr::ExpressionPlacement; @@ -190,11 +192,11 @@ struct ColumnChecker<'a> { /// schema of left join input left_schema: &'a DFSchema, /// columns in left_schema, computed on demand - left_columns: Option>, + left_columns: Option>>, /// schema of right join input right_schema: &'a DFSchema, /// columns in left_schema, computed on demand - right_columns: Option>, + right_columns: Option>>, } impl<'a> ColumnChecker<'a> { @@ -224,20 +226,6 @@ impl<'a> ColumnChecker<'a> { } } -/// Returns all columns in the schema -fn schema_columns(schema: &DFSchema) -> HashSet { - schema - .iter() - .flat_map(|(qualifier, field)| { - [ - Column::new(qualifier.cloned(), field.name()), - // we need to push down filter using unqualified column as well - Column::new_unqualified(field.name()), - ] - }) - .collect::>() -} - /// Determine whether the predicate can evaluate as the join conditions fn can_evaluate_as_join_condition(predicate: &Expr) -> Result { let mut is_evaluate = true; @@ -320,10 +308,8 @@ fn can_evaluate_as_join_condition(predicate: &Expr) -> Result { /// * do nothing. fn extract_or_clauses_for_join<'a>( filters: &'a [Expr], - schema: &'a DFSchema, + schema_cols: &'a HashSet, ) -> impl Iterator + 'a { - let schema_columns = schema_columns(schema); - // new formed OR clauses and their column references filters.iter().filter_map(move |expr| { if let Expr::BinaryExpr(BinaryExpr { @@ -332,8 +318,8 @@ fn extract_or_clauses_for_join<'a>( right, }) = expr { - let left_expr = extract_or_clause(left.as_ref(), &schema_columns); - let right_expr = extract_or_clause(right.as_ref(), &schema_columns); + let left_expr = extract_or_clause(left.as_ref(), schema_cols); + let right_expr = extract_or_clause(right.as_ref(), schema_cols); // If nothing can be extracted from any sub clauses, do nothing for this OR clause. if let (Some(left_expr), Some(right_expr)) = (left_expr, right_expr) { @@ -355,7 +341,10 @@ fn extract_or_clauses_for_join<'a>( /// Otherwise, return None. /// /// For other clause, apply the rule above to extract clause. -fn extract_or_clause(expr: &Expr, schema_columns: &HashSet) -> Option { +fn extract_or_clause( + expr: &Expr, + schema_columns: &HashSet, +) -> Option { let mut predicate = None; match expr { @@ -421,6 +410,10 @@ fn push_down_all_join( // 3) should be kept as filter conditions let left_schema = join.left.schema(); let right_schema = join.right.schema(); + + let left_schema_columns = schema_columns(left_schema.as_ref()); + let right_schema_columns = schema_columns(right_schema.as_ref()); + let mut left_push = vec![]; let mut right_push = vec![]; let mut keep_predicates = vec![]; @@ -467,12 +460,24 @@ fn push_down_all_join( // Extract from OR clause, generate new predicates for both side of join if possible. // We only track the unpushable predicates above. if left_preserved { - left_push.extend(extract_or_clauses_for_join(&keep_predicates, left_schema)); - left_push.extend(extract_or_clauses_for_join(&join_conditions, left_schema)); + left_push.extend(extract_or_clauses_for_join( + &keep_predicates, + &left_schema_columns, + )); + left_push.extend(extract_or_clauses_for_join( + &join_conditions, + &left_schema_columns, + )); } if right_preserved { - right_push.extend(extract_or_clauses_for_join(&keep_predicates, right_schema)); - right_push.extend(extract_or_clauses_for_join(&join_conditions, right_schema)); + right_push.extend(extract_or_clauses_for_join( + &keep_predicates, + &right_schema_columns, + )); + right_push.extend(extract_or_clauses_for_join( + &join_conditions, + &right_schema_columns, + )); } // For predicates from join filter, we should check with if a join side is preserved @@ -480,13 +485,13 @@ fn push_down_all_join( if on_left_preserved { left_push.extend(extract_or_clauses_for_join( &on_filter_join_conditions, - left_schema, + &left_schema_columns, )); } if on_right_preserved { right_push.extend(extract_or_clauses_for_join( &on_filter_join_conditions, - right_schema, + &right_schema_columns, )); } diff --git a/datafusion/optimizer/src/push_down_limit.rs b/datafusion/optimizer/src/push_down_limit.rs index 755e192e340d9..4a26cd5884f6b 100644 --- a/datafusion/optimizer/src/push_down_limit.rs +++ b/datafusion/optimizer/src/push_down_limit.rs @@ -47,12 +47,12 @@ impl OptimizerRule for PushDownLimit { true } + #[expect(clippy::only_used_in_recursion)] fn rewrite( &self, plan: LogicalPlan, config: &dyn OptimizerConfig, ) -> Result> { - let _ = config.options(); let LogicalPlan::Limit(mut limit) = plan else { return Ok(Transformed::no(plan)); }; diff --git a/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs b/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs index 4778f75e3aaca..e4455b8c82fc1 100644 --- a/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs +++ b/datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs @@ -26,6 +26,7 @@ use std::borrow::Cow; use std::collections::HashSet; use std::ops::Not; use std::sync::Arc; +use std::sync::LazyLock; use datafusion_common::config::ConfigOptions; use datafusion_common::nested_struct::has_one_of_more_common_fields; @@ -498,8 +499,6 @@ struct ConstEvaluator { /// The `config_options` are passed from the session to allow scalar functions /// to access configuration like timezone. execution_props: ExecutionProps, - input_schema: DFSchema, - input_batch: RecordBatch, } /// The simplify result of ConstEvaluator @@ -575,6 +574,18 @@ impl TreeNodeRewriter for ConstEvaluator { } } +static DUMMY_SCHEMA: LazyLock> = + LazyLock::new(|| Arc::new(Schema::new(vec![Field::new(".", DataType::Null, true)]))); + +static DUMMY_DF_SCHEMA: LazyLock = + LazyLock::new(|| DFSchema::try_from(Arc::clone(&*DUMMY_SCHEMA)).unwrap()); + +static DUMMY_BATCH: LazyLock = LazyLock::new(|| { + // Need a single "input" row to produce a single output row + let col = new_null_array(&DataType::Null, 1); + RecordBatch::try_new(DUMMY_SCHEMA.clone(), vec![col]).unwrap() +}); + impl ConstEvaluator { /// Create a new `ConstantEvaluator`. /// @@ -588,16 +599,6 @@ impl ConstEvaluator { pub fn try_new(config_options: Option>) -> Result { // The dummy column name is unused and doesn't matter as only // expressions without column references can be evaluated - static DUMMY_COL_NAME: &str = "."; - let schema = Arc::new(Schema::new(vec![Field::new( - DUMMY_COL_NAME, - DataType::Null, - true, - )])); - let input_schema = DFSchema::try_from(Arc::clone(&schema))?; - // Need a single "input" row to produce a single output row - let col = new_null_array(&DataType::Null, 1); - let input_batch = RecordBatch::try_new(schema, vec![col])?; let mut execution_props = ExecutionProps::new(); execution_props.config_options = config_options; @@ -605,8 +606,6 @@ impl ConstEvaluator { Ok(Self { can_evaluate: vec![], execution_props, - input_schema, - input_batch, }) } @@ -702,16 +701,13 @@ impl ConstEvaluator { return ConstSimplifyResult::NotSimplified(s, m); } - let phys_expr = match create_physical_expr( - &expr, - &self.input_schema, - &self.execution_props, - ) { - Ok(e) => e, - Err(err) => return ConstSimplifyResult::SimplifyRuntimeError(err, expr), - }; + let phys_expr = + match create_physical_expr(&expr, &DUMMY_DF_SCHEMA, &self.execution_props) { + Ok(e) => e, + Err(err) => return ConstSimplifyResult::SimplifyRuntimeError(err, expr), + }; let metadata = phys_expr - .return_field(self.input_batch.schema_ref()) + .return_field(DUMMY_BATCH.schema_ref()) .ok() .and_then(|f| { let m = f.metadata(); @@ -720,7 +716,7 @@ impl ConstEvaluator { false => Some(FieldMetadata::from(m)), } }); - let col_val = match phys_expr.evaluate(&self.input_batch) { + let col_val = match phys_expr.evaluate(&DUMMY_BATCH) { Ok(v) => v, Err(err) => return ConstSimplifyResult::SimplifyRuntimeError(err, expr), }; @@ -1698,10 +1694,11 @@ impl TreeNodeRewriter for Simplifier<'_> { { // Repeated occurrences of wildcard are redundant so remove them // exp LIKE '%%' --> exp LIKE '%' - let simplified_pattern = Regex::new("%%+") - .unwrap() - .replace_all(pattern_str, "%") - .to_string(); + + static LIKE_REGEX: LazyLock = + LazyLock::new(|| Regex::new("%%+").unwrap()); + let simplified_pattern = + LIKE_REGEX.replace_all(pattern_str, "%").to_string(); Transformed::yes(Expr::Like(Like { pattern: Box::new( string_scalar.to_expr(&simplified_pattern), diff --git a/datafusion/optimizer/src/utils.rs b/datafusion/optimizer/src/utils.rs index 7e038d2392022..ad151d1ddb8e0 100644 --- a/datafusion/optimizer/src/utils.rs +++ b/datafusion/optimizer/src/utils.rs @@ -22,6 +22,7 @@ use std::collections::{BTreeSet, HashMap, HashSet}; use crate::analyzer::type_coercion::TypeCoercionRewriter; use arrow::array::{Array, RecordBatch, new_null_array}; use arrow::datatypes::{DataType, Field, Schema}; +use datafusion_common::TableReference; use datafusion_common::cast::as_boolean_array; use datafusion_common::tree_node::{TransformedResult, TreeNode}; use datafusion_common::{Column, DFSchema, Result, ScalarValue}; @@ -37,12 +38,17 @@ use std::sync::Arc; pub use datafusion_expr::expr_rewriter::NamePreserver; /// Returns true if `expr` contains all columns in `schema_cols` -pub(crate) fn has_all_column_refs(expr: &Expr, schema_cols: &HashSet) -> bool { +pub(crate) fn has_all_column_refs( + expr: &Expr, + schema_cols: &HashSet, +) -> bool { let column_refs = expr.column_refs(); // note can't use HashSet::intersect because of different types (owned vs References) - schema_cols + column_refs .iter() - .filter(|c| column_refs.contains(c)) + .filter(|c| { + schema_cols.contains(&ColumnReference::new(c.relation.as_ref(), c.name())) + }) .count() == column_refs.len() } @@ -62,6 +68,40 @@ pub(crate) fn replace_qualified_name( replace_col(expr, &replace_map) } +/// Column reference to avoid copying string around +#[derive(PartialEq, Eq, Hash, Debug)] +pub(crate) struct ColumnReference<'a> { + pub relation: Option<&'a TableReference>, + pub name: &'a str, +} + +impl<'a> ColumnReference<'a> { + pub fn new(relation: Option<&'a TableReference>, name: &'a str) -> Self { + Self { relation, name } + } + + pub fn new_unqualified(name: &'a str) -> Self { + Self { + relation: None, + name, + } + } +} + +/// Returns references to all columns in the schema +pub(crate) fn schema_columns<'a>(schema: &'a DFSchema) -> HashSet> { + schema + .iter() + .flat_map(|(qualifier, field)| { + [ + ColumnReference::new(qualifier, field.name()), + // we need to push down filter using unqualified column as well + ColumnReference::new_unqualified(field.name()), + ] + }) + .collect::>() +} + /// Log the plan in debug/tracing mode after some part of the optimizer runs pub fn log_plan(description: &str, plan: &LogicalPlan) { debug!("{description}:\n{}\n", plan.display_indent()); From e75ed5b42cffdb741eeace5762a9d705f22e3b2a Mon Sep 17 00:00:00 2001 From: Vinay Mehta <14790730+vimeh@users.noreply.github.com> Date: Tue, 31 Mar 2026 13:06:58 -0700 Subject: [PATCH 2/3] feat(sql): unparse array_has as ANY for Postgres (#20654) ## Which issue does this PR close? - Closes #20653 . ## Rationale for this change PostgreSQL does not have an `array_has()` function. When the SQL unparser emits `array_has(haystack, needle)` for the Postgres dialect, it produces invalid SQL. The idiomatic equivalent is `needle = ANY(haystack)`. ## What changes are included in this PR? Adds a `scalar_function_to_sql_overrides` entry in `PostgreSqlDialect` that converts `array_has(haystack, needle)` to `needle = ANY(haystack)` via `ast::Expr::AnyOp`. ## Are these changes tested? Yep, with a unit test comparing default vs Postgres dialect output and a roundtrip integration test for `= ANY()` in a WHERE clause. ## Are there any user-facing changes? No breaking changes. `array_has` expressions are now unparsed as valid Postgres syntax when using `PostgreSqlDialect`. --------- Co-authored-by: Andrew Lamb --- datafusion/sql/src/unparser/dialect.rs | 23 ++++++++++++++++++++++- datafusion/sql/src/unparser/expr.rs | 20 +++++++++++++++++++- datafusion/sql/tests/cases/plan_to_sql.rs | 11 +++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/datafusion/sql/src/unparser/dialect.rs b/datafusion/sql/src/unparser/dialect.rs index a3367dd96ce22..fa9d40c6c78a8 100644 --- a/datafusion/sql/src/unparser/dialect.rs +++ b/datafusion/sql/src/unparser/dialect.rs @@ -24,7 +24,7 @@ use super::{ use arrow::array::timezone::Tz; use arrow::datatypes::TimeUnit; use chrono::DateTime; -use datafusion_common::Result; +use datafusion_common::{Result, internal_err}; use datafusion_expr::Expr; use regex::Regex; use sqlparser::tokenizer::Span; @@ -351,6 +351,10 @@ impl Dialect for PostgreSqlDialect { func_name: &str, args: &[Expr], ) -> Result> { + if func_name == "array_has" { + return self.array_has_to_sql_any(unparser, args); + } + if func_name == "round" { return Ok(Some( self.round_to_sql_enforce_numeric(unparser, func_name, args)?, @@ -362,6 +366,23 @@ impl Dialect for PostgreSqlDialect { } impl PostgreSqlDialect { + fn array_has_to_sql_any( + &self, + unparser: &Unparser, + args: &[Expr], + ) -> Result> { + let [haystack, needle] = args else { + return internal_err!("array_has expected 2 arguments, got {}", args.len()); + }; + + Ok(Some(ast::Expr::AnyOp { + left: Box::new(unparser.expr_to_sql(needle)?), + compare_op: BinaryOperator::Eq, + right: Box::new(unparser.expr_to_sql(haystack)?), + is_some: false, + })) + } + fn round_to_sql_enforce_numeric( &self, unparser: &Unparser, diff --git a/datafusion/sql/src/unparser/expr.rs b/datafusion/sql/src/unparser/expr.rs index 686650b1c8c58..a4a231d9857c2 100644 --- a/datafusion/sql/src/unparser/expr.rs +++ b/datafusion/sql/src/unparser/expr.rs @@ -1853,7 +1853,7 @@ mod tests { use datafusion_functions::expr_fn::{get_field, named_struct}; use datafusion_functions_aggregate::count::count_udaf; use datafusion_functions_aggregate::expr_fn::sum; - use datafusion_functions_nested::expr_fn::{array_element, make_array}; + use datafusion_functions_nested::expr_fn::{array_element, array_has, make_array}; use datafusion_functions_nested::map::map; use datafusion_functions_window::rank::rank_udwf; use datafusion_functions_window::row_number::row_number_udwf; @@ -3074,6 +3074,24 @@ mod tests { Ok(()) } + #[test] + fn test_postgres_array_has_to_any() -> Result<()> { + let default_dialect: Arc = Arc::new(DefaultDialect {}); + let postgres_dialect: Arc = Arc::new(PostgreSqlDialect {}); + let expr = array_has(col("items"), lit(1)); + + for (dialect, expected) in [ + (default_dialect, "array_has(\"items\", 1)"), + (postgres_dialect, "1 = ANY(\"items\")"), + ] { + let unparser = Unparser::new(dialect.as_ref()); + let actual = format!("{}", unparser.expr_to_sql(&expr)?); + assert_eq!(actual, expected); + } + + Ok(()) + } + #[test] fn test_window_func_support_window_frame() -> Result<()> { let default_dialect: Arc = diff --git a/datafusion/sql/tests/cases/plan_to_sql.rs b/datafusion/sql/tests/cases/plan_to_sql.rs index aefb404ba4106..0dad48b168976 100644 --- a/datafusion/sql/tests/cases/plan_to_sql.rs +++ b/datafusion/sql/tests/cases/plan_to_sql.rs @@ -361,6 +361,17 @@ fn roundtrip_statement_with_dialect_3() -> Result<(), DataFusionError> { Ok(()) } +#[test] +fn roundtrip_statement_postgres_any_array_expr() -> Result<(), DataFusionError> { + roundtrip_statement_with_dialect_helper!( + sql: "select left from array where 1 = any(left);", + parser_dialect: GenericDialect {}, + unparser_dialect: UnparserPostgreSqlDialect {}, + expected: @r#"SELECT "array"."left" FROM "array" WHERE 1 = ANY("array"."left")"#, + ); + Ok(()) +} + #[test] fn roundtrip_statement_with_dialect_4() -> Result<(), DataFusionError> { roundtrip_statement_with_dialect_helper!( From f3e8291ebd05bccc171797b73e5b3e1f7840eb4e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 16:08:21 -0400 Subject: [PATCH 3/3] chore(deps): bump the all-other-cargo-deps group across 1 directory with 7 updates (#21274) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the all-other-cargo-deps group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [insta](https://github.com/mitsuhiko/insta) | `1.46.3` | `1.47.2` | | [uuid](https://github.com/uuid-rs/uuid) | `1.22.0` | `1.23.0` | | [blake3](https://github.com/BLAKE3-team/BLAKE3) | `1.8.3` | `1.8.4` | | [unicode-segmentation](https://github.com/unicode-rs/unicode-segmentation) | `1.12.0` | `1.13.2` | | [postgres-types](https://github.com/rust-postgres/rust-postgres) | `0.2.12` | `0.2.13` | | [tokio-postgres](https://github.com/rust-postgres/rust-postgres) | `0.7.16` | `0.7.17` | | [wasm-bindgen-test](https://github.com/wasm-bindgen/wasm-bindgen) | `0.3.64` | `0.3.66` | Updates `insta` from 1.46.3 to 1.47.2
Release notes

Sourced from insta's releases.

1.47.2

Release Notes

  • Restore Send + Sync on Settings, Redactions, and Redaction by reverting the Arc to Rc change from 1.47.0, which was semver-breaking. #873 #874
  • Add Send + Sync bounds to Comparator trait for consistency with Arc-based storage. #872
  • Add compile-time assertion to prevent future auto-trait regressions.

Install cargo-insta 1.47.2

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf
https://github.com/mitsuhiko/insta/releases/download/1.47.2/cargo-insta-installer.sh
| sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm
https://github.com/mitsuhiko/insta/releases/download/1.47.2/cargo-insta-installer.ps1
| iex"

Download cargo-insta 1.47.2

File Platform Checksum
cargo-insta-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
cargo-insta-x86_64-apple-darwin.tar.xz Intel macOS checksum
cargo-insta-x86_64-pc-windows-msvc.zip x64 Windows checksum
cargo-insta-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
cargo-insta-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum

1.47.1

Release Notes

  • Revert sorting of sequences in sort_maps. The change in 1.47.0 sorted all Seq values (including Vec), not just non-deterministic collections like HashSet, which was a breaking change. #876

Install cargo-insta 1.47.1

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf
https://github.com/mitsuhiko/insta/releases/download/1.47.1/cargo-insta-installer.sh
| sh

Install prebuilt binaries via powershell script

... (truncated)

Changelog

Sourced from insta's changelog.

1.47.2

  • Restore Send + Sync on Settings, Redactions, and Redaction by reverting the Arc to Rc change from 1.47.0, which was semver-breaking. #873 #874
  • Add Send + Sync bounds to Comparator trait for consistency with Arc-based storage. #872
  • Add compile-time assertion to prevent future auto-trait regressions.

1.47.1

  • Revert sorting of sequences in sort_maps. The change in 1.47.0 sorted all Seq values (including Vec), not just non-deterministic collections like HashSet, which was a breaking change. #876

1.47.0

  • Add Comparator trait for customizing how snapshot values are compared. #872 (@​dstu)
  • Sort sequences in sort_maps to fix non-deterministic HashSet snapshots. #876
  • Improve TOML serialization error message for unsupported types, suggesting assert_json_snapshot! or assert_yaml_snapshot! as alternatives. #880
  • Remove unnecessary Send + Sync bounds from Redaction, allowing non-Send closures in dynamic redactions. #874
  • Don't use Arc in Settings unnecessarily. #873 (@​dstu)
  • Upgrade console to 0.16 and MSRV to 1.66. #885
  • Upgrade toml-edit to 0.25. #882 (@​alexanderkjall)
Commits
  • 0ddf1e8 Release 1.47.2 (#894)
  • 094b1cf Revert Arc→Rc change, restore Send + Sync on Settings (#893)
  • 65a5233 Add regression test for sort_maps not sorting Vecs (#892)
  • fdbfc15 Revert sort_maps sequence sorting, release 1.47.1 (#891)
  • 46b6f2a Release 1.47.0 (#889)
  • aa12933 Upgrade console to 0.16, bump MSRV to 1.66 (#885)
  • 98c084c upgrade toml-edit to 0.25 (#882)
  • 4e889b0 the test_glob test depends on both glob and json (#883)
  • 4d738e5 Bump @​tootallnate/once and @​vscode/test-electron in /vscode-insta (#881)
  • 09f2b8b Improve TOML serialization error message for unsupported types (#880)
  • Additional commits viewable in compare view

Updates `uuid` from 1.22.0 to 1.23.0
Release notes

Sourced from uuid's releases.

v1.23.0

What's Changed

New Contributors

Special thanks

@​meng-xu-cs raised a series of bugs against the timestamp logic in uuid using automated tooling. The issues themselves were reasonably and responsibly presented and the end result is a better uuid library for everyone. Thanks!

Deprecations

This release includes the following deprecations:

  • Context: Renamed to ContextV1
  • Timestamp::from_gregorian: Renamed to Timestamp::from_gregorian_time

Change to Version::Max

Version::Max's u8 representation has changed from 0xff to 0x0f to match the value returned by Uuid::get_version_num.

Change to Uuid::get_version for the max UUID

Uuid::get_version will only return Some(Version::Max) if the UUID is actually the max UUID (all bytes are 0xff). Previously it would return Some if only the version field was 0x0f. This change matches the behaviour of the nil UUID, which only returns Some(Version::Nil) if the UUID is the nil UUID (all bytes are 0x00).

Full Changelog: https://github.com/uuid-rs/uuid/compare/v1.22.0...v1.23.0

Commits
  • 00ab922 Merge pull request #876 from uuid-rs/cargo/v1.23.0
  • 726ba45 prepare for 1.23.0 release
  • 996dade Merge pull request #875 from uuid-rs/fix/context-ordering
  • e140479 simplify a use stmt
  • 8ed9142 reorganize and document more v7 context internals
  • e09a322 use LazyLock to synchronize v1/v6 context initialization
  • 0f260cc Merge pull request #874 from uuid-rs/chore/impl-cleanups
  • 1419e91 clean up and refactor main lib tests
  • ceeaf4b ensure we don't overflow on counters less than 12
  • 63bc8f5 Merge pull request #873 from uuid-rs/fix/error-msg
  • Additional commits viewable in compare view

Updates `blake3` from 1.8.3 to 1.8.4
Release notes

Sourced from blake3's releases.

1.8.4

version 1.8.4

Changes since 1.8.3:

  • Updated the digest dependency from v0.10 to v0.11. THIS IS A POTENTIALLY BREAKING CHANGE for callers using the traits-preview Cargo feature. But this is not considered a breaking change for the blake3 crate itself; see the docs for traits-preview.
  • Performance for WASM SIMD targets is improved by ~20% when the wasm32_simd feature is enabled. Contributed by @​lamb356.
Commits
  • b97a24f version 1.8.4
  • 0ebe469 update to new rustcrypto trait releases
  • d4b005a wasm32_simd: use i8x16_shuffle for rot8 and rot16
  • 6eebbbd fix a struct size mismatch in tests
  • fb1411e c: use SIZE_MAX instead of -1 for size_t sentinels, add <stdint.h>
  • See full diff in compare view

Updates `unicode-segmentation` from 1.12.0 to 1.13.2
Commits

Updates `postgres-types` from 0.2.12 to 0.2.13
Release notes

Sourced from postgres-types's releases.

postgres-types v0.2.13

Added

  • Added support for bit-vec 0.9 via the with-bit-vec-0_9 feature.

Changed

  • Upgraded to Rust edition 2024, minimum Rust version 1.85.
Commits
  • 64674ba Release postgres-types v0.2.13
  • 40b760d Release postgres-derive v0.4.8
  • 6c92298 Release postgres-protocol v0.6.11
  • e088d7d style(clippy): fix clippy::useless_conversion
  • 19897e8 build(deps): upgrade semver compatible Rust dependencies
  • 2584926 build(deps): upgrade RustCrypto dependencies
  • 10a7724 chore: add bit-vec v0.9 support
  • 2853157 fix: cargo fmt --all
  • c8f8993 feat: add rustfmt.toml for opiniated formatting
  • cf637be fix: clippy
  • Additional commits viewable in compare view

Updates `tokio-postgres` from 0.7.16 to 0.7.17
Release notes

Sourced from tokio-postgres's releases.

tokio-postgres v0.7.17

Added

  • Added Client::execute_typed method.
  • Added Client::query_typed_one and Client::query_typed_opt methods.
  • Added GenericClient::execute_typed, GenericClient::query_typed_one, and GenericClient::query_typed_opt methods.
  • Added Transaction::execute_typed, Transaction::query_typed_one, and Transaction::query_typed_opt methods.
  • Added support for bit-vec 0.9 via the with-bit-vec-0_9 feature.

Changed

  • Upgraded rand to 0.10.
  • Upgraded to Rust edition 2024, minimum Rust version 1.85.
Commits
  • 35a85bd Release tokio-postgres v0.7.17
  • 64674ba Release postgres-types v0.2.13
  • 40b760d Release postgres-derive v0.4.8
  • 6c92298 Release postgres-protocol v0.6.11
  • e088d7d style(clippy): fix clippy::useless_conversion
  • 19897e8 build(deps): upgrade semver compatible Rust dependencies
  • 2584926 build(deps): upgrade RustCrypto dependencies
  • 10a7724 chore: add bit-vec v0.9 support
  • 2853157 fix: cargo fmt --all
  • c8f8993 feat: add rustfmt.toml for opiniated formatting
  • Additional commits viewable in compare view

Updates `wasm-bindgen-test` from 0.3.64 to 0.3.66
Commits

Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrew Lamb --- Cargo.lock | 119 ++++++++++++++++------------- Cargo.toml | 4 +- datafusion/functions/Cargo.toml | 2 +- datafusion/sqllogictest/Cargo.toml | 4 +- datafusion/wasmtest/Cargo.toml | 2 +- 5 files changed, 73 insertions(+), 58 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8d87c5bc5b541..ca723a061c1a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1045,16 +1045,16 @@ dependencies = [ [[package]] name = "blake3" -version = "1.8.3" +version = "1.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2468ef7d57b3fb7e16b576e8377cdbde2320c60e1491e961d11da40fc4f02a2d" +checksum = "4d2d5991425dfd0785aed03aedcf0b321d61975c9b5b3689c774a2610ae0b51e" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if", "constant_time_eq", - "cpufeatures 0.2.17", + "cpufeatures 0.3.0", ] [[package]] @@ -1247,6 +1247,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "chacha20" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.0", +] + [[package]] name = "chrono" version = "0.4.44" @@ -1393,18 +1404,6 @@ version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75984efb6ed102a0d42db99afb6c1948f0380d1d91808d5529916e6c08b49d8d" -[[package]] -name = "console" -version = "0.15.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" -dependencies = [ - "encode_unicode", - "libc", - "once_cell", - "windows-sys 0.59.0", -] - [[package]] name = "console" version = "0.16.3" @@ -3241,6 +3240,7 @@ dependencies = [ "cfg-if", "libc", "r-efi 6.0.0", + "rand_core 0.10.0", "wasip2", "wasip3", ] @@ -3714,7 +3714,7 @@ version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb" dependencies = [ - "console 0.16.3", + "console", "portable-atomic", "unicode-width 0.2.2", "unit-prefix", @@ -3723,11 +3723,11 @@ dependencies = [ [[package]] name = "insta" -version = "1.46.3" +version = "1.47.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82db8c87c7f1ccecb34ce0c24399b8a73081427f3c7c50a5d597925356115e4" +checksum = "7b4a6248eb93a4401ed2f37dfe8ea592d3cf05b7cf4f8efa867b6895af7e094e" dependencies = [ - "console 0.15.11", + "console", "globset", "once_cell", "regex", @@ -3836,10 +3836,12 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.91" +version = "0.3.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" +checksum = "797146bb2677299a1eb6b7b50a890f4c361b29ef967addf5b2fa45dae1bb6d7d" dependencies = [ + "cfg-if", + "futures-util", "once_cell", "wasm-bindgen", ] @@ -4699,9 +4701,9 @@ dependencies = [ [[package]] name = "postgres-types" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b858f82211e84682fecd373f68e1ceae642d8d751a1ebd13f33de6257b3e20" +checksum = "8dc729a129e682e8d24170cd30ae1aa01b336b096cbb56df6d534ffec133d186" dependencies = [ "bytes", "chrono", @@ -4959,6 +4961,17 @@ dependencies = [ "rand_core 0.9.5", ] +[[package]] +name = "rand" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8" +dependencies = [ + "chacha20", + "getrandom 0.4.2", + "rand_core 0.10.0", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -4997,6 +5010,12 @@ dependencies = [ "getrandom 0.3.4", ] +[[package]] +name = "rand_core" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba" + [[package]] name = "rand_distr" version = "0.5.1" @@ -6168,9 +6187,9 @@ dependencies = [ [[package]] name = "tokio-postgres" -version = "0.7.16" +version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcea47c8f71744367793f16c2db1f11cb859d28f436bdb4ca9193eb1f787ee42" +checksum = "4dd8df5ef180f6364759a6f00f7aadda4fbbac86cdee37480826a6ff9f3574ce" dependencies = [ "async-trait", "byteorder", @@ -6185,7 +6204,7 @@ dependencies = [ "pin-project-lite", "postgres-protocol", "postgres-types", - "rand 0.9.2", + "rand 0.10.0", "socket2", "tokio", "tokio-util", @@ -6524,9 +6543,9 @@ checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" [[package]] name = "unicode-width" @@ -6630,9 +6649,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.22.0" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37" +checksum = "5ac8b6f42ead25368cf5b098aeb3dc8a1a2c05a3eee8a9a1a68c640edbfc79d9" dependencies = [ "getrandom 0.4.2", "js-sys", @@ -6720,9 +6739,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.114" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" +checksum = "7dc0882f7b5bb01ae8c5215a1230832694481c1a4be062fd410e12ea3da5b631" dependencies = [ "cfg-if", "once_cell", @@ -6733,23 +6752,19 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.64" +version = "0.4.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" +checksum = "19280959e2844181895ef62f065c63e0ca07ece4771b53d89bfdb967d97cbf05" dependencies = [ - "cfg-if", - "futures-util", "js-sys", - "once_cell", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.114" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" +checksum = "75973d3066e01d035dbedaad2864c398df42f8dd7b1ea057c35b8407c015b537" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6757,9 +6772,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.114" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" +checksum = "91af5e4be765819e0bcfee7322c14374dc821e35e72fa663a830bbc7dc199eac" dependencies = [ "bumpalo", "proc-macro2", @@ -6770,18 +6785,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.114" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" +checksum = "c9bf0406a78f02f336bf1e451799cca198e8acde4ffa278f0fb20487b150a633" dependencies = [ "unicode-ident", ] [[package]] name = "wasm-bindgen-test" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6311c867385cc7d5602463b31825d454d0837a3aba7cdb5e56d5201792a3f7fe" +checksum = "ea88331fc76766356287e79bb0bc032157feea8eff8f2c3f1d9ea4b94255ae1c" dependencies = [ "async-trait", "cast", @@ -6801,9 +6816,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67008cdde4769831958536b0f11b3bdd0380bde882be17fff9c2f34bb4549abd" +checksum = "92437fa87f58743befb3003c4f4e3e9010dd50c6935561be7645981c0de05dfd" dependencies = [ "proc-macro2", "quote", @@ -6812,9 +6827,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-shared" -version = "0.2.114" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe29135b180b72b04c74aa97b2b4a2ef275161eff9a6c7955ea9eaedc7e1d4e" +checksum = "10091e48e3231b0f567b098ddb9a107310eb2629ae0eaa7c98dd746d5e80ee78" [[package]] name = "wasm-encoder" @@ -6865,9 +6880,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.91" +version = "0.3.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" +checksum = "749466a37ee189057f54748b200186b59a03417a117267baf3fd89cecc9fb837" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/Cargo.toml b/Cargo.toml index ffdc14cc514dd..c6f38e16b94e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -163,7 +163,7 @@ half = { version = "2.7.0", default-features = false } hashbrown = { version = "0.16.1" } hex = { version = "0.4.3" } indexmap = "2.13.0" -insta = { version = "1.46.3", features = ["glob", "filters"] } +insta = { version = "1.47.2", features = ["glob", "filters"] } itertools = "0.14" itoa = "1.0" liblzma = { version = "0.4.6", features = ["static"] } @@ -196,7 +196,7 @@ tokio = { version = "1.48", features = ["macros", "rt", "sync"] } tokio-stream = "0.1" tokio-util = "0.7" url = "2.5.7" -uuid = "1.21" +uuid = "1.23" zstd = { version = "0.13", default-features = false } [workspace.lints.clippy] diff --git a/datafusion/functions/Cargo.toml b/datafusion/functions/Cargo.toml index 1940f1378b635..7503c337517ef 100644 --- a/datafusion/functions/Cargo.toml +++ b/datafusion/functions/Cargo.toml @@ -87,7 +87,7 @@ num-traits = { workspace = true } rand = { workspace = true } regex = { workspace = true, optional = true } sha2 = { workspace = true, optional = true } -unicode-segmentation = { version = "^1.7.1", optional = true } +unicode-segmentation = { version = "^1.13.2", optional = true } uuid = { workspace = true, features = ["v4"], optional = true } [dev-dependencies] diff --git a/datafusion/sqllogictest/Cargo.toml b/datafusion/sqllogictest/Cargo.toml index b00fbe466728e..7a341988d5803 100644 --- a/datafusion/sqllogictest/Cargo.toml +++ b/datafusion/sqllogictest/Cargo.toml @@ -55,7 +55,7 @@ indicatif = "0.18" itertools = { workspace = true } log = { workspace = true } object_store = { workspace = true } -postgres-types = { version = "0.2.12", features = ["derive", "with-chrono-0_4"], optional = true } +postgres-types = { version = "0.2.13", features = ["derive", "with-chrono-0_4"], optional = true } # When updating the following dependency verify that sqlite test file regeneration works correctly # by running the regenerate_sqlite_files.sh script. sqllogictest = "0.29.1" @@ -64,7 +64,7 @@ tempfile = { workspace = true } testcontainers-modules = { workspace = true, features = ["postgres"], optional = true } thiserror = "2.0.18" tokio = { workspace = true } -tokio-postgres = { version = "0.7.16", optional = true } +tokio-postgres = { version = "0.7.17", optional = true } [features] avro = ["datafusion/avro"] diff --git a/datafusion/wasmtest/Cargo.toml b/datafusion/wasmtest/Cargo.toml index e033056f99845..398eca9768c9f 100644 --- a/datafusion/wasmtest/Cargo.toml +++ b/datafusion/wasmtest/Cargo.toml @@ -65,7 +65,7 @@ object_store = { workspace = true } # needs to be compiled tokio = { workspace = true } url = { workspace = true } -wasm-bindgen-test = "0.3.62" +wasm-bindgen-test = "0.3.66" [package.metadata.cargo-machete] ignored = ["chrono", "getrandom"]