mbutrovich commented on issue #14738:
URL: https://github.com/apache/datafusion/issues/14738#issuecomment-6372885638
> I also confirmed that the interval-semantics portion of this issue was
fixed by #14817, so I intend to target only the remaining `Duration` path.
@Nisarg0007 are you still working on this? `Interval` also drops the
fraction past `i32::MAX` nanoseconds, as `Duration` does:
```sql
SELECT extract(millisecond from interval '62.5 seconds'),
extract(millisecond from arrow_cast(2500000000,
'Duration(Nanosecond)'));
-- 2000, 2000 (expected 2500, 2500)
```
As I read it, [this
branch](https://github.com/apache/datafusion/blob/6bb92bb3f2790ed6fdffadea2965ca473fdba501/datafusion/functions/src/datetime/date_part.rs#L491-L499)
treats the overflowed nanoseconds as zero.
> Would a local fix be appropriate here?
#26676 fixes the same overflow for `EXTRACT(EPOCH)` in `date_part.rs` by
computing from the `i64` value. Should `second`, `millisecond` and
`microsecond` do the same?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]