Skip to content
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][SPARK-35778][SQL][TESTS] Check multiply/divide of day-time and year-month interval of any fields by a numeric #33080

Closed
wants to merge 3 commits into from

Conversation

Peng-Lei
Copy link
Contributor

@Peng-Lei Peng-Lei commented Jun 25, 2021

What changes were proposed in this pull request?

SPARK-35728: Add test case to check multiply/divide of day-time
intervals of any fields by numeric
SPARK-35778: Add test case to check multiply/divide of year-month intervals of any fields by numeric

Why are the changes needed?

Improve test coverage

Does this PR introduce any user-facing change?

No

How was this patch tested?

Add ut tests

Lead-authored-by: Lei Peng peng.8lei@gmail.com
Co-authored-by: AngersZhuuuu angers.zhu@gmail.com

@github-actions github-actions bot added the SQL label Jun 25, 2021
@Peng-Lei
Copy link
Contributor Author

Peng-Lei commented Jun 25, 2021

@AngersZhuuuu @MaxGekk I tried to test multiply/divide of day-time intervals of any fields by numeric in two ways. First method is simple, but it is incomplete, because it does not use checkEvaluation. just compare the eval(). Second method is enumerate data to test. I'll delete one way, what about your suggestion? Thank you.

@AngersZhuuuu
Copy link
Contributor

ok to test

}
}

test("SPARK-35778: Check multiply/divide of year-month intervals of any fields by numeric 1") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have two ut for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to test multiply/divide of day-time intervals of any fields by numeric in two ways. First method is simple, but it is incomplete, because it does not use checkEvaluation. just compare the eval(). Second method is enumerate data to test. I'll delete one way, what about your suggestion? Thank you.

}
}

test("SPARK-35778: Check multiply/divide of year-month intervals of any fields by numeric 2") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This UT seems can cover all type field of YearMonthIntervalType

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

Peng-Lei and others added 3 commits June 28, 2021 14:26
Check multiply/divide day time interval and year month interval type
of any fields by numeric
@MaxGekk MaxGekk changed the title [SPARK-35728][SPARK-35778][FOLLOWUP][TESTS] Add test case to check multiply/divide of day-time interval and year-month interval of any fields by a numeric [SPARK-35728][SPARK-35778][TESTS] Add test case to check multiply/divide of day-time interval and year-month interval of any fields by a numeric Jun 28, 2021
@MaxGekk MaxGekk changed the title [SPARK-35728][SPARK-35778][TESTS] Add test case to check multiply/divide of day-time interval and year-month interval of any fields by a numeric [SPARK-35728][SPARK-35778][TESTS] Add test case to check multiply/divide of day-time and year-month interval of any fields by a numeric Jun 28, 2021
@MaxGekk MaxGekk changed the title [SPARK-35728][SPARK-35778][TESTS] Add test case to check multiply/divide of day-time and year-month interval of any fields by a numeric [SPARK-35728][SPARK-35778][TESTS] Check multiply/divide of day-time and year-month interval of any fields by a numeric Jun 28, 2021
@MaxGekk
Copy link
Member

MaxGekk commented Jun 28, 2021

+1, LGTM. Merging to master.
Thank you, @Peng-Lei and @AngersZhuuuu for review.

@MaxGekk MaxGekk changed the title [SPARK-35728][SPARK-35778][TESTS] Check multiply/divide of day-time and year-month interval of any fields by a numeric [SPARK-35728][SPARK-35778][SQL][TESTS] Check multiply/divide of day-time and year-month interval of any fields by a numeric Jun 28, 2021
@MaxGekk MaxGekk closed this in 356aef4 Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants