This is an automated email from the ASF dual-hosted git repository.
yuanzhou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 9ee62aa1ff [GLUTEN-11088][VL] Fix ArithmeticAnsiValidateSuite (#11150)
9ee62aa1ff is described below
commit 9ee62aa1ff413e2543cfdb875c206a963e24a0ab
Author: Rong Ma <[email protected]>
AuthorDate: Mon Nov 24 09:04:00 2025 +0000
[GLUTEN-11088][VL] Fix ArithmeticAnsiValidateSuite (#11150)
The test failure is caused by Exception type mismatch
---
.../functions/ArithmeticAnsiValidateSuite.scala | 31 ++++++++++++++++------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git
a/backends-velox/src/test/scala/org/apache/gluten/functions/ArithmeticAnsiValidateSuite.scala
b/backends-velox/src/test/scala/org/apache/gluten/functions/ArithmeticAnsiValidateSuite.scala
index 5b9ee0e35a..fe0f36cb8f 100644
---
a/backends-velox/src/test/scala/org/apache/gluten/functions/ArithmeticAnsiValidateSuite.scala
+++
b/backends-velox/src/test/scala/org/apache/gluten/functions/ArithmeticAnsiValidateSuite.scala
@@ -33,13 +33,21 @@ class ArithmeticAnsiValidateSuite extends
FunctionsValidateSuite {
.set(SQLConf.ANSI_ENABLED.key, "true")
}
- // TODO: fix on spark-4.0
- testWithMaxSparkVersion("add", "3.5") {
+ test("add") {
runQueryAndCompare("SELECT int_field1 + 100 FROM datatab WHERE int_field1
IS NOT NULL") {
checkGlutenOperatorMatch[ProjectExecTransformer]
}
- intercept[ArithmeticException] {
- sql("SELECT 2147483647 + 1").collect()
+
+ val df = sql("SELECT 2147483647 + 1")
+
+ if (isSparkVersionGE("4.0")) {
+ intercept[SparkException] {
+ df.collect()
+ }
+ } else {
+ intercept[ArithmeticException] {
+ df.collect()
+ }
}
}
@@ -49,13 +57,20 @@ class ArithmeticAnsiValidateSuite extends
FunctionsValidateSuite {
}
}
- // TODO: fix on spark-4.0
- testWithMaxSparkVersion("multiply", "3.5") {
+ test("multiply") {
runQueryAndCompare("SELECT int_field1 * 2 FROM datatab WHERE int_field1 IS
NOT NULL") {
checkGlutenOperatorMatch[ProjectExecTransformer]
}
- intercept[ArithmeticException] {
- sql("SELECT 2147483647 * 2").collect()
+
+ val df = sql("SELECT 2147483647 + 1")
+ if (isSparkVersionGE("4.0")) {
+ intercept[SparkException] {
+ df.collect()
+ }
+ } else {
+ intercept[ArithmeticException] {
+ df.collect()
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]