Skip to content

Commit e8a160d

Browse files
committed
feat: ArrayType nested literal
1 parent 7900f15 commit e8a160d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,7 @@ object QueryPlanSerde extends Logging with CometExprShim {
760760
allowComplex = value == null ||
761761
// Nested literal support for native reader
762762
// can be tracked https://github.com/apache/datafusion-comet/issues/1937
763-
// now supports only Array of primitive
764-
(Seq(CometConf.SCAN_NATIVE_ICEBERG_COMPAT, CometConf.SCAN_NATIVE_DATAFUSION)
765-
.contains(CometConf.COMET_NATIVE_SCAN_IMPL.get()) && dataType
763+
(dataType
766764
.isInstanceOf[ArrayType] && (!isComplexType(
767765
dataType.asInstanceOf[ArrayType].elementType) || dataType
768766
.asInstanceOf[ArrayType]

spark/src/test/scala/org/apache/comet/exec/CometNativeReaderSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,6 @@ class CometNativeReaderSuite extends CometTestBase with AdaptiveSparkPlanHelper
563563
"""
564564
|select 1 a
565565
|""".stripMargin,
566-
"select array(array(1, 2, null), array(), array(10), null) from tbl")
566+
"select array(array(1, 2, null), array(), array(10), null, array(null)) from tbl")
567567
}
568568
}

0 commit comments

Comments
 (0)