Skip to content

Commit 5cf267c

Browse files
committed
chore: Fix array_interest test
1 parent d5e5b21 commit 5cf267c

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

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

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -429,16 +429,20 @@ class CometArrayExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelp
429429
}
430430

431431
test("array_intersect") {
432-
Seq(true, false).foreach { dictionaryEnabled =>
433-
withTempDir { dir =>
434-
val path = new Path(dir.toURI.toString, "test.parquet")
435-
makeParquetFileAllPrimitiveTypes(path, dictionaryEnabled, 10000)
436-
spark.read.parquet(path.toString).createOrReplaceTempView("t1")
437-
checkSparkAnswerAndOperator(
438-
sql("SELECT array_intersect(array(_2, _3, _4), array(_3, _4)) from t1"))
439-
checkSparkAnswerAndOperator(
440-
sql("SELECT array_intersect(array(_4 * -1), array(_5, _5)) from t1"))
441-
checkSparkAnswerAndOperator(sql("SELECT array_intersect(array(_18), array(_19)) from t1"))
432+
withSQLConf(CometConf.COMET_EXPR_ALLOW_INCOMPATIBLE.key -> "true") {
433+
434+
Seq(true, false).foreach { dictionaryEnabled =>
435+
withTempDir { dir =>
436+
val path = new Path(dir.toURI.toString, "test.parquet")
437+
makeParquetFileAllPrimitiveTypes(path, dictionaryEnabled, 10000)
438+
spark.read.parquet(path.toString).createOrReplaceTempView("t1")
439+
checkSparkAnswerAndOperator(
440+
sql("SELECT array_intersect(array(_2, _3, _4), array(_3, _4)) from t1"))
441+
checkSparkAnswerAndOperator(
442+
sql("SELECT array_intersect(array(_4 * -1), array(_5)) from t1"))
443+
checkSparkAnswerAndOperator(
444+
sql("SELECT array_intersect(array(_18), array(_19)) from t1"))
445+
}
442446
}
443447
}
444448
}

0 commit comments

Comments
 (0)