MaxGekk commented on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864517671
> If interval '1 2:3' day to minute is casted as interval hour to minute,
interval '25:3' hour to minute doesn't conform to ANSI.
I think the restriction of 0..23 for hours is applicable when it is in
middle. But if the field is the start field, its range is restricted either by
precision, see SQL standard rules:
```
<start field> ::=
<non-second primary datetime field>
[ <left paren> <interval leading field precision> <right paren> ]
<interval leading field precision> ::=
<unsigned integer>
```
We can confirmation of this at the section 4.6.3:
```
Within a value of type interval, the first field is constrained only by the
<interval leading field precision> of the associated <interval qualifier>.
Table 6, “Valid values for fields in INTERVAL values”, specifies the con-
straints on subsequent field values.
```
--
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]