andygrove commented on code in PR #1321:
URL: https://github.com/apache/datafusion-comet/pull/1321#discussion_r1931058343


##########
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:
   One of the disadvantages of `makeParquetFileAllTypes` is that if `_2` is 
null, then all other columns are also null.



-- 
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