Blizzara commented on code in PR #11597:
URL: https://github.com/apache/datafusion/pull/11597#discussion_r1723393419
##########
datafusion/substrait/src/logical_plan/producer.rs:
##########
@@ -1415,19 +1423,18 @@ fn to_substrait_type(
kind: Some(r#type::Kind::IntervalDay(r#type::IntervalDay {
type_variation_reference: DEFAULT_TYPE_VARIATION_REF,
nullability,
+ precision: Some(3), // DayTime precision is always
milliseconds
})),
}),
IntervalUnit::MonthDayNano => {
- // Substrait doesn't currently support this type, so we
represent it as a UDT
Ok(substrait::proto::Type {
- kind:
Some(r#type::Kind::UserDefined(r#type::UserDefined {
- type_reference: extensions.register_type(
- INTERVAL_MONTH_DAY_NANO_TYPE_NAME.to_string(),
- ),
- type_variation_reference:
DEFAULT_TYPE_VARIATION_REF,
- nullability,
- type_parameters: vec![],
- })),
+ kind: Some(r#type::Kind::IntervalCompound(
Review Comment:
https://github.com/substrait-io/substrait/pull/665 introduced a proper type
for compound intervals consisting of months, days, and subseconds, so we switch
to using that
--
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]