asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [1/3] asterixdb git commit: ASTERIXDB-1572 and ASTERIXDB-1591: fix and regression tests.
Date Sun, 11 Sep 2016 05:04:22 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master b4a9a89b7 -> 834e17314


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/834e1731/asterixdb/asterix-app/src/test/resources/runtimets/results/tpcds/query-ASTERIXDB-1591/query-ASTERIXDB-1591.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/tpcds/query-ASTERIXDB-1591/query-ASTERIXDB-1591.1.adm
b/asterixdb/asterix-app/src/test/resources/runtimets/results/tpcds/query-ASTERIXDB-1591/query-ASTERIXDB-1591.1.adm
new file mode 100644
index 0000000..d2aaa79
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/tpcds/query-ASTERIXDB-1591/query-ASTERIXDB-1591.1.adm
@@ -0,0 +1 @@
+{ "c": { "c_customer_sk": 1, "c_customer_id": "AAAAAAAABAAAAAAA", "c_current_cdemo_sk": 980124,
"c_current_hdemo_sk": 7135, "c_current_addr_sk": 13513, "c_first_shipto_date_sk": 2452238,
"c_first_sales_date_sk": 2452208, "c_salutation": "Mr.", "c_first_name": "Javier", "c_last_name":
"Lewis", "c_preferred_cust_flag": "Y", "c_birth_day": 9, "c_birth_month": 12, "c_birth_year":
1936, "c_birth_country": "CHILE", "c_login": null, "c_email_address": "Javier.Lewis@VFAxlnZEvOx.org",
"c_last_review_date": "2452508" }, "ca": { "ca_address_sk": 13513, "ca_address_id": "AAAAAAAAJMEDAAAA",
"ca_street_number": "545", "ca_street_name": "Meadow ", "ca_street_type": "RD", "ca_suite_number":
"Suite X", "ca_city": "Crystal", "ca_county": "DeKalb County", "ca_state": "MO", "ca_zip":
"65258", "ca_country": "United States", "ca_gmt_offset": -6.0, "ca_location_type": "condo"
} }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/834e1731/asterixdb/asterix-app/src/test/resources/runtimets/results/tpcds/query-ASTERIXDB-1596/query-ASTERIXDB-1596.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/tpcds/query-ASTERIXDB-1596/query-ASTERIXDB-1596.1.adm
b/asterixdb/asterix-app/src/test/resources/runtimets/results/tpcds/query-ASTERIXDB-1596/query-ASTERIXDB-1596.1.adm
index 4fef5d9..6c8c02c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/tpcds/query-ASTERIXDB-1596/query-ASTERIXDB-1596.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/tpcds/query-ASTERIXDB-1596/query-ASTERIXDB-1596.1.adm
@@ -1,8 +1,8 @@
-{ "cs1": { "cs_sold_date_sk": 2450815, "cs_sold_time_sk": 38212, "cs_ship_date_sk": 2450886,
"cs_bill_customer_sk": 62153, "cs_bill_cdemo_sk": 1822764, "cs_bill_hdemo_sk": 5775, "cs_bill_addr_sk":
19986, "cs_ship_customer_sk": 62153, "cs_ship_cdemo_sk": 1822764, "cs_ship_hdemo_sk": 5775,
"cs_ship_addr_sk": 19986, "cs_call_center_sk": 4, "cs_catalog_page_sk": 62, "cs_ship_mode_sk":
3, "cs_warehouse_sk": 4, "cs_item_sk": 1, "cs_promo_sk": 196, "cs_order_number": 1, "cs_quantity":
47, "cs_wholesale_cost": 27.7, "cs_list_price": 44.32, "cs_sales_price": 42.99, "cs_ext_discount_amt":
62.51, "cs_ext_sales_price": 2020.53, "cs_ext_wholesale_cost": 1301.9, "cs_ext_list_price":
2083.04, "cs_ext_tax": 101.02, "cs_coupon_amt": 0.0, "cs_ext_ship_cost": 1041.52, "cs_net_paid":
2020.53, "cs_net_paid_inc_tax": 2121.55, "cs_net_paid_inc_ship": 3062.05, "cs_net_paid_inc_ship_tax":
3163.07, "cs_net_profit": 718.63 }, "i1": { "i_item_sk": 1, "i_item_id": "AAAAAAABAAAAAAA",
"i_rec_start_date": "1997-10
 -27", "i_rec_end_date": null, "i_item_desc": "Powers will not get influences. Electoral ports
should show low, annual chains. Now young visitors may pose now however final pages. Bitterly
right children suit increasing, leading el", "i_current_price": 27.02, "i_wholesale_cost":
23.23, "i_brand_id": 5003002, "i_brand": "exportischolar #2", "i_class_id": 3, "i_class":
"pop", "i_category_id": 5, "i_category": "Music", "i_manufact_id": 52, "i_manufact": "ableanti",
"i_size": "N/A", "i_formulation": "3663peru009490160959", "i_color": "spring", "i_units":
"Tsp", "i_container": "Unknown", "i_manager_id": 6, "i_product_name": "ought" } }
+{ "cs1": { "cs_sold_date_sk": 2450815, "cs_sold_time_sk": 38212, "cs_ship_date_sk": 2450886,
"cs_bill_customer_sk": 1, "cs_bill_cdemo_sk": 1822764, "cs_bill_hdemo_sk": 5775, "cs_bill_addr_sk":
19986, "cs_ship_customer_sk": 1, "cs_ship_cdemo_sk": 1822764, "cs_ship_hdemo_sk": 5775, "cs_ship_addr_sk":
19986, "cs_call_center_sk": 4, "cs_catalog_page_sk": 62, "cs_ship_mode_sk": 3, "cs_warehouse_sk":
4, "cs_item_sk": 1, "cs_promo_sk": 196, "cs_order_number": 1, "cs_quantity": 47, "cs_wholesale_cost":
27.7, "cs_list_price": 44.32, "cs_sales_price": 42.99, "cs_ext_discount_amt": 62.51, "cs_ext_sales_price":
2020.53, "cs_ext_wholesale_cost": 1301.9, "cs_ext_list_price": 2083.04, "cs_ext_tax": 101.02,
"cs_coupon_amt": 0.0, "cs_ext_ship_cost": 1041.52, "cs_net_paid": 2020.53, "cs_net_paid_inc_tax":
2121.55, "cs_net_paid_inc_ship": 3062.05, "cs_net_paid_inc_ship_tax": 3163.07, "cs_net_profit":
718.63 }, "i1": { "i_item_sk": 1, "i_item_id": "AAAAAAABAAAAAAA", "i_rec_start_date": "1997-10-27",
"i
 _rec_end_date": null, "i_item_desc": "Powers will not get influences. Electoral ports should
show low, annual chains. Now young visitors may pose now however final pages. Bitterly right
children suit increasing, leading el", "i_current_price": 27.02, "i_wholesale_cost": 23.23,
"i_brand_id": 5003002, "i_brand": "exportischolar #2", "i_class_id": 3, "i_class": "pop",
"i_category_id": 5, "i_category": "Music", "i_manufact_id": 52, "i_manufact": "ableanti",
"i_size": "N/A", "i_formulation": "3663peru009490160959", "i_color": "spring", "i_units":
"Tsp", "i_container": "Unknown", "i_manager_id": 6, "i_product_name": "ought" } }
 { "cs1": { "cs_sold_date_sk": 2450815, "cs_sold_time_sk": 29485, "cs_ship_date_sk": 2450862,
"cs_bill_customer_sk": 14601, "cs_bill_cdemo_sk": 797995, "cs_bill_hdemo_sk": 6189, "cs_bill_addr_sk":
9583, "cs_ship_customer_sk": 14601, "cs_ship_cdemo_sk": 797995, "cs_ship_hdemo_sk": 6189,
"cs_ship_addr_sk": 9583, "cs_call_center_sk": 1, "cs_catalog_page_sk": 23, "cs_ship_mode_sk":
16, "cs_warehouse_sk": 5, "cs_item_sk": 1, "cs_promo_sk": 272, "cs_order_number": 3, "cs_quantity":
45, "cs_wholesale_cost": 9.54, "cs_list_price": 23.37, "cs_sales_price": 21.5, "cs_ext_discount_amt":
84.15, "cs_ext_sales_price": 967.5, "cs_ext_wholesale_cost": 429.3, "cs_ext_list_price": 1051.65,
"cs_ext_tax": 21.76, "cs_coupon_amt": 725.62, "cs_ext_ship_cost": 294.3, "cs_net_paid": 241.88,
"cs_net_paid_inc_tax": 263.64, "cs_net_paid_inc_ship": 536.18, "cs_net_paid_inc_ship_tax":
557.94, "cs_net_profit": -187.42 }, "i1": { "i_item_sk": 1, "i_item_id": "AAAAAAABAAAAAAA",
"i_rec_start_date": "1997-10-27", "i_r
 ec_end_date": null, "i_item_desc": "Powers will not get influences. Electoral ports should
show low, annual chains. Now young visitors may pose now however final pages. Bitterly right
children suit increasing, leading el", "i_current_price": 27.02, "i_wholesale_cost": 23.23,
"i_brand_id": 5003002, "i_brand": "exportischolar #2", "i_class_id": 3, "i_class": "pop",
"i_category_id": 5, "i_category": "Music", "i_manufact_id": 52, "i_manufact": "ableanti",
"i_size": "N/A", "i_formulation": "3663peru009490160959", "i_color": "spring", "i_units":
"Tsp", "i_container": "Unknown", "i_manager_id": 6, "i_product_name": "ought" } }
-{ "cs1": { "cs_sold_date_sk": 2450815, "cs_sold_time_sk": 38212, "cs_ship_date_sk": 2450846,
"cs_bill_customer_sk": 62153, "cs_bill_cdemo_sk": 1822764, "cs_bill_hdemo_sk": 5775, "cs_bill_addr_sk":
19986, "cs_ship_customer_sk": 62153, "cs_ship_cdemo_sk": 1822764, "cs_ship_hdemo_sk": 5775,
"cs_ship_addr_sk": 19986, "cs_call_center_sk": 4, "cs_catalog_page_sk": 31, "cs_ship_mode_sk":
8, "cs_warehouse_sk": 2, "cs_item_sk": 2, "cs_promo_sk": 270, "cs_order_number": 1, "cs_quantity":
20, "cs_wholesale_cost": 87.55, "cs_list_price": 260.89, "cs_sales_price": 153.92, "cs_ext_discount_amt":
2139.4, "cs_ext_sales_price": 3078.4, "cs_ext_wholesale_cost": 1751.0, "cs_ext_list_price":
5217.8, "cs_ext_tax": 71.41, "cs_coupon_amt": 1292.92, "cs_ext_ship_cost": 1356.6, "cs_net_paid":
1785.48, "cs_net_paid_inc_tax": 1856.89, "cs_net_paid_inc_ship": 3142.08, "cs_net_paid_inc_ship_tax":
3213.49, "cs_net_profit": 34.48 }, "i1": { "i_item_sk": 2, "i_item_id": "AAAAAAAACAAAAAAA",
"i_rec_start_date": "199
 7-10-27", "i_rec_end_date": "2000-10-26", "i_item_desc": "False opportunities would run alone
with a views. Early approaches would show inc, european intentions; important, main passages
shall know urban, ", "i_current_price": 1.12, "i_wholesale_cost": 0.38, "i_brand_id": 1001001,
"i_brand": "amalgamalg #1", "i_class_id": 1, "i_class": "dresses", "i_category_id": 1, "i_category":
"Women", "i_manufact_id": 294, "i_manufact": "esen stable", "i_size": "petite", "i_formulation":
"516steel060826230906", "i_color": "rosy", "i_units": "Bunch", "i_container": "Unknown", "i_manager_id":
98, "i_product_name": "able" } }
-{ "cs1": { "cs_sold_date_sk": 2450815, "cs_sold_time_sk": 38212, "cs_ship_date_sk": 2450851,
"cs_bill_customer_sk": 62153, "cs_bill_cdemo_sk": 1822764, "cs_bill_hdemo_sk": 5775, "cs_bill_addr_sk":
19986, "cs_ship_customer_sk": 62153, "cs_ship_cdemo_sk": 1822764, "cs_ship_hdemo_sk": 5775,
"cs_ship_addr_sk": 19986, "cs_call_center_sk": 4, "cs_catalog_page_sk": 89, "cs_ship_mode_sk":
15, "cs_warehouse_sk": 2, "cs_item_sk": 2, "cs_promo_sk": 284, "cs_order_number": 2, "cs_quantity":
50, "cs_wholesale_cost": 70.0, "cs_list_price": 205.1, "cs_sales_price": 188.69, "cs_ext_discount_amt":
820.5, "cs_ext_sales_price": 9434.5, "cs_ext_wholesale_cost": 3500.0, "cs_ext_list_price":
10255.0, "cs_ext_tax": 377.38, "cs_coupon_amt": 0.0, "cs_ext_ship_cost": 4307.0, "cs_net_paid":
9434.5, "cs_net_paid_inc_tax": 9811.88, "cs_net_paid_inc_ship": 13741.5, "cs_net_paid_inc_ship_tax":
14118.88, "cs_net_profit": 5934.5 }, "cr1": { "cr_returned_date_sk": 2450926, "cr_returned_time_sk":
45816, "cr_item_sk":
  2, "cr_refunded_customer_sk": 14601, "cr_refunded_cdemo_sk": 797995, "cr_refunded_hdemo_sk":
6189, "cr_refunded_addr_sk": 9583, "cr_returning_customer_sk": 14601, "cr_returning_cdemo_sk":
797995, "cr_returning_hdemo_sk": 4703, "cr_returning_addr_sk": 9583, "cr_call_center_sk":
1, "cr_catalog_page_sk": 106, "cr_ship_mode_sk": 2, "cr_warehouse_sk": 2, "cr_reason_sk":
30, "cr_order_number": 2, "cr_return_quantity": 47, "cr_return_amount": 3888.31, "cr_return_tax":
233.29, "cr_return_amt_inc_tax": 4121.6, "cr_fee": 91.23, "cr_return_ship_cost": 1348.9, "cr_refunded_cash":
3577.24, "cr_reversed_charge": 186.64, "cr_store_credit": 124.43, "cr_net_loss": 1673.42 },
"i1": { "i_item_sk": 2, "i_item_id": "AAAAAAAACAAAAAAA", "i_rec_start_date": "1997-10-27",
"i_rec_end_date": "2000-10-26", "i_item_desc": "False opportunities would run alone with a
views. Early approaches would show inc, european intentions; important, main passages shall
know urban, ", "i_current_price": 1.12, "i_wholesale_co
 st": 0.38, "i_brand_id": 1001001, "i_brand": "amalgamalg #1", "i_class_id": 1, "i_class":
"dresses", "i_category_id": 1, "i_category": "Women", "i_manufact_id": 294, "i_manufact":
"esen stable", "i_size": "petite", "i_formulation": "516steel060826230906", "i_color": "rosy",
"i_units": "Bunch", "i_container": "Unknown", "i_manager_id": 98, "i_product_name": "able"
} }
-{ "cs1": { "cs_sold_date_sk": 2450815, "cs_sold_time_sk": 38212, "cs_ship_date_sk": 2450868,
"cs_bill_customer_sk": 62153, "cs_bill_cdemo_sk": 1822764, "cs_bill_hdemo_sk": 5775, "cs_bill_addr_sk":
19986, "cs_ship_customer_sk": 62153, "cs_ship_cdemo_sk": 1822764, "cs_ship_hdemo_sk": 5775,
"cs_ship_addr_sk": 19986, "cs_call_center_sk": 4, "cs_catalog_page_sk": 76, "cs_ship_mode_sk":
2, "cs_warehouse_sk": 2, "cs_item_sk": 3, "cs_promo_sk": 97, "cs_order_number": 1, "cs_quantity":
19, "cs_wholesale_cost": 69.86, "cs_list_price": 88.72, "cs_sales_price": 29.27, "cs_ext_discount_amt":
1129.55, "cs_ext_sales_price": 556.13, "cs_ext_wholesale_cost": 1327.34, "cs_ext_list_price":
1685.68, "cs_ext_tax": 33.36, "cs_coupon_amt": 0.0, "cs_ext_ship_cost": 168.53, "cs_net_paid":
556.13, "cs_net_paid_inc_tax": 589.49, "cs_net_paid_inc_ship": 724.66, "cs_net_paid_inc_ship_tax":
758.02, "cs_net_profit": -771.21 }, "i1": { "i_item_sk": 3, "i_item_id": "AAAAAAAACAAAAAAA",
"i_rec_start_date": "2000-10-2
 7", "i_rec_end_date": null, "i_item_desc": "False opportunities would run alone with a views.
Early approaches would show inc, european intentions; important, main passages shall know
urban, ", "i_current_price": 7.11, "i_wholesale_cost": 0.38, "i_brand_id": 1001001, "i_brand":
"brandbrand #4", "i_class_id": 7, "i_class": "decor", "i_category_id": 7, "i_category": "Home",
"i_manufact_id": 294, "i_manufact": "esen stable", "i_size": "N/A", "i_formulation": "516steel060826230906",
"i_color": "sienna", "i_units": "Cup", "i_container": "Unknown", "i_manager_id": 18, "i_product_name":
"pri" } }
+{ "cs1": { "cs_sold_date_sk": 2450815, "cs_sold_time_sk": 38212, "cs_ship_date_sk": 2450846,
"cs_bill_customer_sk": 1, "cs_bill_cdemo_sk": 1822764, "cs_bill_hdemo_sk": 5775, "cs_bill_addr_sk":
19986, "cs_ship_customer_sk": 1, "cs_ship_cdemo_sk": 1822764, "cs_ship_hdemo_sk": 5775, "cs_ship_addr_sk":
19986, "cs_call_center_sk": 4, "cs_catalog_page_sk": 31, "cs_ship_mode_sk": 8, "cs_warehouse_sk":
2, "cs_item_sk": 2, "cs_promo_sk": 270, "cs_order_number": 1, "cs_quantity": 20, "cs_wholesale_cost":
87.55, "cs_list_price": 260.89, "cs_sales_price": 153.92, "cs_ext_discount_amt": 2139.4, "cs_ext_sales_price":
3078.4, "cs_ext_wholesale_cost": 1751.0, "cs_ext_list_price": 5217.8, "cs_ext_tax": 71.41,
"cs_coupon_amt": 1292.92, "cs_ext_ship_cost": 1356.6, "cs_net_paid": 1785.48, "cs_net_paid_inc_tax":
1856.89, "cs_net_paid_inc_ship": 3142.08, "cs_net_paid_inc_ship_tax": 3213.49, "cs_net_profit":
34.48 }, "i1": { "i_item_sk": 2, "i_item_id": "AAAAAAAACAAAAAAA", "i_rec_start_date": "1997-10-27"
 , "i_rec_end_date": "2000-10-26", "i_item_desc": "False opportunities would run alone with
a views. Early approaches would show inc, european intentions; important, main passages shall
know urban, ", "i_current_price": 1.12, "i_wholesale_cost": 0.38, "i_brand_id": 1001001, "i_brand":
"amalgamalg #1", "i_class_id": 1, "i_class": "dresses", "i_category_id": 1, "i_category":
"Women", "i_manufact_id": 294, "i_manufact": "esen stable", "i_size": "petite", "i_formulation":
"516steel060826230906", "i_color": "rosy", "i_units": "Bunch", "i_container": "Unknown", "i_manager_id":
98, "i_product_name": "able" } }
+{ "cs1": { "cs_sold_date_sk": 2450815, "cs_sold_time_sk": 38212, "cs_ship_date_sk": 2450851,
"cs_bill_customer_sk": 1, "cs_bill_cdemo_sk": 1822764, "cs_bill_hdemo_sk": 5775, "cs_bill_addr_sk":
19986, "cs_ship_customer_sk": 1, "cs_ship_cdemo_sk": 1822764, "cs_ship_hdemo_sk": 5775, "cs_ship_addr_sk":
19986, "cs_call_center_sk": 4, "cs_catalog_page_sk": 89, "cs_ship_mode_sk": 15, "cs_warehouse_sk":
2, "cs_item_sk": 2, "cs_promo_sk": 284, "cs_order_number": 2, "cs_quantity": 50, "cs_wholesale_cost":
70.0, "cs_list_price": 205.1, "cs_sales_price": 188.69, "cs_ext_discount_amt": 820.5, "cs_ext_sales_price":
9434.5, "cs_ext_wholesale_cost": 3500.0, "cs_ext_list_price": 10255.0, "cs_ext_tax": 377.38,
"cs_coupon_amt": 0.0, "cs_ext_ship_cost": 4307.0, "cs_net_paid": 9434.5, "cs_net_paid_inc_tax":
9811.88, "cs_net_paid_inc_ship": 13741.5, "cs_net_paid_inc_ship_tax": 14118.88, "cs_net_profit":
5934.5 }, "cr1": { "cr_returned_date_sk": 2450926, "cr_returned_time_sk": 45816, "cr_item_sk":
2, "cr_
 refunded_customer_sk": 14601, "cr_refunded_cdemo_sk": 797995, "cr_refunded_hdemo_sk": 6189,
"cr_refunded_addr_sk": 9583, "cr_returning_customer_sk": 14601, "cr_returning_cdemo_sk": 797995,
"cr_returning_hdemo_sk": 4703, "cr_returning_addr_sk": 9583, "cr_call_center_sk": 1, "cr_catalog_page_sk":
106, "cr_ship_mode_sk": 2, "cr_warehouse_sk": 2, "cr_reason_sk": 30, "cr_order_number": 2,
"cr_return_quantity": 47, "cr_return_amount": 3888.31, "cr_return_tax": 233.29, "cr_return_amt_inc_tax":
4121.6, "cr_fee": 91.23, "cr_return_ship_cost": 1348.9, "cr_refunded_cash": 3577.24, "cr_reversed_charge":
186.64, "cr_store_credit": 124.43, "cr_net_loss": 1673.42 }, "i1": { "i_item_sk": 2, "i_item_id":
"AAAAAAAACAAAAAAA", "i_rec_start_date": "1997-10-27", "i_rec_end_date": "2000-10-26", "i_item_desc":
"False opportunities would run alone with a views. Early approaches would show inc, european
intentions; important, main passages shall know urban, ", "i_current_price": 1.12, "i_wholesale_cost":
0.3
 8, "i_brand_id": 1001001, "i_brand": "amalgamalg #1", "i_class_id": 1, "i_class": "dresses",
"i_category_id": 1, "i_category": "Women", "i_manufact_id": 294, "i_manufact": "esen stable",
"i_size": "petite", "i_formulation": "516steel060826230906", "i_color": "rosy", "i_units":
"Bunch", "i_container": "Unknown", "i_manager_id": 98, "i_product_name": "able" } }
+{ "cs1": { "cs_sold_date_sk": 2450815, "cs_sold_time_sk": 38212, "cs_ship_date_sk": 2450868,
"cs_bill_customer_sk": 1, "cs_bill_cdemo_sk": 1822764, "cs_bill_hdemo_sk": 5775, "cs_bill_addr_sk":
19986, "cs_ship_customer_sk": 1, "cs_ship_cdemo_sk": 1822764, "cs_ship_hdemo_sk": 5775, "cs_ship_addr_sk":
19986, "cs_call_center_sk": 4, "cs_catalog_page_sk": 76, "cs_ship_mode_sk": 2, "cs_warehouse_sk":
2, "cs_item_sk": 3, "cs_promo_sk": 97, "cs_order_number": 1, "cs_quantity": 19, "cs_wholesale_cost":
69.86, "cs_list_price": 88.72, "cs_sales_price": 29.27, "cs_ext_discount_amt": 1129.55, "cs_ext_sales_price":
556.13, "cs_ext_wholesale_cost": 1327.34, "cs_ext_list_price": 1685.68, "cs_ext_tax": 33.36,
"cs_coupon_amt": 0.0, "cs_ext_ship_cost": 168.53, "cs_net_paid": 556.13, "cs_net_paid_inc_tax":
589.49, "cs_net_paid_inc_ship": 724.66, "cs_net_paid_inc_ship_tax": 758.02, "cs_net_profit":
-771.21 }, "i1": { "i_item_sk": 3, "i_item_id": "AAAAAAAACAAAAAAA", "i_rec_start_date": "2000-10-27",
"i_r
 ec_end_date": null, "i_item_desc": "False opportunities would run alone with a views. Early
approaches would show inc, european intentions; important, main passages shall know urban,
", "i_current_price": 7.11, "i_wholesale_cost": 0.38, "i_brand_id": 1001001, "i_brand": "brandbrand
#4", "i_class_id": 7, "i_class": "decor", "i_category_id": 7, "i_category": "Home", "i_manufact_id":
294, "i_manufact": "esen stable", "i_size": "N/A", "i_formulation": "516steel060826230906",
"i_color": "sienna", "i_units": "Cup", "i_container": "Unknown", "i_manager_id": 18, "i_product_name":
"pri" } }
 { "cs1": { "cs_sold_date_sk": 2450815, "cs_sold_time_sk": 29485, "cs_ship_date_sk": 2450904,
"cs_bill_customer_sk": 14601, "cs_bill_cdemo_sk": 797995, "cs_bill_hdemo_sk": 6189, "cs_bill_addr_sk":
9583, "cs_ship_customer_sk": 14601, "cs_ship_cdemo_sk": 797995, "cs_ship_hdemo_sk": 6189,
"cs_ship_addr_sk": 9583, "cs_call_center_sk": 1, "cs_catalog_page_sk": 64, "cs_ship_mode_sk":
18, "cs_warehouse_sk": 3, "cs_item_sk": 4, "cs_promo_sk": 176, "cs_order_number": 2, "cs_quantity":
56, "cs_wholesale_cost": 67.54, "cs_list_price": 166.82, "cs_sales_price": 18.35, "cs_ext_discount_amt":
8314.32, "cs_ext_sales_price": 1027.6, "cs_ext_wholesale_cost": 3782.24, "cs_ext_list_price":
9341.92, "cs_ext_tax": 0.0, "cs_coupon_amt": 0.0, "cs_ext_ship_cost": 3736.32, "cs_net_paid":
1027.6, "cs_net_paid_inc_tax": 1027.6, "cs_net_paid_inc_ship": 4763.92, "cs_net_paid_inc_ship_tax":
4763.92, "cs_net_profit": -2754.64 }, "cr1": { "cr_returned_date_sk": 2450946, "cr_returned_time_sk":
74710, "cr_item_sk": 4
 , "cr_refunded_customer_sk": 14601, "cr_refunded_cdemo_sk": 797995, "cr_refunded_hdemo_sk":
6189, "cr_refunded_addr_sk": 9583, "cr_returning_customer_sk": 82809, "cr_returning_cdemo_sk":
665550, "cr_returning_hdemo_sk": 991, "cr_returning_addr_sk": 14832, "cr_call_center_sk":
1, "cr_catalog_page_sk": 17, "cr_ship_mode_sk": 2, "cr_warehouse_sk": 5, "cr_reason_sk": 6,
"cr_order_number": 2, "cr_return_quantity": 49, "cr_return_amount": 2490.18, "cr_return_tax":
99.6, "cr_return_amt_inc_tax": 2589.78, "cr_fee": 52.54, "cr_return_ship_cost": 1867.39, "cr_refunded_cash":
323.72, "cr_reversed_charge": 931.57, "cr_store_credit": 1234.89, "cr_net_loss": 2019.53 },
"i1": { "i_item_sk": 4, "i_item_id": "AAAAAAAAEAAAAAAA", "i_rec_start_date": "1997-10-27",
"i_rec_end_date": "1999-10-27", "i_item_desc": "Normal systems would join simply different
theories. Full, new clothes may eat instead achievements. D", "i_current_price": 1.35, "i_wholesale_cost":
0.85, "i_brand_id": 3002001, "i_brand": "imp
 ortoexporti #1", "i_class_id": 2, "i_class": "infants", "i_category_id": 3, "i_category":
"Children", "i_manufact_id": 479, "i_manufact": "n stationese", "i_size": "extra large", "i_formulation":
"610157moccasin018327", "i_color": "red", "i_units": "Tbl", "i_container": "Unknown", "i_manager_id":
26, "i_product_name": "ese" } }
 { "cs1": { "cs_sold_date_sk": 2450815, "cs_sold_time_sk": 29485, "cs_ship_date_sk": 2450890,
"cs_bill_customer_sk": 14601, "cs_bill_cdemo_sk": 797995, "cs_bill_hdemo_sk": 6189, "cs_bill_addr_sk":
9583, "cs_ship_customer_sk": 14601, "cs_ship_cdemo_sk": 797995, "cs_ship_hdemo_sk": 6189,
"cs_ship_addr_sk": 9583, "cs_call_center_sk": 1, "cs_catalog_page_sk": 75, "cs_ship_mode_sk":
8, "cs_warehouse_sk": 1, "cs_item_sk": 5, "cs_promo_sk": 278, "cs_order_number": 2, "cs_quantity":
88, "cs_wholesale_cost": 20.08, "cs_list_price": 60.03, "cs_sales_price": 20.41, "cs_ext_discount_amt":
3486.56, "cs_ext_sales_price": 1796.08, "cs_ext_wholesale_cost": 1767.04, "cs_ext_list_price":
5282.64, "cs_ext_tax": 13.82, "cs_coupon_amt": 1598.51, "cs_ext_ship_cost": 1056.0, "cs_net_paid":
197.57, "cs_net_paid_inc_tax": 211.39, "cs_net_paid_inc_ship": 1253.57, "cs_net_paid_inc_ship_tax":
1267.39, "cs_net_profit": -1569.47 }, "i1": { "i_item_sk": 5, "i_item_id": "AAAAAAAAEAAAAAAA",
"i_rec_start_date": "1999
 -10-28", "i_rec_end_date": "2001-10-26", "i_item_desc": "Normal systems would join simply
different theories. Full, new clothes may eat instead achievements. D", "i_current_price":
4.0, "i_wholesale_cost": 1.76, "i_brand_id": 2002002, "i_brand": "importoimporto #2", "i_class_id":
2, "i_class": "shirts", "i_category_id": 2, "i_category": "Men", "i_manufact_id": 220, "i_manufact":
"barableable", "i_size": "petite", "i_formulation": "42214rosy28066558020", "i_color": "pink",
"i_units": "Cup", "i_container": "Unknown", "i_manager_id": 27, "i_product_name": "anti" }
}
 { "cs1": { "cs_sold_date_sk": 2450815, "cs_sold_time_sk": 29485, "cs_ship_date_sk": 2450849,
"cs_bill_customer_sk": 14601, "cs_bill_cdemo_sk": 797995, "cs_bill_hdemo_sk": 6189, "cs_bill_addr_sk":
9583, "cs_ship_customer_sk": 14601, "cs_ship_cdemo_sk": 797995, "cs_ship_hdemo_sk": 6189,
"cs_ship_addr_sk": 9583, "cs_call_center_sk": 1, "cs_catalog_page_sk": 39, "cs_ship_mode_sk":
4, "cs_warehouse_sk": 3, "cs_item_sk": 6, "cs_promo_sk": 207, "cs_order_number": 2, "cs_quantity":
31, "cs_wholesale_cost": 40.88, "cs_list_price": 51.91, "cs_sales_price": 6.22, "cs_ext_discount_amt":
1416.39, "cs_ext_sales_price": 192.82, "cs_ext_wholesale_cost": 1267.28, "cs_ext_list_price":
1609.21, "cs_ext_tax": 11.56, "cs_coupon_amt": 0.0, "cs_ext_ship_cost": 321.78, "cs_net_paid":
192.82, "cs_net_paid_inc_tax": 204.38, "cs_net_paid_inc_ship": 514.6, "cs_net_paid_inc_ship_tax":
526.16, "cs_net_profit": -1074.46 }, "i1": { "i_item_sk": 6, "i_item_id": "AAAAAAAAEAAAAAAA",
"i_rec_start_date": "2001-10-27", 
 "i_rec_end_date": null, "i_item_desc": "Normal systems would join simply different theories.
Full, new clothes may eat instead achievements. D", "i_current_price": 0.85, "i_wholesale_cost":
1.76, "i_brand_id": 2002002, "i_brand": "exportiimporto #1", "i_class_id": 3, "i_class": "pants",
"i_category_id": 2, "i_category": "Men", "i_manufact_id": 212, "i_manufact": "barableable",
"i_size": "large", "i_formulation": "42214rosy28066558020", "i_color": "moccasin", "i_units":
"Bundle", "i_container": "Unknown", "i_manager_id": 6, "i_product_name": "cally" } }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/834e1731/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index 7fe7c40..be3ca8d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -5768,6 +5768,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="subquery">
+      <compilation-unit name="query-ASTERIXDB-1572">
+        <output-dir compare="Text">query-ASTERIXDB-1572</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="subquery">
       <compilation-unit name="query-ASTERIXDB-1574">
         <output-dir compare="Text">query-ASTERIXDB-1574</output-dir>
         <expected-error>Unnest or index access expects the input to be a collection,
