New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-35728][SQL][TESTS] Check multiply/divide of day-time intervals of any fields by numeric #33014
Conversation
@MaxGekk |
@@ -373,7 +371,9 @@ class IntervalExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper { | |||
(Duration.ofDays(9999), 0.0001d) -> Duration.ofDays(9999).dividedBy(10000), | |||
(Duration.ofDays(9999), BigDecimal(0.0001)) -> Duration.ofDays(9999).dividedBy(10000) | |||
).foreach { case ((duration, num), expected) => | |||
checkEvaluation(MultiplyDTInterval(Literal(duration), Literal(num)), expected) | |||
DataTypeTestUtils.dayTimeIntervalTypes.foreach { dt => | |||
checkEvaluation(MultiplyDTInterval(Literal(duration, dt), Literal(num)), expected) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove the two occurrences of the following comment.
// TODO(SPARK-35728): Check multiply/divide of day-time intervals of any fields by numeric
Can one of the admins verify this patch? |
@Peng-Lei Don't think so. Especially about /
This type doesn't loose info at least. I would consider |
@MaxGekk Thank you for your explanation. Special cases |
The test failure seems to be related:
|
Thank you. I will research it |
7a5e722
to
e3b5fc2
Compare
@MaxGekk I use |
@Peng-Lei Do you mean "instead of Literal(duration)"? |
Highly likely, the changes are not related to the build failure:
|
What changes were proposed in this pull request?
INTERVAL DAY
INTERVAL DAY TO HOUR
INTERVAL DAY TO MINUTE
INTERVAL HOUR
INTERVAL HOUR TO MINUTE
INTERVAL HOUR TO SECOND
INTERVAL MINUTE
INTERVAL MINUTE TO SECOND
INTERVAL SECOND
Why are the changes needed?
Add testcase coverage.
Does this PR introduce any user-facing change?
no
How was this patch tested?
existed testcase