Skip to content

Commit 7fce988

Browse files
committed
[MINOR][VL] Re-enable stale ignored atan2 test in MathFunctionsValidateSuite
The atan2 test was marked ignore after a result mismatch (PR #1689, 2023) caused by Velox using std::atan2 directly. That was fixed upstream in oap-project/velox#263 which added sparksql::Atan2Function that mirrors Spark's Math.atan2(y + 0.0, x + 0.0) behaviour to normalise -0 inputs. The ignore was never removed after the fix landed. Also promotes MathFunctionsValidateSuite from abstract class to class (fixing the RAS-removal oversight from PR #11756, the same fix already applied to DateFunctionsValidateSuite) and disables ANSI mode for Spark 4, consistent with the approach in PR #12158 which adds further tests to this same suite.
1 parent ce6e16f commit 7fce988

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

backends-velox/src/test/scala/org/apache/gluten/functions/MathFunctionsValidateSuite.scala

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,15 @@ class MathFunctionsValidateSuiteAnsiOn extends FunctionsValidateSuite {
6666
}
6767
}
6868

69-
abstract class MathFunctionsValidateSuite extends FunctionsValidateSuite {
69+
class MathFunctionsValidateSuite extends FunctionsValidateSuite {
70+
71+
// Disable ANSI mode: Spark 4 enables it by default, which wraps math functions
72+
// in ANSI check nodes and prevents ProjectExecTransformer from being the top-level
73+
// plan node. ANSI-specific behaviour is tested in MathFunctionsValidateSuiteAnsiOn.
74+
override protected def sparkConf: SparkConf = {
75+
super.sparkConf
76+
.set(SQLConf.ANSI_ENABLED.key, "false")
77+
}
7078

7179
disableFallbackCheck
7280
import testImplicits._
@@ -96,7 +104,7 @@ abstract class MathFunctionsValidateSuite extends FunctionsValidateSuite {
96104
}
97105
}
98106

99-
ignore("atan2") {
107+
test("atan2") {
100108
runQueryAndCompare("SELECT atan2(double_field1, 0) from datatab limit 1") {
101109
checkGlutenPlan[ProjectExecTransformer]
102110
}

0 commit comments

Comments
 (0)