You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2023/11/21 18:18:09 UTC
(spark) branch branch-3.5 updated: [SPARK-46033][SQL][TESTS] Fix flaky ArithmeticExpressionSuite
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.5 by this push:
new ece4ebe5757 [SPARK-46033][SQL][TESTS] Fix flaky ArithmeticExpressionSuite
ece4ebe5757 is described below
commit ece4ebe575798bf92d8e6c2c454c62e6cbfecf01
Author: panbingkun <pb...@gmail.com>
AuthorDate: Tue Nov 21 10:17:30 2023 -0800
[SPARK-46033][SQL][TESTS] Fix flaky ArithmeticExpressionSuite
### What changes were proposed in this pull request?
The pr aims to fix flaky ArithmeticExpressionSuite.
https://github.com/panbingkun/spark/actions/runs/6940660146/job/18879997046
<img width="1000" alt="image" src="https://github.com/apache/spark/assets/15246973/9fe6050a-7a06-4110-9152-d4512a49b284">
### Why are the changes needed?
Fix bug.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
- Manually test.
- Pass GA.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #43935 from panbingkun/SPARK-46033.
Authored-by: panbingkun <pb...@gmail.com>
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
(cherry picked from commit b7930e718f453f8a9d923ad57161a982f16ca8e8)
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
.../spark/sql/catalyst/expressions/ArithmeticExpressionSuite.scala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ArithmeticExpressionSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ArithmeticExpressionSuite.scala
index 2dc7e82f772..7a80188d445 100644
--- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ArithmeticExpressionSuite.scala
+++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ArithmeticExpressionSuite.scala
@@ -326,7 +326,8 @@ class ArithmeticExpressionSuite extends SparkFunSuite with ExpressionEvalHelper
val quotResult = Decimal(quotExact.setScale(quotType.scale, RoundingMode.HALF_UP))
val quotExpected =
if (quotResult.precision > DecimalType.MAX_PRECISION) null else quotResult
- checkEvaluationOrException(quotActual, quotExpected.toLong)
+ checkEvaluationOrException(quotActual,
+ if (quotExpected == null) null else quotExpected.toLong)
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org