From 98f2b51d5a0b784a75655c3b7ae7a17adac36bf5 Mon Sep 17 00:00:00 2001 From: "xudong.w" Date: Tue, 6 Jan 2026 15:22:01 +0800 Subject: [PATCH 1/3] Upgrade DF52 --- Cargo.toml | 24 ++++++++++++------------ src/materialized/dependencies.rs | 2 +- src/rewrite/normal_form.rs | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b6fc338..52b94f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,23 +29,23 @@ rust-version = "1.85.1" [dependencies] aquamarine = "0.6.0" -arrow = "57.0.0" -arrow-schema = "57.0.0" +arrow = "57.1.0" +arrow-schema = "57.1.0" async-trait = "0.1.89" dashmap = "6" -datafusion = "51" -datafusion-common = "51" -datafusion-expr = "51" -datafusion-functions = "51" -datafusion-functions-aggregate = "51" -datafusion-optimizer = "51" -datafusion-physical-expr = "51" -datafusion-physical-plan = "51" -datafusion-sql = "51" +datafusion = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } +datafusion-common = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } +datafusion-expr = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } +datafusion-functions = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } +datafusion-functions-aggregate = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } +datafusion-optimizer = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } +datafusion-physical-expr = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } +datafusion-physical-plan = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } +datafusion-sql = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } futures = "0.3" itertools = "0.14" log = "0.4" -object_store = "0.12" +object_store = "0.12.4" ordered-float = "5.0.0" [dev-dependencies] diff --git a/src/materialized/dependencies.rs b/src/materialized/dependencies.rs index 50f806c..5c3ae75 100644 --- a/src/materialized/dependencies.rs +++ b/src/materialized/dependencies.rs @@ -860,7 +860,7 @@ fn project_dfschema(schema: &DFSchema, indices: &HashSet) -> Result range, }; - if other_range.contains(range)? != Interval::CERTAINLY_TRUE { + if other_range.contains(range)? != Interval::TRUE { return Ok(None); } - if range.contains(other_range)? != Interval::CERTAINLY_TRUE { + if range.contains(other_range)? != Interval::TRUE { if !(range.lower().is_null() || range.upper().is_null()) && (range.lower().eq(range.upper())) { From 1cb5eceea0f464a9fea95168cb5d828f0b644860 Mon Sep 17 00:00:00 2001 From: "xudong.w" Date: Tue, 6 Jan 2026 15:26:49 +0800 Subject: [PATCH 2/3] update test --- src/materialized/dependencies.rs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/materialized/dependencies.rs b/src/materialized/dependencies.rs index 5c3ae75..7295b36 100644 --- a/src/materialized/dependencies.rs +++ b/src/materialized/dependencies.rs @@ -1940,19 +1940,20 @@ mod test { ", projection: &["year"], expected_plan: vec![ - "+--------------+--------------------------------------------------------------------+", - "| plan_type | plan |", - "+--------------+--------------------------------------------------------------------+", - "| logical_plan | Union |", - "| | Projection: coalesce(CAST(t1.year AS Utf8View), t2.year) AS year |", - "| | Full Join: Using CAST(t1.year AS Utf8View) = t2.year |", - "| | SubqueryAlias: t1 |", - "| | Projection: t1.column1 AS year |", - "| | TableScan: t1 projection=[column1] |", - "| | SubqueryAlias: t2 |", - "| | TableScan: t2 projection=[year] |", - "| | TableScan: t3 projection=[year] |", - "+--------------+--------------------------------------------------------------------+", + "+--------------+---------------------------------------------------------------------------------------------------+", + "| plan_type | plan |", + "+--------------+---------------------------------------------------------------------------------------------------+", + "| logical_plan | Union |", + "| | Projection: CASE WHEN __common_expr_2 IS NOT NULL THEN __common_expr_2 ELSE t2.year END AS year |", + "| | Projection: CAST(t1.year AS Utf8View) AS __common_expr_2, t2.year |", + "| | Full Join: Using CAST(t1.year AS Utf8View) = t2.year |", + "| | SubqueryAlias: t1 |", + "| | Projection: t1.column1 AS year |", + "| | TableScan: t1 projection=[column1] |", + "| | SubqueryAlias: t2 |", + "| | TableScan: t2 projection=[year] |", + "| | TableScan: t3 projection=[year] |", + "+--------------+---------------------------------------------------------------------------------------------------+", ], expected_output: vec![ "+------+", From d9c344d1e909df7cda2f0dd163ea6fa9aab3bc97 Mon Sep 17 00:00:00 2001 From: "xudong.w" Date: Mon, 12 Jan 2026 23:23:44 +0800 Subject: [PATCH 3/3] use 52 --- Cargo.toml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 52b94f7..041add6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,15 +33,15 @@ arrow = "57.1.0" arrow-schema = "57.1.0" async-trait = "0.1.89" dashmap = "6" -datafusion = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } -datafusion-common = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } -datafusion-expr = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } -datafusion-functions = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } -datafusion-functions-aggregate = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } -datafusion-optimizer = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } -datafusion-physical-expr = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } -datafusion-physical-plan = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } -datafusion-sql = { git = "https://github.com/apache/datafusion", rev = "aee5cd9" } +datafusion = "52" +datafusion-common = "52" +datafusion-expr = "52" +datafusion-functions = "52" +datafusion-functions-aggregate = "52" +datafusion-optimizer = "52" +datafusion-physical-expr = "52" +datafusion-physical-plan = "52" +datafusion-sql = "52" futures = "0.3" itertools = "0.14" log = "0.4"