You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/12 05:11:47 UTC

[GitHub] [arrow-datafusion] Jefffrey commented on issue #3204: Interval Literal doesn't work for timeunit less than millisecond

Jefffrey commented on issue #3204:
URL: https://github.com/apache/arrow-datafusion/issues/3204#issuecomment-1312368204

   Seems to be because of this parsing:
   
   https://github.com/apache/arrow-datafusion/blob/129654cd8466e7634bf186782c3d271541f0671e/datafusion/common/src/parsers.rs#L130-L161
   
   Finest granularity is milliseconds, accumulated as an integer, hence fractions of that are silently ignored.
   
   Could change this accumulator to nanoseconds, as `i64`, however this seems it would conflict with `ScalarValue::IntervalDayTime` which stores milliseconds as `i32`, compared to `ScalarValue::IntervalMonthDayNano` which does store nanoseconds.
   
   Might need to change `ScalarValue::IntervalDayTime` to support nanoseconds perhaps? If want to be consistent between precision of `ScalarValue::IntervalMonthDayNano` and `ScalarValue::IntervalDayTime`


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org