lorenarosati commented on code in PR #16857: URL: https://github.com/apache/datafusion/pull/16857#discussion_r2225787214
########## datafusion/substrait/src/logical_plan/consumer/rel/read_rel.rs: ########## @@ -114,14 +114,37 @@ pub async fn from_read_rel( .await } Some(ReadType::VirtualTable(vt)) => { - if vt.values.is_empty() { + if vt.values.is_empty() && vt.expressions.is_empty() { return Ok(LogicalPlan::EmptyRelation(EmptyRelation { produce_one_row: false, schema: DFSchemaRef::new(substrait_schema), })); } - let values = vt + let values = if vt.values.is_empty() { Review Comment: Made this change! ########## datafusion/substrait/tests/testdata/test_plans/select_count_from_select_1_virtual_table_expressions.substrait.json: ########## @@ -0,0 +1,94 @@ +{ Review Comment: Made this change! -- 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