kazantsev-maksim commented on code in PR #1321:
URL: https://github.com/apache/datafusion-comet/pull/1321#discussion_r1935970833


##########
spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala:
##########
@@ -2701,4 +2701,20 @@ class CometExpressionSuite extends CometTestBase with 
AdaptiveSparkPlanHelper {
       }
     }
   }
+
+  test("array_compact") {
+    assume(isSpark34Plus)
+    Seq(true, false).foreach { dictionaryEnabled =>
+      withTempDir { dir =>
+        val path = new Path(dir.toURI.toString, "test.parquet")
+        makeParquetFileAllTypes(path, dictionaryEnabled = dictionaryEnabled, n 
= 10000)
+        spark.read.parquet(path.toString).createOrReplaceTempView("t1")
+
+        checkSparkAnswerAndOperator(
+          sql("SELECT array_compact(array(_2)) FROM t1 WHERE _2 IS NULL"))
+        checkSparkAnswerAndOperator(
+          sql("SELECT array_compact(array(_2)) FROM t1 WHERE _2 IS NOT NULL"))

Review Comment:
   I added a case when the array contains both null and not null to the test 
for all types, I suggest adding as part of 
[#1269](https://github.com/apache/datafusion-comet/issues/1269)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to