This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new b7930e718f4 [SPARK-46033][SQL][TESTS] Fix flaky
ArithmeticExpressionSuite
b7930e718f4 is described below
commit b7930e718f453f8a9d923ad57161a982f16ca8e8
Author: panbingkun <[email protected]>
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 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
.../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: [email protected]
For additional commands, e-mail: [email protected]