jonahgao commented on code in PR #10531: URL: https://github.com/apache/datafusion/pull/10531#discussion_r1609182533
########## 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: I once wanted to remove the schema, but we need to use it to pass the struct's names, so the current approach should be fine. -- 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