-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29870][SQL] Unify the logic of multi-units interval string to CalendarInterval #26491
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
Changes from 3 commits
49b74c3
803d454
ed3b35f
79f5892
0814fc4
3b1667e
8ad53bc
5aa09ca
f6a9424
da7f9e8
61626ff
e12bb86
89dd64f
50bfd2e
32d5194
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -789,7 +789,7 @@ class DDLParserSuite extends AnalysisTest with SharedSparkSession { | |
| assertError("select interval '23:61:15' hour to second", | ||
| "minute 61 outside range [0, 59]") | ||
| assertError("select interval '.1111111111' second", | ||
| "nanosecond 1111111111 outside range") | ||
| "Invalid interval string") | ||
|
||
| } | ||
|
|
||
| test("use native json_tuple instead of hive's UDTF in LATERAL VIEW") { | ||
|
|
||
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.
when we at here, the parsing is already done by antlr, so this may make things slower. But it's better to unify the code as the perf doesn't matter that much for interval literals.
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.
yes, the performance improvement is actually for type constructor to parse interval string literals, which can't be seen via code change.
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.
https://github.com/apache/spark/pull/26491/files#diff-9847f5cef7cf7fbc5830fbc6b779ee10R1875
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.
With a particular modified
IntervalBenchmarktest, which mocks the type constructor logic, which is directly different with anIntervalUtils.fromStringcall only.we can see huge perfomance improment here. Any way, this is just used to parse typed literals, not a big deal acturally.