but it was of type</expected-error>
@@ -5921,6 +5926,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="tpcds">
+      <compilation-unit name="query-ASTERIXDB-1591">
+        <output-dir compare="Text">query-ASTERIXDB-1591</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpcds">
       <compilation-unit name="query-ASTERIXDB-1596">
         <output-dir compare="Text">query-ASTERIXDB-1596</output-dir>
       </compilation-unit>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/834e1731/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/util/OperatorManipulationUtil.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/util/OperatorManipulationUtil.java
b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/util/OperatorManipulationUtil.java
index 4437822..9b8258c 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/util/OperatorManipulationUtil.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/util/OperatorManipulationUtil.java
@@ -79,7 +79,7 @@ public class OperatorManipulationUtil {
     }
 
     public static boolean setOperatorMode(AbstractLogicalOperator op) {
-        boolean change = false;
+        AbstractLogicalOperator.ExecutionMode oldMode = op.getExecutionMode();
         switch (op.getOperatorTag()) {
             case DATASOURCESCAN: {
                 op.setExecutionMode(AbstractLogicalOperator.ExecutionMode.PARTITIONED);
@@ -93,7 +93,6 @@ public class OperatorManipulationUtil {
                     child.setExecutionMode(AbstractLogicalOperator.ExecutionMode.PARTITIONED);
                     currentOp = child;
                 }
-                change = true;
                 break;
             }
             case NESTEDTUPLESOURCE: {
@@ -102,7 +101,6 @@ public class OperatorManipulationUtil {
                         .getInputs().get(0).getValue();
                 if (prevOp.getExecutionMode() != AbstractLogicalOperator.ExecutionMode.UNPARTITIONED)
{
                     nts.setExecutionMode(AbstractLogicalOperator.ExecutionMode.LOCAL);
-                    change = true;
                 }
                 break;
             }
@@ -112,7 +110,6 @@ public class OperatorManipulationUtil {
                     LimitOperator opLim = (LimitOperator) op;
                     if (opLim.isTopmostLimitOp()) {
                         opLim.setExecutionMode(AbstractLogicalOperator.ExecutionMode.UNPARTITIONED);
-                        change = true;
                         forceUnpartitioned = true;
                     }
                 }
@@ -120,7 +117,6 @@ public class OperatorManipulationUtil {
                     AggregateOperator aggOp = (AggregateOperator) op;
                     if (aggOp.isGlobal()) {
                         op.setExecutionMode(AbstractLogicalOperator.ExecutionMode.UNPARTITIONED);
-                        change = true;
                         forceUnpartitioned = true;
                     }
                 }
@@ -134,13 +130,11 @@ public class OperatorManipulationUtil {
                                 break;
                             }
                             op.setExecutionMode(AbstractLogicalOperator.ExecutionMode.PARTITIONED);
-                            change = true;
                             exit = true;
                             break;
                         }
                         case LOCAL: {
                             op.setExecutionMode(AbstractLogicalOperator.ExecutionMode.LOCAL);
-                            change = true;
                             break;
                         }
                     }
@@ -151,7 +145,7 @@ public class OperatorManipulationUtil {
                 break;
             }
         }
