From 6a73f627ba98b4fde459080b7401f7f465d11d2d Mon Sep 17 00:00:00 2001 From: Andy Grove Date: Tue, 10 Dec 2024 09:03:43 -0700 Subject: [PATCH] fix ScalarUDFImpl.return_type failure --- native/Cargo.lock | 44 +++++++++---------- native/Cargo.toml | 18 ++++---- .../core/src/execution/datafusion/planner.rs | 2 + 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/native/Cargo.lock b/native/Cargo.lock index 76a0d182b..f063909ff 100644 --- a/native/Cargo.lock +++ b/native/Cargo.lock @@ -806,7 +806,7 @@ dependencies = [ [[package]] name = "datafusion" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "arrow", "arrow-array", @@ -849,7 +849,7 @@ dependencies = [ [[package]] name = "datafusion-catalog" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "arrow-schema", "async-trait", @@ -947,7 +947,7 @@ dependencies = [ [[package]] name = "datafusion-common" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "ahash", "arrow", @@ -970,7 +970,7 @@ dependencies = [ [[package]] name = "datafusion-common-runtime" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "log", "tokio", @@ -979,12 +979,12 @@ dependencies = [ [[package]] name = "datafusion-doc" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" [[package]] name = "datafusion-execution" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "arrow", "chrono", @@ -1003,7 +1003,7 @@ dependencies = [ [[package]] name = "datafusion-expr" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "ahash", "arrow", @@ -1028,7 +1028,7 @@ dependencies = [ [[package]] name = "datafusion-expr-common" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "arrow", "datafusion-common", @@ -1039,7 +1039,7 @@ dependencies = [ [[package]] name = "datafusion-functions" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "arrow", "arrow-buffer", @@ -1067,7 +1067,7 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "ahash", "arrow", @@ -1088,7 +1088,7 @@ dependencies = [ [[package]] name = "datafusion-functions-aggregate-common" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "ahash", "arrow", @@ -1101,7 +1101,7 @@ dependencies = [ [[package]] name = "datafusion-functions-nested" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "arrow", "arrow-array", @@ -1123,7 +1123,7 @@ dependencies = [ [[package]] name = "datafusion-functions-table" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "ahash", "arrow", @@ -1147,7 +1147,7 @@ dependencies = [ [[package]] name = "datafusion-functions-window" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "datafusion-common", "datafusion-expr", @@ -1161,7 +1161,7 @@ dependencies = [ [[package]] name = "datafusion-functions-window-common" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "datafusion-common", "datafusion-physical-expr-common", @@ -1170,7 +1170,7 @@ dependencies = [ [[package]] name = "datafusion-macros" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "proc-macro2", "quote", @@ -1180,7 +1180,7 @@ dependencies = [ [[package]] name = "datafusion-optimizer" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "arrow", "async-trait", @@ -1199,7 +1199,7 @@ dependencies = [ [[package]] name = "datafusion-physical-expr" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "ahash", "arrow", @@ -1223,7 +1223,7 @@ dependencies = [ [[package]] name = "datafusion-physical-expr-common" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "ahash", "arrow", @@ -1236,7 +1236,7 @@ dependencies = [ [[package]] name = "datafusion-physical-optimizer" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "arrow", "datafusion-common", @@ -1252,7 +1252,7 @@ dependencies = [ [[package]] name = "datafusion-physical-plan" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "ahash", "arrow", @@ -1285,7 +1285,7 @@ dependencies = [ [[package]] name = "datafusion-sql" version = "43.0.0" -source = "git+https://github.com/apache/datafusion.git#d3cfc45cef28a2d707bdd4b14da33a4d38a209d6" +source = "git+https://github.com/andygrove/datafusion.git?branch=comet-upgrade#e17342cc6801f341eba8ee8262785c21dd0a9c2a" dependencies = [ "arrow", "arrow-array", diff --git a/native/Cargo.toml b/native/Cargo.toml index b2daab271..ded7d89fa 100644 --- a/native/Cargo.toml +++ b/native/Cargo.toml @@ -22,7 +22,7 @@ resolver = "2" [workspace.package] version = "0.5.0" homepage = "https://datafusion.apache.org/comet" -repository = "https://github.com/apache/datafusion-comet" +repository = "https://github.com/andygrove/datafusion-comet" authors = ["Apache DataFusion "] description = "Apache DataFusion Comet: High performance accelerator for Apache Spark" readme = "README.md" @@ -39,14 +39,14 @@ arrow-buffer = { version = "53.3.0" } arrow-data = { version = "53.3.0" } arrow-schema = { version = "53.3.0" } parquet = { version = "53.3.0", default-features = false, features = ["experimental"] } -datafusion-common = { git = "https://github.com/apache/datafusion.git" } -datafusion = { git = "https://github.com/apache/datafusion.git", default-features = false, features = ["unicode_expressions", "crypto_expressions"] } -datafusion-functions = { git = "https://github.com/apache/datafusion.git", features = ["crypto_expressions"] } -datafusion-functions-nested = { git = "https://github.com/apache/datafusion.git", default-features = false } -datafusion-expr = { git = "https://github.com/apache/datafusion.git", default-features = false } -datafusion-execution = { git = "https://github.com/apache/datafusion.git", default-features = false } -datafusion-physical-plan = { git = "https://github.com/apache/datafusion.git", default-features = false } -datafusion-physical-expr = { git = "https://github.com/apache/datafusion.git", default-features = false } +datafusion-common = { git = "https://github.com/andygrove/datafusion.git", branch="comet-upgrade" } +datafusion = { git = "https://github.com/andygrove/datafusion.git", branch="comet-upgrade", default-features = false, features = ["unicode_expressions", "crypto_expressions"] } +datafusion-functions = { git = "https://github.com/andygrove/datafusion.git", branch="comet-upgrade", features = ["crypto_expressions"] } +datafusion-functions-nested = { git = "https://github.com/andygrove/datafusion.git", branch="comet-upgrade", default-features = false } +datafusion-expr = { git = "https://github.com/andygrove/datafusion.git", branch="comet-upgrade", default-features = false } +datafusion-execution = { git = "https://github.com/andygrove/datafusion.git", branch="comet-upgrade", default-features = false } +datafusion-physical-plan = { git = "https://github.com/andygrove/datafusion.git", branch="comet-upgrade", default-features = false } +datafusion-physical-expr = { git = "https://github.com/andygrove/datafusion.git", branch="comet-upgrade", default-features = false } datafusion-comet-spark-expr = { path = "spark-expr", version = "0.5.0" } datafusion-comet-proto = { path = "proto", version = "0.5.0" } chrono = { version = "0.4", default-features = false, features = ["clock"] } diff --git a/native/core/src/execution/datafusion/planner.rs b/native/core/src/execution/datafusion/planner.rs index 3159952ca..251faf645 100644 --- a/native/core/src/execution/datafusion/planner.rs +++ b/native/core/src/execution/datafusion/planner.rs @@ -2021,6 +2021,8 @@ impl PhysicalPlanner { .coerce_types(&input_expr_types) .unwrap_or_else(|_| input_expr_types.clone()); + // TODO need to call `return_type_from_exprs` instead + #[allow(deprecated)] let data_type = func.inner().return_type(&coerced_types)?; (data_type, coerced_types)