From b40ee7099e544c7d6762ad0ae6cbba6e07ce3ce7 Mon Sep 17 00:00:00 2001 From: David Sisson Date: Wed, 21 Feb 2024 16:45:02 -0800 Subject: [PATCH] Add a test around nullability and empty_map types. --- .../textplan/parser/tests/TextPlanParserTest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/substrait/textplan/parser/tests/TextPlanParserTest.cpp b/src/substrait/textplan/parser/tests/TextPlanParserTest.cpp index 9884f2ea..efe517bd 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,12 @@ 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} } } } } } })")), }, {