From 85d3aa9ee69257dbc1045a18fc9a2908a7337c02 Mon Sep 17 00:00:00 2001 From: David Sisson Date: Wed, 5 Jul 2023 01:17:38 -0700 Subject: [PATCH] Updated tests based on recent changes. --- .../data/q6_first_stage.golden.splan | 36 +++++++++---------- .../tests/BinaryToTextPlanConversionTest.cpp | 8 +++-- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/substrait/textplan/converter/data/q6_first_stage.golden.splan b/src/substrait/textplan/converter/data/q6_first_stage.golden.splan index 6034e981..ffb3b3a3 100644 --- a/src/substrait/textplan/converter/data/q6_first_stage.golden.splan +++ b/src/substrait/textplan/converter/data/q6_first_stage.golden.splan @@ -12,14 +12,14 @@ read relation read { and( and( and( - is_not_null(l_shipdate_new)->bool?, - is_not_null(l_discount)->bool?)->bool?, - is_not_null(l_quantity)->bool?)->bool?, - gte(l_shipdate_new, 8766_fp64)->bool?)->bool?, - lt(l_shipdate_new, 9131_fp64)->bool?)->bool?, - gte(l_discount, 0.05_fp64)->bool?)->bool?, - lte(l_discount, 0.07_fp64)->bool?)->bool?, - lt(l_quantity, 24_fp64)->bool?)->bool?; + is_not_null(schema.l_shipdate_new)->bool?, + is_not_null(schema.l_discount)->bool?)->bool?, + is_not_null(schema.l_quantity)->bool?)->bool?, + gte(schema.l_shipdate_new, 8766_fp64)->bool?)->bool?, + lt(schema.l_shipdate_new, 9131_fp64)->bool?)->bool?, + gte(schema.l_discount, 0.05_fp64)->bool?)->bool?, + lte(schema.l_discount, 0.07_fp64)->bool?)->bool?, + lt(schema.l_quantity, 24_fp64)->bool?)->bool?; } filter relation filter { @@ -27,25 +27,25 @@ filter relation filter { and( and( and( - gte(l_shipdate_new, 8766_fp64)->bool?, - lt(l_shipdate_new, 9131_fp64)->bool?)->bool?, - gte(l_discount, 0.05_fp64)->bool?)->bool?, - lte(l_discount, 0.07_fp64)->bool?)->bool?, - lt(l_quantity, 24_fp64)->bool?)->bool?; + gte(schema.l_shipdate_new, 8766_fp64)->bool?, + lt(schema.l_shipdate_new, 9131_fp64)->bool?)->bool?, + gte(schema.l_discount, 0.05_fp64)->bool?)->bool?, + lte(schema.l_discount, 0.07_fp64)->bool?)->bool?, + lt(schema.l_quantity, 24_fp64)->bool?)->bool?; } project relation project { - expression l_extendedprice; - expression l_discount; + expression schema.l_extendedprice; + expression schema.l_discount; - emit l_extendedprice; - emit l_discount; + emit schema.l_extendedprice; + emit schema.l_discount; } aggregate relation aggregate { measure { measure sum( - multiply(l_extendedprice, l_discount)->fp64?)->fp64?@AGGREGATION_PHASE_INITIAL_TO_INTERMEDIATE; + multiply(schema.l_extendedprice, schema.l_discount)->fp64?)->fp64?@AGGREGATION_PHASE_INITIAL_TO_INTERMEDIATE NAMED measurename; } } diff --git a/src/substrait/textplan/converter/tests/BinaryToTextPlanConversionTest.cpp b/src/substrait/textplan/converter/tests/BinaryToTextPlanConversionTest.cpp index e9b6939e..cde3c92a 100644 --- a/src/substrait/textplan/converter/tests/BinaryToTextPlanConversionTest.cpp +++ b/src/substrait/textplan/converter/tests/BinaryToTextPlanConversionTest.cpp @@ -196,6 +196,8 @@ std::vector getTestCases() { "count", "named", "#2", + "cost", + "count", "read", "root"}), WhenSerialized(EqSquashingWhitespace( @@ -321,8 +323,8 @@ std::vector getTestCases() { join relation join { type JOIN_TYPE_UNSPECIFIED; - expression product_id; - post_join count; + expression schema.product_id; + post_join schema.count; } read relation read3 { @@ -332,7 +334,7 @@ std::vector getTestCases() { join relation join2 { type JOIN_TYPE_UNSPECIFIED; - expression order_id; + expression schema3.order_id; } schema schema {