Skip to content

Commit c726eb8

Browse files
committed
feat: support concat for strings
1 parent b43b1c2 commit c726eb8

File tree

4 files changed

+1
-13
lines changed

4 files changed

+1
-13
lines changed

fuzz-testing/src/main/scala/org/apache/comet/fuzz/Meta.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ object Meta {
137137
SparkBinaryType,
138138
SparkArrayType(
139139
SparkTypeOneOf(Seq(SparkStringType, SparkNumericType, SparkBinaryType))))))),
140+
createFunctionWithInputTypes("concat", Seq(SparkStringType, SparkStringType)), // TODO: variadic
140141
createFunctionWithInputTypes("concat_ws", Seq(SparkStringType, SparkStringType)),
141142
createFunctionWithInputTypes("contains", Seq(SparkStringType, SparkStringType)),
142143
createFunctionWithInputTypes("ends_with", Seq(SparkStringType, SparkStringType)),

native/Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

native/spark-expr/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ edition = { workspace = true }
3030
arrow = { workspace = true }
3131
chrono = { workspace = true }
3232
datafusion = { workspace = true }
33-
datafusion-spark = { workspace = true }
3433
chrono-tz = { workspace = true }
3534
num = { workspace = true }
3635
regex = { workspace = true }

native/spark-expr/src/comet_scalar_funcs.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,6 @@ pub fn create_comet_physical_fun_with_eval_mode(
180180
let func = Arc::new(spark_modulo);
181181
make_comet_scalar_udf!("spark_modulo", func, without data_type, fail_on_error)
182182
}
183-
"concat" => {
184-
// Use concat from datafusion-spark crate which has Spark semantics
185-
// (returns null if any argument is null)
186-
// The registry parameter already contains functions from datafusion-spark
187-
// if they were registered in prepare_datafusion_session_context
188-
registry.udf("concat").map_err(|e| {
189-
DataFusionError::Execution(format!(
190-
"Function concat not found in the registry: {e}",
191-
))
192-
})
193-
}
194183
_ => registry.udf(fun_name).map_err(|e| {
195184
DataFusionError::Execution(format!(
196185
"Function {fun_name} not found in the registry: {e}",

0 commit comments

Comments
 (0)