cloud-fan commented on a change in pull request #26491: [SPARK-29870][SQL]
Unify the logic of multi-units interval string to CalendarInterval
URL: https://github.com/apache/spark/pull/26491#discussion_r345720577
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLParserSuite.scala
##########
@@ -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")
Review comment:
This actually exposes a problem of `stringToInterval`: the error reporting
becomes worse.
I think the reason is `stringToInterval` returns null to indicate invalid
input, but then there is no chance to know what is the exact failure. Can we
make `stringToInterval` throw exception? cc @MaxGekk
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]