This is an automated email from the ASF dual-hosted git repository.

andygrove 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 56b82d6454 test: add timestamp ntz array cast coverage (#4589)
56b82d6454 is described below

commit 56b82d6454e3d1b73be80fe4de45c92f7816dc34
Author: Manu Zhang <[email protected]>
AuthorDate: Thu Jun 4 21:36:38 2026 +0800

    test: add timestamp ntz array cast coverage (#4589)
---
 spark/src/test/scala/org/apache/comet/CometCastSuite.scala | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/spark/src/test/scala/org/apache/comet/CometCastSuite.scala 
b/spark/src/test/scala/org/apache/comet/CometCastSuite.scala
index 3422a3ab01..76b5433100 100644
--- a/spark/src/test/scala/org/apache/comet/CometCastSuite.scala
+++ b/spark/src/test/scala/org/apache/comet/CometCastSuite.scala
@@ -1559,7 +1559,8 @@ class CometCastSuite extends CometTestBase with 
AdaptiveSparkPlanHelper {
       DoubleType,
       BinaryType,
       DecimalType(10, 2),
-      DecimalType(38, 18)).foreach { dt =>
+      DecimalType(38, 18),
+      DataTypes.TimestampNTZType).foreach { dt =>
       val input = generateArrays(100, dt)
       castTest(input, StringType, hasIncompatibleType = 
hasIncompatibleType(input.schema))
     }
@@ -1629,6 +1630,7 @@ class CometCastSuite extends CometTestBase with 
AdaptiveSparkPlanHelper {
       // cover this type fully.
       DateType,
       TimestampType,
+      DataTypes.TimestampNTZType,
       BinaryType)
     testArrayCastMatrix(types, ArrayType(_), generateArrays(100, _))
   }
@@ -1792,6 +1794,13 @@ class CometCastSuite extends CometTestBase with 
AdaptiveSparkPlanHelper {
             withEdgeCaseRows(buildRows(generateTimestampLiterals())).asJava,
             stringSchema)
           .select(col("a").cast(ArrayType(TimestampType)).as("a"))
+      case dt if dt == DataTypes.TimestampNTZType =>
+        val stringSchema = StructType(Seq(StructField("a", 
ArrayType(StringType), true)))
+        spark
+          .createDataFrame(
+            withEdgeCaseRows(buildRows(generateTimestampLiterals())).asJava,
+            stringSchema)
+          .select(col("a").cast(ArrayType(DataTypes.TimestampNTZType)).as("a"))
       case FloatType =>
         spark.createDataFrame(
           withEdgeCaseRows(buildRows(generateSafeFloatValues())).asJava,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to