Skip to content

Commit d5e5b21

Browse files
committed
chore: Fix array_interest test
1 parent 2ac9c43 commit d5e5b21

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

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

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

431431
test("array_intersect") {
432-
// TODO test fails if scan is auto
433-
// https://github.com/apache/datafusion-comet/issues/2174
434-
withSQLConf(
435-
CometConf.COMET_NATIVE_SCAN_IMPL.key -> CometConf.SCAN_NATIVE_COMET,
436-
CometConf.COMET_EXPR_ALLOW_INCOMPATIBLE.key -> "true") {
437-
438-
Seq(true, false).foreach { dictionaryEnabled =>
439-
withTempDir { dir =>
440-
val path = new Path(dir.toURI.toString, "test.parquet")
441-
makeParquetFileAllPrimitiveTypes(path, dictionaryEnabled, 10000)
442-
spark.read.parquet(path.toString).createOrReplaceTempView("t1")
443-
checkSparkAnswerAndOperator(
444-
sql("SELECT array_intersect(array(_2, _3, _4), array(_3, _4)) from t1"))
445-
checkSparkAnswerAndOperator(
446-
sql("SELECT array_intersect(array(_2 * -1), array(_9, _10)) from t1"))
447-
checkSparkAnswerAndOperator(
448-
sql("SELECT array_intersect(array(_18), array(_19)) from t1"))
449-
}
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"))
450442
}
451443
}
452444
}

0 commit comments

Comments
 (0)