Skip to content

Commit f609f02

Browse files
committed
chore: bump DataFusion to rev c6f0d3c
1 parent 1db9a10 commit f609f02

File tree

3 files changed

+50
-26
lines changed

3 files changed

+50
-26
lines changed

native/Cargo.lock

+14-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

native/Cargo.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ arrow-buffer = { version = "52.2.0" }
3939
arrow-data = { version = "52.2.0" }
4040
arrow-schema = { version = "52.2.0" }
4141
parquet = { version = "52.2.0", default-features = false, features = ["experimental"] }
42-
datafusion-common = { git = "https://github.com/apache/datafusion.git", rev = "35c2e7e" }
43-
datafusion = { default-features = false, git = "https://github.com/apache/datafusion.git", rev = "35c2e7e", features = ["unicode_expressions", "crypto_expressions"] }
44-
datafusion-functions = { git = "https://github.com/apache/datafusion.git", rev = "35c2e7e", features = ["crypto_expressions"] }
45-
datafusion-expr = { git = "https://github.com/apache/datafusion.git", rev = "35c2e7e", default-features = false }
46-
datafusion-physical-plan = { git = "https://github.com/apache/datafusion.git", rev = "35c2e7e", default-features = false }
47-
datafusion-physical-expr-common = { git = "https://github.com/apache/datafusion.git", rev = "35c2e7e", default-features = false }
48-
datafusion-physical-expr = { git = "https://github.com/apache/datafusion.git", rev = "35c2e7e", default-features = false }
42+
datafusion-common = { git = "https://github.com/apache/datafusion.git", rev = "c6f0d3c" }
43+
datafusion = { default-features = false, git = "https://github.com/apache/datafusion.git", rev = "c6f0d3c", features = ["unicode_expressions", "crypto_expressions"] }
44+
datafusion-functions = { git = "https://github.com/apache/datafusion.git", rev = "c6f0d3c", features = ["crypto_expressions"] }
45+
datafusion-expr = { git = "https://github.com/apache/datafusion.git", rev = "c6f0d3c", default-features = false }
46+
datafusion-physical-plan = { git = "https://github.com/apache/datafusion.git", rev = "c6f0d3c", default-features = false }
47+
datafusion-physical-expr-common = { git = "https://github.com/apache/datafusion.git", rev = "c6f0d3c", default-features = false }
48+
datafusion-physical-expr = { git = "https://github.com/apache/datafusion.git", rev = "c6f0d3c", default-features = false }
4949
datafusion-comet-spark-expr = { path = "spark-expr", version = "0.2.0" }
5050
datafusion-comet-proto = { path = "proto", version = "0.2.0" }
5151
chrono = { version = "0.4", default-features = false, features = ["clock"] }

native/core/src/execution/datafusion/planner.rs

+29-5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
use arrow_schema::{DataType, Field, Schema, TimeUnit, DECIMAL128_MAX_PRECISION};
2121
use datafusion::functions_aggregate::bit_and_or_xor::{bit_and_udaf, bit_or_udaf, bit_xor_udaf};
2222
use datafusion::functions_aggregate::count::count_udaf;
23+
use datafusion::functions_aggregate::min_max::max_udaf;
24+
use datafusion::functions_aggregate::min_max::min_udaf;
2325
use datafusion::functions_aggregate::sum::sum_udaf;
2426
use datafusion::physical_plan::windows::BoundedWindowAggExec;
2527
use datafusion::physical_plan::InputOrderMode;
@@ -33,7 +35,7 @@ use datafusion::{
3335
execution_props::ExecutionProps,
3436
expressions::{
3537
in_list, BinaryExpr, CaseExpr, CastExpr, Column, IsNotNullExpr, IsNullExpr,
36-
Literal as DataFusionLiteral, Max, Min, NotExpr,
38+
Literal as DataFusionLiteral, NotExpr,
3739
},
3840
AggregateExpr, PhysicalExpr, PhysicalSortExpr, ScalarFunctionExpr,
3941
},
@@ -1254,14 +1256,36 @@ impl PhysicalPlanner {
12541256
.map_err(|e| ExecutionError::DataFusionError(e.to_string()))
12551257
}
12561258
AggExprStruct::Min(expr) => {
1257-
let child = self.create_expr(expr.child.as_ref().unwrap(), schema)?;
1259+
let child = self.create_expr(expr.child.as_ref().unwrap(), schema.clone())?;
12581260
let datatype = to_arrow_datatype(expr.datatype.as_ref().unwrap());
1259-
Ok(Arc::new(Min::new(child, "min", datatype)))
1261+
let child = Arc::new(CastExpr::new(child, datatype.clone(), None));
1262+
create_aggregate_expr(
1263+
&min_udaf(),
1264+
&[child],
1265+
&[],
1266+
&[],
1267+
&[],
1268+
schema.as_ref(),
1269+
"min",
1270+
false,
1271+
false,
1272+
).map_err(|e| ExecutionError::DataFusionError(e.to_string()))
12601273
}
12611274
AggExprStruct::Max(expr) => {
1262-
let child = self.create_expr(expr.child.as_ref().unwrap(), schema)?;
1275+
let child = self.create_expr(expr.child.as_ref().unwrap(), schema.clone())?;
12631276
let datatype = to_arrow_datatype(expr.datatype.as_ref().unwrap());
1264-
Ok(Arc::new(Max::new(child, "max", datatype)))
1277+
let child = Arc::new(CastExpr::new(child, datatype.clone(), None));
1278+
create_aggregate_expr(
1279+
&max_udaf(),
1280+
&[child],
1281+
&[],
1282+
&[],
1283+
&[],
1284+
schema.as_ref(),
1285+
"max",
1286+
false,
1287+
false,
1288+
).map_err(|e| ExecutionError::DataFusionError(e.to_string()))
12651289
}
12661290
AggExprStruct::Sum(expr) => {
12671291
let child = self.create_expr(expr.child.as_ref().unwrap(), schema.clone())?;

0 commit comments

Comments
 (0)