Skip to content

Commit 48eaeb2

Browse files
committed
feat: ArrayType nested literal
1 parent e8a160d commit 48eaeb2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spark/src/test/scala/org/apache/comet/CometArrayExpressionSuite.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,4 +692,20 @@ class CometArrayExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelp
692692
}
693693
}
694694
}
695+
696+
test("array literals") {
697+
withSQLConf(
698+
CometConf.COMET_EXPR_ALLOW_INCOMPATIBLE.key -> "true",
699+
CometConf.COMET_EXPLAIN_FALLBACK_ENABLED.key -> "true") {
700+
Seq(true, false).foreach { dictionaryEnabled =>
701+
withTempDir { dir =>
702+
val path = new Path(dir.toURI.toString, "test.parquet")
703+
makeParquetFileAllPrimitiveTypes(path, dictionaryEnabled, 100)
704+
spark.read.parquet(path.toString).createOrReplaceTempView("t1")
705+
checkSparkAnswerAndOperator(
706+
sql("SELECT array(array(1, 2, 3), null, array(), array(null), array(1)) from t1"))
707+
}
708+
}
709+
}
710+
}
695711
}

0 commit comments

Comments
 (0)