Skip to content

Commit

Permalink
Add a test around nullability and empty_map types. (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonPrime authored Feb 28, 2024
1 parent e26585f commit e3ba635
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/substrait/textplan/parser/tests/TextPlanParserTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,8 @@ std::vector<TestCase> getTestCases() {
R"(project relation literalexamples {
expression {42 : "life", 32 : "everything"}_map<i16, string>;
expression {}_map<fp32, string>;
expression {}_map?<fp32, string>;
expression {}_map<fp32, string?>;
})",
AsBinaryPlan(EqualsProto<::substrait::proto::Plan>(
R"(relations { root { input { project {
Expand All @@ -696,6 +698,10 @@ std::vector<TestCase> 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} } }
} } } })")),
},
{
Expand Down

0 comments on commit e3ba635

Please sign in to comment.