-        return change;
+        return oldMode != op.getExecutionMode();
     }
 
     public static void substituteVarRec(AbstractLogicalOperator op, LogicalVariable v1, LogicalVariable
v2,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/834e1731/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/RemoveUnusedAssignAndAggregateRule.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/RemoveUnusedAssignAndAggregateRule.java
b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/RemoveUnusedAssignAndAggregateRule.java
index 139f1ed..90ab975 100644
--- a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/RemoveUnusedAssignAndAggregateRule.java
+++ b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/RemoveUnusedAssignAndAggregateRule.java
@@ -36,6 +36,7 @@ import org.apache.hyracks.algebricks.core.algebra.base.ILogicalPlan;
 import org.apache.hyracks.algebricks.core.algebra.base.IOptimizationContext;
 import org.apache.hyracks.algebricks.core.algebra.base.LogicalOperatorTag;
 import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
+import org.apache.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractOperatorWithNestedPlans;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.AggregateOperator;
@@ -47,7 +48,7 @@ import org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.Var
 import org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
 
 /**
- * Removes unused variables from Assign, Unnest, Aggregate, and UnionAll operators.
+ * Removes unused variables from Assign, Unnest, Aggregate, UnionAll, and Group-by operators.
  */
 public class RemoveUnusedAssignAndAggregateRule implements IAlgebraicRewriteRule {
 
@@ -183,9 +184,18 @@ public class RemoveUnusedAssignAndAggregateRule implements IAlgebraicRewriteRule
         while (iter.hasNext()) {
             Pair<LogicalVariable, Mutable<ILogicalExpression>> varMapping = iter.next();
             LogicalVariable decorVar = varMapping.first;
-            if (decorVar != null && toRemove.contains(decorVar)) {
+            // A decor var mapping can have a variable reference expression without a new
variable definition,
+            // which is for rebinding the referred variable.
+            VariableReferenceExpression varExpr = (VariableReferenceExpression) varMapping.second.getValue();
+            LogicalVariable decorReferredVar = varExpr.getVariableReference();
+            boolean removeReBoundDecorVar = toRemove.contains(decorReferredVar);
+            if ((decorVar != null && toRemove.contains(decorVar)) || removeReBoundDecorVar)
{
                 iter.remove();
                 modified = true;
+                if (removeReBoundDecorVar) {
+                    // Do not need to remove that in the children pipeline.
+                    toRemove.remove(decorReferredVar);
+                }
             }
         }
         return modified;
@@ -225,6 +235,7 @@ public class RemoveUnusedAssignAndAggregateRule implements IAlgebraicRewriteRule
             }
         }
         boolean removeUsedVars = true;
+        Set<LogicalVariable> reBoundDecorVars = new HashSet<>();
         switch (op.getOperatorTag()) {
             case ASSIGN:
                 AssignOperator assign = (AssignOperator) op;
@@ -255,6 +266,14 @@ public class RemoveUnusedAssignAndAggregateRule implements IAlgebraicRewriteRule
                     LogicalVariable decorVar = decorMapping.first;
                     if (decorVar != null) {
                         toRemove.add(decorVar);
+                    } else {
+                        // A decor var mapping can have a variable reference expression without
a new variable
+                        // definition, which is for rebinding the referred variable.
+                        VariableReferenceExpression varExpr = (VariableReferenceExpression)
decorMapping.second
+                                .getValue();
+                        LogicalVariable reboundDecorVar = varExpr.getVariableReference();
+                        toRemove.add(reboundDecorVar);
+                        reBoundDecorVars.add(reboundDecorVar);
                     }
                 }
                 break;
@@ -265,6 +284,7 @@ public class RemoveUnusedAssignAndAggregateRule implements IAlgebraicRewriteRule
             List<LogicalVariable> used = new LinkedList<LogicalVariable>();
             VariableUtilities.getUsedVariables(op, used);
             toRemove.removeAll(used);
+            toRemove.addAll(reBoundDecorVars);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/834e1731/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/SetExecutionModeRule.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/SetExecutionModeRule.java
b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/SetExecutionModeRule.java
index 63a33b5..ed85001 100644
--- a/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/SetExecutionModeRule.java
+++ b/hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/SetExecutionModeRule.java
@@ -40,30 +40,7 @@ public class SetExecutionModeRule implements IAlgebraicRewriteRule {
     @Override
     public boolean rewritePost(Mutable<ILogicalOperator> opRef, IOptimizationContext
context) {
         AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue();
-        boolean changed = OperatorManipulationUtil.setOperatorMode(op);
-        if (op.getExecutionMode() == AbstractLogicalOperator.ExecutionMode.UNPARTITIONED
-                || op.getExecutionMode() == AbstractLogicalOperator.ExecutionMode.LOCAL)
{
-            return changed;
-        }
-        switch (op.getOperatorTag()) {
-        // case DISTINCT:
-        // case AGGREGATE:
-        // case GROUP:
-        // case ORDER:
-        // case INNERJOIN:
-        // case LEFTOUTERJOIN: {
-        // op.setExecutionMode(ExecutionMode.GLOBAL);
-        // return true;
-        // }
-
-            case PARTITIONINGSPLIT: {
-                throw new NotImplementedException();
-            }
-            default: {
-                return changed;
-            }
-        }
-
+        return OperatorManipulationUtil.setOperatorMode(op);
     }
 
     @Override


Mime
View raw message