AngersZhuuuu commented on pull request #32271:
URL: https://github.com/apache/spark/pull/32271#issuecomment-829010078
@MaxGekk I meet a case
IntervalUtils.fromDayTimeString("2:03:04") throw exception
```
[info] Cause: java.lang.IllegalArgumentException: requirement failed:
Interval string must match day-time format of '^(?<sign>[+|-])?(?<day>\d+)
(?<hour>\d{1,2}):(?<minute>\d{1,2}):(?<second>(\d{1,2})(\.(\d{1,9}))?)$':
2:03:04, set spark.sql.legacy.fromDayTimeString.enabled to true to restore the
behavior before Spark 3.0.
```
It's a But right? since `IntervalUtils.fromDayTimeString`'s comment is
```
/**
* Parse dayTime string in form: [-]d HH:mm:ss.nnnnnnnnn and
[-]HH:mm:ss.nnnnnnnnn
*
* adapted from HiveIntervalDayTime.valueOf
*/
def fromDayTimeString(s: String): CalendarInterval = {
fromDayTimeString(s, DAY, 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]