-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-29502][SQL] typed interval expression should fail for invalid format #26151
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 2 commits
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 |
|---|---|---|
|
|
@@ -435,8 +435,7 @@ class ExpressionParserSuite extends AnalysisTest { | |
| val intervalLiteral = Literal(CalendarInterval.fromString("interval 3 month 1 hour")) | ||
| assertEqual("InterVal 'interval 3 month 1 hour'", intervalLiteral) | ||
| assertEqual("INTERVAL '3 month 1 hour'", intervalLiteral) | ||
| assertEqual("Interval 'interval 3 monthsss 1 hoursss'", | ||
| Literal(null, CalendarIntervalType)) | ||
| intercept("Interval 'interval 3 monthsss 1 hoursss'") | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can refer to the timestamp/date tests just a few lines above.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you check the error message?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test suite defines the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the method has
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. damn, the date and timestamp tests don't specify message, and I thought it doesn't have the message arg... Let me update it now. |
||
|
|
||
| // Binary. | ||
| assertEqual("X'A'", Literal(Array(0x0a).map(_.toByte))) | ||
|
|
||
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.
The error message is still inconsistent.
Invalid intervalvsCannot parse the DATE value: