tokoko commented on code in PR #12800:
URL: https://github.com/apache/datafusion/pull/12800#discussion_r1792350577
##########
datafusion/substrait/src/logical_plan/consumer.rs:
##########
@@ -865,9 +846,16 @@ pub async fn from_substrait_rel(
let name = filename.unwrap();
// directly use unwrap here since we could determine it is a
valid one
let table_reference = TableReference::Bare { table:
name.into() };
- let t = ctx.table(table_reference).await?;
- let t = t.into_optimized_plan()?;
- extract_projection(t, &read.projection)
+ let t = ctx.table(table_reference.clone()).await?;
+
+ let substrait_schema =
+ from_substrait_named_struct(named_struct, extensions)?
+ .replace_qualifier(table_reference);
+
+ let substrait_schema =
Review Comment:
yeah, this was deliberate to keep the PR smaller. I'll do the refactor
separately if you don't mind. VirtualTable is an odd case, you don't really
need schema compatibility check there, so better to leave that design to a
different PR imho.
--
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]