Blizzara commented on code in PR #10531:
URL: https://github.com/apache/datafusion/pull/10531#discussion_r1608622303


##########
datafusion/substrait/src/logical_plan/consumer.rs:
##########
@@ -505,7 +507,35 @@ pub async fn from_substrait_rel(
                     _ => Ok(t),
                 }
             }
-            _ => not_impl_err!("Only NamedTable reads are supported"),
+            Some(ReadType::VirtualTable(vt)) => {
+                let base_schema = read
+                    .base_schema
+                    .clone()
+                    .expect("expected schema to exist for virtual table");
+
+                let fields = from_substrait_named_struct(&base_schema)?;
+                let schema = 
DFSchemaRef::new(DFSchema::try_from(Schema::new(fields))?);

Review Comment:
   It probably could, except for the column names - LogicalPlanBuilder::values 
names everything to just `column1` etc. Do you see some benefit to using that 
(and then handling the column names somehow) instead of passing in the schema 
explicitly?



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to