dongjoon-hyun commented on a change in pull request #26438: [SPARK-29408][SQL] 
Support sign before `interval` in interval literals
URL: https://github.com/apache/spark/pull/26438#discussion_r344470727
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
 ##########
 @@ -1948,7 +1959,8 @@ class AstBuilder(conf: SQLConf) extends 
SqlBaseBaseVisitor[AnyRef] with Logging
           "Can only have a single from-to unit in the interval literal syntax",
           errorCtx)
       }
-      Literal(visitUnitToUnitInterval(innerCtx.body), CalendarIntervalType)
+      val interval = applySign(visitUnitToUnitInterval(innerCtx.body))
 
 Review comment:
   ```scala
   -      val interval = applySign(visitUnitToUnitInterval(innerCtx.body))
   +      val interval = applySign(ctx.sign, 
visitUnitToUnitInterval(innerCtx.body))
   ```

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