waitingkuo commented on PR #6832:
URL:
https://github.com/apache/arrow-datafusion/pull/6832#issuecomment-1642595688
@berkaysynnada @tustvold @alamb
currently we couldn't covert interval back to duration if it contains mons
or days
```bash
❯ select arrow_cast(interval '1 day', 'Duration(Nanosecond)');
Optimizer rule 'simplify_expressions' failed
caused by
Arrow error: Compute error: Cannot cast to Duration(Nanosecond). Overflowing
on 18446744073709551616
```
however pure nanos representation works
```bash
❯ select arrow_cast(interval '24 hours', 'Duration(Nanosecond)');
+----------------------------------------+
| IntervalMonthDayNano("86400000000000") |
+----------------------------------------+
| P1D |
+----------------------------------------+
1 row in set. Query took 0.002 seconds.
```
it make sense to raise error while converting month unit, but for days
should we fix it?
--
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]