You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by ag...@apache.org on 2024/09/27 20:44:24 UTC
(datafusion-comet) branch main updated: chore: Enable additional CreateArray tests (#928)
This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
The following commit(s) were added to refs/heads/main by this push:
new 0ee7df83 chore: Enable additional CreateArray tests (#928)
0ee7df83 is described below
commit 0ee7df8306edfa97e7f83b706040959f5dcfce87
Author: Adam Binford <ad...@gmail.com>
AuthorDate: Fri Sep 27 16:44:21 2024 -0400
chore: Enable additional CreateArray tests (#928)
* Enable additional CreateArray tests
* Format
---
native/core/src/execution/datafusion/planner.rs | 2 +-
spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/native/core/src/execution/datafusion/planner.rs b/native/core/src/execution/datafusion/planner.rs
index ac82d7d0..15de7c9a 100644
--- a/native/core/src/execution/datafusion/planner.rs
+++ b/native/core/src/execution/datafusion/planner.rs
@@ -1904,7 +1904,7 @@ impl PhysicalPlanner {
.into_iter()
.zip(input_expr_types.into_iter().zip(coerced_input_types))
.map(|(expr, (from_type, to_type))| {
- if !from_type.equals_datatype(&to_type) {
+ if from_type != to_type {
Arc::new(CastExpr::new(
expr,
to_type,
diff --git a/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala b/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala
index afedb018..16bc15b8 100644
--- a/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala
+++ b/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala
@@ -2192,13 +2192,12 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
df.select(array(array(col("_4")), array(col("_4"), lit(null)))))
checkSparkAnswerAndOperator(df.select(array(col("_8"), col("_13"))))
// This ends up returning empty strings instead of nulls for the last element
- // Fixed by https://github.com/apache/datafusion/commit/27304239ef79b50a443320791755bf74eed4a85d
- // checkSparkAnswerAndOperator(df.select(array(col("_8"), col("_13"), lit(null))))
+ checkSparkAnswerAndOperator(df.select(array(col("_8"), col("_13"), lit(null))))
checkSparkAnswerAndOperator(df.select(array(array(col("_8")), array(col("_13")))))
checkSparkAnswerAndOperator(df.select(array(col("_8"), col("_8"), lit(null))))
checkSparkAnswerAndOperator(df.select(array(struct("_4"), struct("_4"))))
- // Fixed by https://github.com/apache/datafusion/commit/140f7cec78febd73d3db537a816badaaf567530a
- // checkSparkAnswerAndOperator(df.select(array(struct(col("_8").alias("a")), struct(col("_13").alias("a")))))
+ checkSparkAnswerAndOperator(
+ df.select(array(struct(col("_8").alias("a")), struct(col("_13").alias("a")))))
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org