kazuyukitanimura commented on code in PR #1343: URL: https://github.com/apache/datafusion-comet/pull/1343#discussion_r1949694482
########## spark/src/test/scala/org/apache/comet/CometArrayExpressionSuite.scala: ########## @@ -292,4 +292,89 @@ class CometArrayExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelp } } + test("array_except - basic test (only integer values)") { + withSQLConf(CometConf.COMET_EXPR_ALLOW_INCOMPATIBLE.key -> "true") { + Seq(true, false).foreach { dictionaryEnabled => + withTempDir { dir => + val path = new Path(dir.toURI.toString, "test.parquet") + makeParquetFileAllTypes(path, dictionaryEnabled, 10000) + spark.read.parquet(path.toString).createOrReplaceTempView("t1") + + checkSparkAnswerAndOperator( + sql("SELECT array_except(array(_2, _3, _4), array(_3, _4)) from t1")) + checkSparkAnswerAndOperator(sql("SELECT array_except(array(_18), array(_19)) from t1")) + checkSparkAnswerAndOperator(spark.sql( + "SELECT array_except((CASE WHEN _2 = _3 THEN array(_2, _3, _4) END), array(_4)) FROM t1")) Review Comment: I saw you added `WHERE _2 IS NOT NULL` but not sure how it helps... `_2 = _3` will be always `true` is it intentional? -- 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