cloud-fan commented on a change in pull request #26285: [SPARK-29623][SQL] do 
not allow multiple unit TO unit statements in interval literal syntax
URL: https://github.com/apache/spark/pull/26285#discussion_r340540641
 
 

 ##########
 File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala
 ##########
 @@ -632,7 +632,7 @@ class ExpressionParserSuite extends AnalysisTest {
 
     // Non Existing unit
     intercept("interval 10 nanoseconds",
-      "no viable alternative at input 'interval 10 nanoseconds'")
+      "missing {'DAY', 'DAYS', 'HOUR'", "'YEAR', 'YEARS'} at 'nanoseconds'")
 
 Review comment:
   The new message is better. Users can turn it into a valid SQL like `interval 
10 day nanoseconds`, which creates a interval literal and give an alias. The 
new error message suggests it.

----------------------------------------------------------------
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]

Reply via email to