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


##########
datafusion/substrait/tests/cases/roundtrip_logical_plan.rs:
##########
@@ -685,6 +685,19 @@ async fn roundtrip_literal_struct() -> Result<()> {
     .await
 }
 
+#[tokio::test]
+async fn roundtrip_values() -> Result<()> {
+    assert_expected_plan(
+        "VALUES (1, 'a', [[-213.1, NULL, 5.5, 2.0, 1.0], []], STRUCT(true, 1, 
CAST(NULL AS STRING))), (NULL, NULL, NULL, NULL)",
+        "Values: (Int64(1), Utf8(\"a\"), List([[-213.1, , 5.5, 2.0, 1.0], 
[]]), Struct({c0:true,c1:1,c2:})), (Int64(NULL), Utf8(NULL), List(), 
Struct({c0:,c1:,c2:}))")
+        .await
+}
+
+#[tokio::test]
+async fn roundtrip_empty_relation() -> Result<()> {
+    roundtrip("SELECT * FROM (VALUES (1)) LIMIT 0").await

Review Comment:
   We might need a test to verify the schemas. For this test, the plan str on 
both sides would just be `EmptyRelation`.



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