cloud-fan commented on a change in pull request #26514: [SPARK-29888][SQL] new
interval string parser shall handle numeric with on fractional part
URL: https://github.com/apache/spark/pull/26514#discussion_r346294057
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/IntervalUtils.scala
##########
@@ -496,6 +496,14 @@ object IntervalUtils {
state = TRIM_BEFORE_SIGN
case TRIM_BEFORE_SIGN => trimToNextState(b, SIGN)
case SIGN =>
+ currentValue = 0
+ fraction = 0
+ // We preset next state from SIGN to TRIM_BEFORE_VALUE. If we meet
'.' in the SIGN state,
Review comment:
agree. @yaooqinn can you refine the comments to explain why? We should
mention that it's to support `.1 second`
----------------------------------------------------------------
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]