Dmitry Lychagin has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/3343
Change subject: [NO ISSUE][COMP] Minor cleanup in VariableCheckAndRewriteVisitor ...................................................................... [NO ISSUE][COMP] Minor cleanup in VariableCheckAndRewriteVisitor - user model changes: no - storage format changes: no - interface changes: no Details: - VariableCheckAndRewriteVisitor should create FieldAccessor expressions when resolving identifiers as field accessors. Currently it produces an internal function call in these cases. FieldAccessor expressions will be converted into internal function calls later by LangExpressionToPlanTranslator. Change-Id: Icaab2a29f787439eebd67e44aa6a9e92df422a98 --- M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/big-object/big_object_groupby/big_object_groupby.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_02/hdfs_02.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_03/hdfs_03.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_shortcircuit/hdfs_shortcircuit.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hints/issue_251_dataset_hint_6/issue_251_dataset_hint_6.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/misc/groupby-orderby-count/groupby-orderby-count.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/open-closed/query-issue456/query-issue456.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/count-nullable/count-nullable.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/spatial/cell-aggregation-with-filtering/cell-aggregation-with-filtering.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/spatial/cell-aggregation/cell-aggregation.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/temporal/overlap_bins_gby_0/overlap_bins_gby_0.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q10_returned_item/q10_returned_item.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q05_local_supplier_volume/q05_local_supplier_volume.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q12_shipping/q12_shipping.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue562/query-issue562.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue810-3/query-issue810-3.3.ast M asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/window/misc_01/misc_01.6.ast M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/Sql92AggregateFunctionVisitor.java M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java 43 files changed, 160 insertions(+), 170 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/43/3343/1 diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/big-object/big_object_groupby/big_object_groupby.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/big-object/big_object_groupby/big_object_groupby.3.ast index 599aee6..732ad9e 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/big-object/big_object_groupby/big_object_groupby.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/big-object/big_object_groupby/big_object_groupby.3.ast @@ -13,9 +13,9 @@ : ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [i] + Field=i ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_02/hdfs_02.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_02/hdfs_02.3.ast index c77a8ea..9a51c0b 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_02/hdfs_02.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_02/hdfs_02.3.ast @@ -13,9 +13,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [token] + Field=token ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_03/hdfs_03.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_03/hdfs_03.3.ast index c77a8ea..9a51c0b 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_03/hdfs_03.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_03/hdfs_03.3.ast @@ -13,9 +13,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [token] + Field=token ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_shortcircuit/hdfs_shortcircuit.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_shortcircuit/hdfs_shortcircuit.3.ast index c77a8ea..9a51c0b 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_shortcircuit/hdfs_shortcircuit.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hdfs/hdfs_shortcircuit/hdfs_shortcircuit.3.ast @@ -13,9 +13,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [token] + Field=token ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hints/issue_251_dataset_hint_6/issue_251_dataset_hint_6.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hints/issue_251_dataset_hint_6/issue_251_dataset_hint_6.3.ast index c77a8ea..9a51c0b 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hints/issue_251_dataset_hint_6/issue_251_dataset_hint_6.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/hints/issue_251_dataset_hint_6/issue_251_dataset_hint_6.3.ast @@ -13,9 +13,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [token] + Field=token ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/misc/groupby-orderby-count/groupby-orderby-count.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/misc/groupby-orderby-count/groupby-orderby-count.3.ast index 3e66487..5d11c79 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/misc/groupby-orderby-count/groupby-orderby-count.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/misc/groupby-orderby-count/groupby-orderby-count.3.ast @@ -13,9 +13,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [token] + Field=token ] ] FROM [ Variable [ Name=$g ] @@ -53,9 +53,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [token] + Field=token ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/open-closed/query-issue456/query-issue456.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/open-closed/query-issue456/query-issue456.3.ast index bd6620d..1df64f9 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/open-closed/query-issue456/query-issue456.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/open-closed/query-issue456/query-issue456.3.ast @@ -6,9 +6,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [x] + Field=x ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/count-nullable/count-nullable.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/count-nullable/count-nullable.3.ast index df45faa..d2e431a 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/count-nullable/count-nullable.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/count-nullable/count-nullable.3.ast @@ -13,9 +13,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [c] + Field=c ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/spatial/cell-aggregation-with-filtering/cell-aggregation-with-filtering.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/spatial/cell-aggregation-with-filtering/cell-aggregation-with-filtering.3.ast index e430618..1e51fca 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/spatial/cell-aggregation-with-filtering/cell-aggregation-with-filtering.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/spatial/cell-aggregation-with-filtering/cell-aggregation-with-filtering.3.ast @@ -98,9 +98,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [t] + Field=t ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/spatial/cell-aggregation/cell-aggregation.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/spatial/cell-aggregation/cell-aggregation.3.ast index 26afbc0..ddd9e25 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/spatial/cell-aggregation/cell-aggregation.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/spatial/cell-aggregation/cell-aggregation.3.ast @@ -47,9 +47,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [o] + Field=o ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/temporal/overlap_bins_gby_0/overlap_bins_gby_0.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/temporal/overlap_bins_gby_0/overlap_bins_gby_0.3.ast index 9ea33d5..ea0f18c 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/temporal/overlap_bins_gby_0/overlap_bins_gby_0.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/temporal/overlap_bins_gby_0/overlap_bins_gby_0.3.ast @@ -41,9 +41,9 @@ : ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [i] + Field=i ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast index 0c2ddfa..bbb66ca 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast @@ -199,9 +199,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast index 7fc1e5b..52fd121 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast @@ -145,9 +145,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.ast index 2bca9a6..535b9fb 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.ast @@ -326,9 +326,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [o1] + Field=o1 ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q10_returned_item/q10_returned_item.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q10_returned_item/q10_returned_item.3.ast index 51d4bfe..cfa8127 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q10_returned_item/q10_returned_item.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q10_returned_item/q10_returned_item.3.ast @@ -356,9 +356,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [locn] + Field=locn ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.3.ast index 51d4bfe..cfa8127 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.3.ast @@ -356,9 +356,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [locn] + Field=locn ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast index fcba5ec..d6c8ace 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast @@ -36,9 +36,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g2 ] - LiteralExpr [STRING] [co] + Field=co ] ] FROM [ Variable [ Name=$g2 ] @@ -147,9 +147,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [gco] + Field=gco ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.ast index f6ee0e7..8aaceb4 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.ast @@ -39,9 +39,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [lp] + Field=lp ] ] FROM [ Variable [ Name=$g ] @@ -74,9 +74,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [lp] + Field=lp ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast index 94cd5e4..4d622d5 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast @@ -341,9 +341,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [t2] + Field=t2 ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.3.ast index 3a660e0..e9fae1a 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.3.ast @@ -13,9 +13,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -40,9 +40,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -68,9 +68,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -95,9 +95,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -122,9 +122,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -149,9 +149,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -176,9 +176,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -203,9 +203,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -230,9 +230,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -257,9 +257,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -284,9 +284,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.3.ast index 731913e..362467d 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.3.ast @@ -40,9 +40,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -87,9 +87,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g2 ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g2 ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.3.ast index d18766b..3cad245 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.3.ast @@ -62,9 +62,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.ast index 1244df6..4b1fa29 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.ast @@ -484,9 +484,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [t4] + Field=t4 ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.3.ast index 0ad2c82..7474a00 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.3.ast @@ -79,9 +79,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [ct] + Field=ct ] ] FROM [ Variable [ Name=$g ] @@ -103,9 +103,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [ct] + Field=ct ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast index 0c2ddfa..bbb66ca 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.ast @@ -199,9 +199,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast index 7fc1e5b..52fd121 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q03_shipping_priority_nt/q03_shipping_priority_nt.3.ast @@ -145,9 +145,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q05_local_supplier_volume/q05_local_supplier_volume.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q05_local_supplier_volume/q05_local_supplier_volume.3.ast index 2bca9a6..535b9fb 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q05_local_supplier_volume/q05_local_supplier_volume.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q05_local_supplier_volume/q05_local_supplier_volume.3.ast @@ -326,9 +326,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [o1] + Field=o1 ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.ast index c30d705..979a913 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q08_national_market_share/q08_national_market_share.3.ast @@ -38,9 +38,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [t] + Field=t ] ] FROM [ Variable [ Name=$g ] @@ -62,9 +62,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [t] + Field=t ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.3.ast index 3ec921a..6d23830 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q09_product_type_profit_nt/q09_product_type_profit_nt.3.ast @@ -25,9 +25,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [profit] + Field=profit ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q12_shipping/q12_shipping.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q12_shipping/q12_shipping.3.ast index 51efec1..1590d2d 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q12_shipping/q12_shipping.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q12_shipping/q12_shipping.3.ast @@ -45,9 +45,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [o] + Field=o ] ] FROM [ Variable [ Name=$g ] @@ -94,9 +94,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [o] + Field=o ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast index e03ea95..21dcbf3 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast @@ -36,9 +36,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g2 ] - LiteralExpr [STRING] [co] + Field=co ] ] FROM [ Variable [ Name=$g2 ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.ast index f6ee0e7..8aaceb4 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q14_promotion_effect/q14_promotion_effect.3.ast @@ -39,9 +39,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [lp] + Field=lp ] ] FROM [ Variable [ Name=$g ] @@ -74,9 +74,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [lp] + Field=lp ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast index 94cd5e4..4d622d5 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast @@ -341,9 +341,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [t2] + Field=t2 ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.3.ast index 3a660e0..e9fae1a 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q17_large_gby_variant/q17_large_gby_variant.3.ast @@ -13,9 +13,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -40,9 +40,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -68,9 +68,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -95,9 +95,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -122,9 +122,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -149,9 +149,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -176,9 +176,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -203,9 +203,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -230,9 +230,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -257,9 +257,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -284,9 +284,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.3.ast index 731913e..362467d 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q18_large_volume_customer/q18_large_volume_customer.3.ast @@ -40,9 +40,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -87,9 +87,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g2 ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g2 ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.3.ast index d18766b..3cad245 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q20_potential_part_promotion/q20_potential_part_promotion.3.ast @@ -62,9 +62,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.ast index 1244df6..4b1fa29 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.ast @@ -484,9 +484,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [t4] + Field=t4 ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.3.ast index 0ad2c82..7474a00 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.3.ast @@ -79,9 +79,9 @@ FunctionCall asterix.count@1[ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [ct] + Field=ct ] ] FROM [ Variable [ Name=$g ] @@ -103,9 +103,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [ct] + Field=ct ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue562/query-issue562.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue562/query-issue562.3.ast index 928d5e2..6dce02e 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue562/query-issue562.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue562/query-issue562.3.ast @@ -206,9 +206,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [ct] + Field=ct ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue810-3/query-issue810-3.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue810-3/query-issue810-3.3.ast index 927a1a3..713dd59 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue810-3/query-issue810-3.3.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/query-issue810-3/query-issue810-3.3.ast @@ -85,9 +85,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -114,9 +114,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -166,9 +166,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] @@ -200,9 +200,9 @@ ] FROM [ ( SELECT ELEMENT [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$g ] - LiteralExpr [STRING] [l] + Field=l ] ] FROM [ Variable [ Name=$g ] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/window/misc_01/misc_01.6.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/window/misc_01/misc_01.6.ast index 94f13a5..b9f6792 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/window/misc_01/misc_01.6.ast +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/window/misc_01/misc_01.6.ast @@ -1,9 +1,9 @@ DataverseUse test Query: SELECT [ -FunctionCall asterix.field-access-by-name@2[ +FieldAccessor [ Variable [ Name=$t1 ] - LiteralExpr [STRING] [c1] + Field=c1 ] c1 WINDOW test.array_sum@1[ @@ -26,9 +26,9 @@ OVER ( PARTITION BY OperatorExpr [ - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$t1 ] - LiteralExpr [STRING] [c2] + Field=c2 ] mod LiteralExpr [LONG] [2] @@ -42,9 +42,9 @@ AS Variable [ Name=$t1 ] ] Orderby - FunctionCall asterix.field-access-by-name@2[ + FieldAccessor [ Variable [ Name=$t1 ] - LiteralExpr [STRING] [c1] + Field=c1 ] ASC diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/Sql92AggregateFunctionVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/Sql92AggregateFunctionVisitor.java index 9f13eb2..6d2dec7 100644 --- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/Sql92AggregateFunctionVisitor.java +++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/Sql92AggregateFunctionVisitor.java @@ -144,7 +144,8 @@ } FieldAccessor faInner = new FieldAccessor(fromBindingVar, groupVarField); faInner.setSourceLocation(usedVar.getSourceLocation()); - Expression faOuter = resolveAsFieldAccess(faInner, usedVar.getVar(), usedVar.getSourceLocation()); + Expression faOuter = VariableCheckAndRewriteVisitor.resolveAsFieldAccess(faInner, usedVar.getVar(), + usedVar.getSourceLocation()); varExprMap.put(usedVar, faOuter); } } @@ -164,13 +165,5 @@ SelectExpression selectExpr = new SelectExpression(null, selectSetOperation, null, null, true); selectExpr.setSourceLocation(sourceLoc); return selectExpr; - } - - // TODO: move to VariableCheckAndRewriteVisitor - private static Expression resolveAsFieldAccess(Expression sourceExpr, VarIdentifier var, SourceLocation sourceLoc) { - VarIdentifier fieldName = SqlppVariableUtil.toUserDefinedVariableName(var.getValue()); - FieldAccessor fa = new FieldAccessor(sourceExpr, fieldName); - fa.setSourceLocation(sourceLoc); - return fa; } } diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java index b883af5..aaf8feb 100644 --- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java +++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java @@ -132,8 +132,7 @@ Set<VariableExpr> contextVars = Scope.findVariablesAnnotatedBy(localVars.keySet(), SqlppVariableAnnotation.CONTEXT_VARIABLE, localVars, sourceLoc); VariableExpr contextVar = pickContextVar(contextVars, varExpr); - String fieldName = SqlppVariableUtil.toUserDefinedVariableName(varId.getValue()).getValue(); - return resolveAsFieldAccess(contextVar, fieldName, sourceLoc); + return resolveAsFieldAccess(contextVar, varId, sourceLoc); } } @@ -160,13 +159,11 @@ } // Rewrites for an field access by name - private Expression resolveAsFieldAccess(VariableExpr var, String fieldName, SourceLocation sourceLoc) { - List<Expression> argList = new ArrayList<>(2); - argList.add(var); - argList.add(new LiteralExpr(new StringLiteral(fieldName))); - CallExpr callExpr = new CallExpr(new FunctionSignature(BuiltinFunctions.FIELD_ACCESS_BY_NAME), argList); - callExpr.setSourceLocation(sourceLoc); - return callExpr; + static Expression resolveAsFieldAccess(Expression sourceExpr, VarIdentifier fieldVar, SourceLocation sourceLoc) { + VarIdentifier fieldName = SqlppVariableUtil.toUserDefinedVariableName(fieldVar.getValue()); + FieldAccessor fa = new FieldAccessor(sourceExpr, fieldName); + fa.setSourceLocation(sourceLoc); + return fa; } private CompilationException createUnresolvableError(String dataverseName, String datasetName, -- To view, visit https://asterix-gerrit.ics.uci.edu/3343 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icaab2a29f787439eebd67e44aa6a9e92df422a98 Gerrit-Change-Number: 3343 Gerrit-PatchSet: 1 Gerrit-Owner: Dmitry Lychagin <dmitry.lycha...@couchbase.com>