This is an automated email from the ASF dual-hosted git repository.
viirya pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
The following commit(s) were added to refs/heads/main by this push:
new d6d8620 test: Suppress decimal random number tests for 3.2 and 3.3
(#319)
d6d8620 is described below
commit d6d862004d6bc2537168b41dcc69b3b4349f0d25
Author: KAZUYUKI TANIMURA <[email protected]>
AuthorDate: Thu Apr 25 11:11:49 2024 -0700
test: Suppress decimal random number tests for 3.2 and 3.3 (#319)
---
spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala
b/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala
index ce9a7cd..376baa3 100644
--- a/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala
+++ b/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala
@@ -1290,6 +1290,7 @@ class CometExpressionSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
}
test("Decimal random number tests") {
+ assume(isSpark34Plus) // Only Spark 3.4+ has the fix for SPARK-45786
val rand = scala.util.Random
def makeNum(p: Int, s: Int): String = {
val int1 = rand.nextLong()
@@ -1316,11 +1317,7 @@ class CometExpressionSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
"spark.sql.decimalOperations.allowPrecisionLoss" ->
allowPrecisionLoss.toString) {
val a = makeNum(p1, s1)
val b = makeNum(p2, s2)
- var ops = Seq("+", "-")
- if (isSpark34Plus) {
- // These operations are only supported in Spark 3.4+
- ops = ops ++ Seq("*", "/", "%")
- }
+ var ops = Seq("+", "-", "*", "/", "%")
for (op <- ops) {
checkSparkAnswerAndOperator(s"select a, b, a $op b from $table")
checkSparkAnswerAndOperator(s"select $a, b, $a $op b from
$table")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]