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


##########
datafusion/substrait/tests/cases/roundtrip_logical_plan.rs:
##########
@@ -607,6 +608,15 @@ async fn qualified_catalog_schema_table_reference() -> 
Result<()> {
     roundtrip("SELECT a,b,c,d,e FROM datafusion.public.data;").await
 }
 
+#[tokio::test]
+async fn roundtrip_local_relation() -> Result<()> {
+    let ctx = create_context().await?;
+    let row1 = vec![lit(1), lit("a")];
+    let row2 = vec![lit(2), lit("b")];
+    let plan = LogicalPlanBuilder::values(vec![row1, row2])?.build()?;

Review Comment:
   I agree. For Values plan, these aliases should be be ignored.
   I think we could use `assert_expected_plan` during testing to ignore 
aliases, for example:
   ```rust
   #[tokio::test]
   async fn roundtrip_values() -> Result<()> {
       assert_expected_plan(
           "VALUES (1, 'a', [[1,2,3], []], STRUCT(true, 1))",
           "Values: (Int64(1), Utf8(\"a\"), List([[1, 2, 3], []]), 
Struct({c0:true,c1:1}))",
       )
       .await
   }
   ```
   Additionally, aliases should be ignored when handling `LogicalPlan::Values` 
in `to_substrait_rel`.



-- 
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