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 98c06c6ba fix: support literal null list and map (#1742) 98c06c6ba is described below commit 98c06c6ba3e75e31bcfeb99d1e269748b60ed97c Author: KAZUYUKI TANIMURA <ktanim...@apple.com> AuthorDate: Thu May 15 21:24:27 2025 -0700 fix: support literal null list and map (#1742) --- native/core/src/execution/planner.rs | 2 ++ .../test/scala/org/apache/comet/CometExpressionSuite.scala | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/native/core/src/execution/planner.rs b/native/core/src/execution/planner.rs index ba7bbf0c2..5711c3d19 100644 --- a/native/core/src/execution/planner.rs +++ b/native/core/src/execution/planner.rs @@ -378,6 +378,8 @@ impl PhysicalPlanner { DataType::Binary => ScalarValue::Binary(None), DataType::Decimal128(p, s) => ScalarValue::Decimal128(None, p, s), DataType::Struct(fields) => ScalarStructBuilder::new_null(fields), + DataType::Map(f, s) => DataType::Map(f, s).try_into()?, + DataType::List(f) => DataType::List(f).try_into()?, DataType::Null => ScalarValue::Null, dt => { return Err(GeneralError(format!("{:?} is not supported in Comet", dt))) diff --git a/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala b/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala index d2bdba150..0030ef786 100644 --- a/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala +++ b/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala @@ -171,11 +171,18 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper { makeParquetFileAllTypes(path, dictionaryEnabled = dictionaryEnabled, batchSize) withParquetTable(path.toString, "tbl") { val sqlString = - "SELECT _4 + null, _15 - null, _16 * null, cast(null as struct<_1:int>) FROM tbl" + """SELECT + |_4 + null, + |_15 - null, + |_16 * null, + |cast(null as struct<_1:int>), + |cast(null as map<int, int>), + |cast(null as array<int>) + |FROM tbl""".stripMargin val df2 = sql(sqlString) val rows = df2.collect() assert(rows.length == batchSize) - assert(rows.forall(_ == Row(null, null, null, null))) + assert(rows.forall(_ == Row(null, null, null, null, null, null))) checkSparkAnswerAndOperator(sqlString) } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@datafusion.apache.org For additional commands, e-mail: commits-h...@datafusion.apache.org