cht42 commented on code in PR #15869:
URL: https://github.com/apache/datafusion/pull/15869#discussion_r2072584358


##########
datafusion/substrait/tests/cases/substrait_validations.rs:
##########
@@ -61,16 +61,41 @@ mod tests {
             let proto_plan =
                 
read_json("tests/testdata/test_plans/simple_select.substrait.json");
             // this is the exact schema of the Substrait plan
-            let df_schema =
-                vec![("a", DataType::Int32, false), ("b", DataType::Int32, 
true)];
+            let df_schema = vec![
+                ("a", DataType::Int32, false),
+                ("b", DataType::Int32, true),
+                (
+                    "c",
+                    DataType::Map(
+                        Arc::new(Field::new_struct(
+                            "entries",
+                            Fields::from(vec![
+                                Field::new("key", DataType::Utf8, false),
+                                Field::new_struct(
+                                    "value",
+                                    Fields::from(vec![Field::new(
+                                        "d",
+                                        DataType::Utf8,
+                                        true,
+                                    )]),
+                                    true,
+                                ),
+                            ]),
+                            true,
+                        )),
+                        false,
+                    ),
+                    true,
+                ),
+            ];
 
             let ctx = generate_context_with_table("DATA", df_schema)?;
             let plan = from_substrait_plan(&ctx.state(), &proto_plan).await?;
 
             assert_snapshot!(
             plan,
             @r#"
-                Projection: DATA.a, DATA.b
+                Projection: DATA.a, DATA.b, DATA.c
                   TableScan: DATA

Review Comment:
   updated with unit tests



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