You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interval Literal doesn't work for timeunit less than millisecond #3204
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
Edit: though since IntervalDayTime is an Arrow type, maybe just have that if fractions of milliseconds is found, then the result should always be a IntervalMonthDayNano to support keeping this precision, and thus not forcing IntervalDayTime to silently drop those fractional parts?
Activity
Jefffrey commentedon Nov 12, 2022
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 withScalarValue::IntervalDayTimewhich stores milliseconds asi32, compared toScalarValue::IntervalMonthDayNanowhich does store nanoseconds.Might need to change
ScalarValue::IntervalDayTimeto support nanoseconds perhaps? If want to be consistent between precision ofScalarValue::IntervalMonthDayNanoandScalarValue::IntervalDayTimeEdit: though since
IntervalDayTimeis an Arrow type, maybe just have that if fractions of milliseconds is found, then the result should always be aIntervalMonthDayNanoto support keeping this precision, and thus not forcingIntervalDayTimeto silently drop those fractional parts?