vbarua commented on code in PR #23672:
URL: https://github.com/apache/datafusion/pull/23672#discussion_r3625901272
##########
datafusion/substrait/src/logical_plan/producer/rel/read_rel.rs:
##########
@@ -173,25 +138,16 @@ pub fn from_empty_relation(
.iter()
.map(|f| {
let scalar = ScalarValue::try_from(f.data_type())?;
- to_substrait_literal(producer, &scalar)
+ producer.handle_expr(&Expr::Literal(scalar, None),
&empty_schema)
})
.collect::<datafusion::common::Result<_>>()?;
ReadType::VirtualTable(VirtualTable {
- // Use deprecated 'values' field instead of 'expressions' because
the consumer's
- // nested expression support (RexType::Nested) is not yet
implemented.
- // The 'values' field uses literal::Struct which the consumer can
properly
- // deserialize with field name preservation.
- #[expect(deprecated)]
- values: vec![LiteralStruct { fields }],
- expressions: vec![],
Review Comment:
> added a small fix that lets the expressions-based VirtualTable rows
preserve field names for both literal and non-literal cells 👍
Could you expand on what this means? What names are you preserving?
--
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]