From e3ba63559b79c8533e14935d8aafb909c327dc2d Mon Sep 17 00:00:00 2001 From: David Sisson Date: Wed, 28 Feb 2024 08:52:26 -0800 Subject: [PATCH] Add a test around nullability and empty_map types. (#97) --- src/substrait/textplan/parser/tests/TextPlanParserTest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/substrait/textplan/parser/tests/TextPlanParserTest.cpp b/src/substrait/textplan/parser/tests/TextPlanParserTest.cpp index 9884f2ea..ddfe8094 100644 --- a/src/substrait/textplan/parser/tests/TextPlanParserTest.cpp +++ b/src/substrait/textplan/parser/tests/TextPlanParserTest.cpp @@ -686,6 +686,8 @@ std::vector getTestCases() { R"(project relation literalexamples { expression {42 : "life", 32 : "everything"}_map; expression {}_map; + expression {}_map?; + expression {}_map; })", AsBinaryPlan(EqualsProto<::substrait::proto::Plan>( R"(relations { root { input { project { @@ -696,6 +698,10 @@ std::vector getTestCases() { } } } expressions { literal { empty_map { key { fp32 { nullability: NULLABILITY_REQUIRED } } value { string {nullability: NULLABILITY_REQUIRED } } nullability: NULLABILITY_REQUIRED} } } + expressions { literal { + empty_map { key { fp32 { nullability: NULLABILITY_REQUIRED } } value { string {nullability: NULLABILITY_REQUIRED } } nullability: NULLABILITY_NULLABLE} } } + expressions { literal { + empty_map { key { fp32 { nullability: NULLABILITY_REQUIRED } } value { string {nullability: NULLABILITY_NULLABLE } } nullability: NULLABILITY_REQUIRED} } } } } } })")), }, {