gabotechs commented on code in PR #17655:
URL: https://github.com/apache/datafusion/pull/17655#discussion_r2362591605
##########
datafusion/substrait/src/logical_plan/consumer/expr/literal.rs:
##########
@@ -155,6 +155,29 @@ pub(crate) fn from_substrait_literal(
}
},
Some(LiteralType::Date(d)) => ScalarValue::Date32(Some(*d)),
+ Some(LiteralType::PrecisionTime(pt)) => match pt.precision {
+ 6 => match lit.type_variation_reference {
Review Comment:
Nice, I imagine if we wanted to support the rest of the type variations it
would looks something like:
```rust
0 => match lit.type_variation_reference {
TIME_32_TYPE_VARIATION_REF => {
ScalarValue::Time32Second(Some(pt.value as i32))
}
others => {
return substrait_err!("Unknown type variation reference
{others}");
}
},
3 => match lit.type_variation_reference {
TIME_32_TYPE_VARIATION_REF => {
ScalarValue::Time32Millisecond(Some(pt.value as i32))
}
others => {
return substrait_err!("Unknown type variation reference
{others}");
}
},
```
If you are up for the ride I think we could also add them, otherwise I think
it's fine as is
--
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]