diff --git a/data/files/tpcds-perf/10k/call_center.dat b/data/files/tpcds-perf/10k/call_center.dat new file mode 100644 index 0000000..38cd460 --- /dev/null +++ b/data/files/tpcds-perf/10k/call_center.dat @@ -0,0 +1 @@ +3|AAAAAAAACAAAAAAA|2001-01-01|||2450806|Mid Atlantic|medium|6|4134|8AM-4PM|Mark Hightower|2|Wrong troops shall work sometimes in a opti|Largely blank years put substantially deaf, new others. Question|Julius Durham|1|ought|2|able|984|Center Hill|Way|Suite 70|Midway|Williamson County|TN|31904|United States|-5|0.01| diff --git a/data/files/tpcds-perf/10k/catalog_page.dat b/data/files/tpcds-perf/10k/catalog_page.dat new file mode 100644 index 0000000..05cd0c3 --- /dev/null +++ b/data/files/tpcds-perf/10k/catalog_page.dat @@ -0,0 +1 @@ +7440|AAAAAAAAABNBAAAA|2452150|2452179|DEPARTMENT|69|96|Changes look cells. Articles wear equally entire, persistent things; full hours c|monthly| diff --git a/data/files/tpcds-perf/10k/catalog_returns.dat b/data/files/tpcds-perf/10k/catalog_returns.dat new file mode 100644 index 0000000..386f7fa --- /dev/null +++ b/data/files/tpcds-perf/10k/catalog_returns.dat @@ -0,0 +1,2 @@ +2452000|41245|10153|18828|394150|6272|28794|69040|82693|265|10237|2|4028|13|5|2|84579|4|136.56|8.19|144.75|22.33|15.64|24.58|15.67|96.31|46.16| +2451983|66640|6967|97168|817701|4987|9920|48586|1587639|2241|42843|5|4067|16|3|5|92486|45|17.55|0.52|18.07|48.44|665.55|16.49|0.82|0.24|714.51| diff --git a/data/files/tpcds-perf/10k/catalog_sales.dat b/data/files/tpcds-perf/10k/catalog_sales.dat new file mode 100644 index 0000000..21696c3 --- /dev/null +++ b/data/files/tpcds-perf/10k/catalog_sales.dat @@ -0,0 +1,15 @@ +2452589|24498|2452595|68022|1188320|3818|23763|68022|1188320|3818|23763|3|8180|16|2|463|276|150557|64|46.29|81.00|62.37|1192.32|3991.68|2962.56|5184.00|199.58|0.00|673.92|3991.68|4191.26|4665.60|4865.18|1029.12| +2451194|43770|2451225|93715|793306|2050|29594|6920|173082|4226|16217|2|2034|16|4|15622|213|32645|44|80.09|203.42|8.13|8592.76|357.72|3523.96|8950.48|3.54|318.37|2505.80|39.35|42.89|2545.15|2548.69|-3484.61| +2452633|20143|2452647|7171|1663941|1958|39128|7171|1663941|1958|39128|6|7972|2|3|15235|79|158308|47|64.53|160.67|122.10|1812.79|5738.70|3032.91|7551.49|114.77|0.00|2416.27|5738.70|5853.47|8154.97|8269.74|2705.79| +2452609|60697|2452650|58075|1373985|3142|14252|58075|1373985|3142|14252|1|7959|15|3|6384|203|154151|7|9.45|12.66|6.70|41.72|46.90|66.15|88.62|1.08|33.29|20.37|13.61|14.69|33.98|35.06|-52.54| +2451488|48849|2451556|43577|1119891|2158|46472|43577|1119891|2158|46472|1|2997|19|3|10358|209|53881|79|11.58|21.88|19.47|190.39|1538.13|914.82|1728.52|138.43|0.00|259.12|1538.13|1676.56|1797.25|1935.68|623.31| +2452511|23757|2452551|32511|1705129|5394|14812|32511|1705129|5394|14812|6|7959|8|3|7153|193|141101|60|95.84|162.92|115.67|2835.00|6940.20|5750.40|9775.20|97.16|5552.16|4300.80|1388.04|1485.20|5688.84|5786.00|-4362.36| +2452209|37924|2452231|94199|1715434|5822|23410|94199|1715434|5822|23410|5|5948|7|2|11497|3|116528|17|98.42|178.14|154.98|393.72|2634.66|1673.14|3028.38|105.38|0.00|847.79|2634.66|2740.04|3482.45|3587.83|961.52| +2451756|48003|2451825|86889|137093|897|12701|86889|137093|897|12701|1|4066|4|4|16937|21|74594|24|29.64|57.79|57.79|0.00|1386.96|711.36|1386.96|80.72|41.60|96.96|1345.36|1426.08|1442.32|1523.04|634.00| +2452012|24618|2452077|67956|466592|4875|3558|67956|466592|4875|3558|1|5854|20|5|5201|133|100957|43|95.09|169.26|162.48|291.54|6986.64|4088.87|7278.18|0.00|0.00|2183.11|6986.64|6986.64|9169.75|9169.75|2897.77| +2452525|63909|2452614|29065|1530385|6105|45472|29065|1530385|6105|45472|3|8689|17|5|16911|174|142801|11|81.05|176.68|113.07|699.71|1243.77|891.55|1943.48|24.87|0.00|0.00|1243.77|1268.64|1243.77|1268.64|352.22| +2451166|75616|2451198|74318|1855522|3926|15130|73669|1161491|3495|35899|4|1234|7|5|3644|167|29464|94|78.26|126.78|2.53|11679.50|237.82|7356.44|11917.32|16.64|0.00|1549.12|237.82|254.46|1786.94|1803.58|-7118.62| +2451214|44755|2451225|80319|1856971|23|27922|35225|1134073|1125|13824|2|1946|9|4|16616|234|33669|58|81.88|155.57|6.22|8662.30|360.76|4749.04|9023.06|19.91|111.83|2525.90|248.93|268.84|2774.83|2794.74|-4500.11| +2451818|62170|2451860|45512|35336|4007|32231|45512|35336|4007|32231|1|4848|2|1|9001|245|81562|43|13.08|21.97|17.35|198.66|746.05|562.44|944.71|29.84|0.00|320.78|746.05|775.89|1066.83|1096.67|183.61| +2451828|35544|2451899|11115|1102680|5092|39504|11115|1102680|5092|39504|2|4311|3|2|16625|182|82701|47|98.38|243.98|39.03|9632.65|1834.41|4623.86|11467.06|146.75|0.00|1375.69|1834.41|1981.16|3210.10|3356.85|-2789.45| +2450853|76431|2450898|41658|892221|5184|47747|41658|892221|5184|47747|1|96|20|2|562|7|1974|11|81.61|186.88|173.79|143.99|1911.69|897.71|2055.68|114.70|0.00|781.11|1911.69|2026.39|2692.80|2807.50|1013.98| diff --git a/data/files/tpcds-perf/10k/customer.dat b/data/files/tpcds-perf/10k/customer.dat new file mode 100644 index 0000000..277fb78 --- /dev/null +++ b/data/files/tpcds-perf/10k/customer.dat @@ -0,0 +1 @@ +21215|AAAAAAAAPNCFAAAA|1159737|3921|20858|2451822|2451792|Mrs.|Lisa|Cunningham|N|25|7|1933|IRELAND||Lisa.Cunningham@dEaFnghdL.com|2452321| diff --git a/data/files/tpcds-perf/10k/customer_address.dat b/data/files/tpcds-perf/10k/customer_address.dat new file mode 100644 index 0000000..59fcbb7 --- /dev/null +++ b/data/files/tpcds-perf/10k/customer_address.dat @@ -0,0 +1 @@ +8245|AAAAAAAAFDACAAAA|172|Spruce 2nd|Lane|Suite T|Lebanon|Grady County|GA|32898|United States|-5|apartment| diff --git a/data/files/tpcds-perf/10k/customer_demographics.dat b/data/files/tpcds-perf/10k/customer_demographics.dat new file mode 100644 index 0000000..fd47859 --- /dev/null +++ b/data/files/tpcds-perf/10k/customer_demographics.dat @@ -0,0 +1,20 @@ +1010484|F|S|2 yr Degree|8000|Low Risk|5|4|3| +1737672|F|M|Unknown|2000|Low Risk|2|2|6| +704061|M|M|Primary|9500|High Risk|6|3|2| +1036731|M|M|2 yr Degree|5500|Good|3|5|3| +72294|F|S|Advanced Degree|6500|Unknown|5|1|0| +1355610|F|U|Advanced Degree|3000|Good|4|6|4| +588142|F|M|Primary|1500|Good|0|1|2| +264336|F|D|Secondary|8500|Good|5|6|0| +419920|F|U|Advanced Degree|9500|Unknown|4|3|1| +1556593|M|S|Primary|9000|Unknown|4|4|5| +1208197|M|W|Unknown|10000|High Risk|5|2|4| +1032975|M|D|Advanced Degree|8500|Low Risk|2|5|3| +605419|M|U|Advanced Degree|4500|Good|3|1|2| +1218268|F|W|Advanced Degree|2000|High Risk|0|3|4| +520731|M|M|Primary|10000|Unknown|1|6|1| +1576325|M|D|Unknown|9500|Low Risk|1|5|5| +1906547|M|W|College|8500|Low Risk|4|6|6| +907389|M|U|4 yr Degree|1500|Good|1|2|3| +1269761|M|M|2 yr Degree|10000|High Risk|2|4|4| +95840|F|U|Primary|5000|Good|3|2|0| diff --git a/data/files/tpcds-perf/10k/date_dim.dat b/data/files/tpcds-perf/10k/date_dim.dat new file mode 100644 index 0000000..67d1767 --- /dev/null +++ b/data/files/tpcds-perf/10k/date_dim.dat @@ -0,0 +1 @@ +2432672|AAAAAAAAAKOBFCAA|1948-04-30|579|2522|194|1948|5|4|30|2|1948|194|2522|Friday|1948Q2|N|Y|N|2432643|2432733|2432306|2432581|N|N|N|N|N| diff --git a/data/files/tpcds-perf/10k/dbgen_version.dat b/data/files/tpcds-perf/10k/dbgen_version.dat new file mode 100644 index 0000000..1845215 --- /dev/null +++ b/data/files/tpcds-perf/10k/dbgen_version.dat @@ -0,0 +1 @@ +1.2.0h (pre-release)|se)|12:12:54|-scale 1mb -force | diff --git a/data/files/tpcds-perf/10k/household_demographics.dat b/data/files/tpcds-perf/10k/household_demographics.dat new file mode 100644 index 0000000..aa105d9 --- /dev/null +++ b/data/files/tpcds-perf/10k/household_demographics.dat @@ -0,0 +1 @@ +5953|14|5001-10000|9|4| diff --git a/data/files/tpcds-perf/10k/income_band.dat b/data/files/tpcds-perf/10k/income_band.dat new file mode 100644 index 0000000..d794200 --- /dev/null +++ b/data/files/tpcds-perf/10k/income_band.dat @@ -0,0 +1 @@ +16|150001|160000| diff --git a/data/files/tpcds-perf/10k/inventory.dat b/data/files/tpcds-perf/10k/inventory.dat new file mode 100644 index 0000000..2b56368 --- /dev/null +++ b/data/files/tpcds-perf/10k/inventory.dat @@ -0,0 +1,118 @@ +2452138|10931|1|533| +2450829|526|1|471| +2452313|4201|2|859| +2451060|502|3|796| +2451277|17404|4|488| +2450822|15392|1|74| +2451977|3295|5|429| +2451319|9104|4|| +2452341|13779|5|864| +2452054|5629|5|57| +2451487|14948|3|538| +2450892|4288|2|377| +2452166|4925|5|684| +2452215|7829|4|895| +2451676|12365|3|97| +2452481|7158|2|191| +2451305|15038|2|786| +2451767|4963|4|388| +2452355|17466|5|388| +2452362|2401|3|977| +2451788|17333|1|712| +2451088|6568|4|10| +2452334|846|2|251| +2452054|4441|3|| +2451207|10453|1|209| +2451039|4399|2|705| +2451613|9236|2|424| +2452068|2681|2|71| +2452243|14651|3|863| +2451746|11089|2|91| +2452026|15085|1|239| +2451522|2149|4|795| +2450934|6490|1|1| +2451473|8305|5|| +2451207|3628|3|387| +2452180|321|2|601| +2451725|16105|5|852| +2452222|11955|5|118| +2451046|566|2|778| +2451298|13694|2|400| +2450857|14317|3|228| +2450990|3505|2|539| +2451816|8774|4|671| +2452075|10421|5|299| +2451557|9199|1|618| +2452138|10411|1|| +2451522|12884|2|751| +2452299|9235|3|718| +2451900|8024|4|| +2452068|6593|4|700| +2450920|15758|4|490| +2451830|14183|4|317| +2450857|2329|3|136| +2451585|13202|1|212| +2451921|14149|3|708| +2451921|6531|4|546| +2451613|9355|3|506| +2451312|4454|5|595| +2452404|13369|5|799| +2451473|11102|5|990| +2452124|14129|4|264| +2451109|9038|2|| +2450913|5077|1|740| +2451473|16616|5|621| +2452285|4464|2|302| +2452397|12771|1|543| +2452229|11883|5|12| +2451970|5373|4|581| +2451473|3824|3|682| +2452061|12645|2|73| +2451550|15494|3|222| +2451445|5449|4|322| +2450976|13844|2|486| +2452278|10563|2|353| +2452012|8161|3|593| +2451368|12388|2|607| +2450829|3524|3|68| +2451403|16918|3|750| +2451900|4229|5|510| +2452222|9447|5|601| +2450934|16210|4|594| +2452495|16797|2|431| +2452285|10437|3|54| +2451501|10996|2|654| +2450913|1606|5|61| +2452572|17947|2|8| +2451326|6739|5|827| +2451655|13166|5|1| +2451186|14456|4|248| +2452131|12809|4|348| +2451326|4990|2|666| +2451158|6010|2|738| +2451032|13778|1|| +2451746|2401|1|388| +2451424|10375|4|995| +2450927|4996|2|172| +2451718|16213|4|309| +2452306|5943|1|49| +2451795|10531|5|310| +2451403|7664|2|322| +2451263|1579|4|759| +2451718|80|1|266| +2451277|16789|1|20| +2451417|5074|4|711| +2451627|13921|2|827| +2451585|3097|2|| +2450913|14258|5|827| +2451214|5044|1|681| +2451732|17761|2|828| +2451935|8869|3|225| +2451655|6485|4|360| +2451214|9454|4|115| +2451984|9871|1|401| +2451242|13154|3|109| +2450976|6944|5|154| +2452390|2748|2|57| +2452600|15792|3|137| +2452173|15345|1|949| diff --git a/data/files/tpcds-perf/10k/item.dat b/data/files/tpcds-perf/10k/item.dat new file mode 100644 index 0000000..78479f6 --- /dev/null +++ b/data/files/tpcds-perf/10k/item.dat @@ -0,0 +1 @@ +7253|AAAAAAAAEFMBAAAA|1999-10-28|2001-10-26|Little, brown|76.96|48.48|4001002|amalgedu pack #2|1|womens|4|Shoes|787|barableable|petite|53517peach6446893149|honeydew|Cup|Unknown|37|priantiableation| diff --git a/data/files/tpcds-perf/10k/promotion.dat b/data/files/tpcds-perf/10k/promotion.dat new file mode 100644 index 0000000..6b1b10f --- /dev/null +++ b/data/files/tpcds-perf/10k/promotion.dat @@ -0,0 +1 @@ +188|AAAAAAAAMLAAAAAA|2450385|2450413|14246|1000.00|1|eing|Y|N|N|N|N|N|N|N|Machines open only unique minut|Unknown|N| diff --git a/data/files/tpcds-perf/10k/reason.dat b/data/files/tpcds-perf/10k/reason.dat new file mode 100644 index 0000000..54c0e2d --- /dev/null +++ b/data/files/tpcds-perf/10k/reason.dat @@ -0,0 +1 @@ +2|AAAAAAAACAAAAAAA|Stopped working| diff --git a/data/files/tpcds-perf/10k/ship_mode.dat b/data/files/tpcds-perf/10k/ship_mode.dat new file mode 100644 index 0000000..660e308 --- /dev/null +++ b/data/files/tpcds-perf/10k/ship_mode.dat @@ -0,0 +1 @@ +17|AAAAAAAABBAAAAAA|LIBRARY|SEA|RUPEKSA|5FKNB0j8aaqTB| diff --git a/data/files/tpcds-perf/10k/store.dat b/data/files/tpcds-perf/10k/store.dat new file mode 100644 index 0000000..f73a5b8 --- /dev/null +++ b/data/files/tpcds-perf/10k/store.dat @@ -0,0 +1 @@ +3|AAAAAAAACAAAAAAA|2000-03-13|||able|236|7557959|8AM-4PM|Scott Smith|7|Unknown|Impossible, true arms can treat constant, complete w|David Lamontagne|1|Unknown|1|Unknown|877|Park Laurel|Road|Suite T|Midway|Williamson County|TN|31904|United States|-5|0.03| diff --git a/data/files/tpcds-perf/10k/store_returns.dat b/data/files/tpcds-perf/10k/store_returns.dat new file mode 100644 index 0000000..0c23019 --- /dev/null +++ b/data/files/tpcds-perf/10k/store_returns.dat @@ -0,0 +1,3 @@ +2451647|31762|10498|14755|1714690|1944|10798|8|3|40626|1|17.99|0.00|17.99|50.23|14.39|3.59|1.29|13.11|64.62| +2451609|31851|12646|80630|1657772|1083|5241|10|30|100977|4|213.52|8.54|222.06|67.85|227.76|164.41|4.41|44.70|304.15| +2451157|53594|4708|21145|357543|5941|20339|10|28|80746|52|90.48|5.42|95.90|9.41|176.28|20.81|5.57|64.10|191.11| diff --git a/data/files/tpcds-perf/10k/store_sales.dat b/data/files/tpcds-perf/10k/store_sales.dat new file mode 100644 index 0000000..e9b69c6 --- /dev/null +++ b/data/files/tpcds-perf/10k/store_sales.dat @@ -0,0 +1,29 @@ +2452128|61315|7265|21497|1552322|6347|35972|8|7|176001|39|34.25|38.01|9.12|0.00|355.68|1335.75|1482.39|24.89|0.00|355.68|380.57|-980.07| +2451519|34242|14005|51293|624924|5755|39339|2|280|186934|71|36.24|67.40|35.72|1572.39|2536.12|2573.04|4785.40|28.91|1572.39|963.73|992.64|-1609.31| +2451426|38160|13238|17130|151401|6825|49496|7|245|87540|14|83.82|83.82|66.21|342.96|926.94|1173.48|1173.48|52.55|342.96|583.98|636.53|-589.50| +2451052|33131|2426|16249|815423|2244|13865|4|213|238330|68|46.99|88.81|58.61|0.00|3985.48|3195.32|6039.08|358.69|0.00|3985.48|4344.17|790.16| +2450964|48633|5408|1687|1498247|4760|44120|1|274|33216|79|66.39|119.50|113.52|0.00|8968.08|5244.81|9440.50|269.04|0.00|8968.08|9237.12|3723.27| +2451677|34083|6926|41496|369620|944|37421|8|117|67386|8|30.62|55.72|13.93|0.00|111.44|244.96|445.76|4.45|0.00|111.44|115.89|-133.52| +2451487|52444|10930|23397|1015523|6496|29422|2|260|203128|47|61.06|115.40|32.31|273.34|1518.57|2869.82|5423.80|87.16|273.34|1245.23|1332.39|-1624.59| +2451196|65593|16684|66563|635746|6882|28465|7|11|154958|53|74.20|135.04|49.96|0.00|2647.88|3932.60|7157.12|105.91|0.00|2647.88|2753.79|-1284.72| +2452580|40756|4758|92424|1841699|1374|43896|8|191|229467|79|26.51|49.30|18.24|0.00|1440.96|2094.29|3894.70|0.00|0.00|1440.96|1440.96|-653.33| +2451162|75157|403|34121|912188|5902|32769|10|15|238258|31|79.78|96.53|84.94|0.00|2633.14|2473.18|2992.43|131.65|0.00|2633.14|2764.79|159.96| +2451494|52078|122|4330|33046|6209|44572|4|290|117572|17|58.46|106.98|95.21|0.00|1618.57|993.82|1818.66|16.18|0.00|1618.57|1634.75|624.75| +2451796|34045|15599|81620|292004|3188|29572|7|89|96391|16|59.79|90.88|39.07|612.61|625.12|956.64|1454.08|0.00|612.61|12.51|12.51|-944.13| +2452029|73890|13355|55822|1361362|5302|43642|10|130|223920|29|36.28|52.60|49.97|0.00|1449.13|1052.12|1525.40|86.94|0.00|1449.13|1536.07|397.01| +2451925|50853|11329|48127|1804423|5519|39415|1|266|50112|35|71.74|85.37|0.00|0.00|0.00|2510.90|2987.95|0.00|0.00|0.00|0.00|-2510.90| +2451173|45309|346|77493|958253|6213|41773|8|49|50857|62|1.16|2.01|0.84|0.00|52.08|71.92|124.62|0.52|0.00|52.08|52.60|-19.84| +2451059|37789|12082|30135|1875969|6250|14084|2|33|17990|11|79.48|143.85|21.57|21.35|237.27|874.28|1582.35|15.11|21.35|215.92|231.03|-658.36| +2451217|34052|7058|37320|1331341|5715|14136|8|27|140180|95|15.05|24.08|3.37|0.00|320.15|1429.75|2287.60|6.40|0.00|320.15|326.55|-1109.60| +2452521|49929|1026|12925|16976|6980|8231|1|138|52978|81|93.74|126.54|124.00|0.00|10044.00|7592.94|10249.74|602.64|0.00|10044.00|10646.64|2451.06| +2451704|47493|10879|88050|956907|964|4621|2|62|116382|50|19.74|34.93|3.84|0.00|192.00|987.00|1746.50|3.84|0.00|192.00|195.84|-795.00| +2451867|29721|13268|29108|940065|4269|43226|10|261|233884|99|95.82|138.93|2.77|0.00|274.23|9486.18|13754.07|2.74|0.00|274.23|276.97|-9211.95| +2451165|56118|6283|56948|12958|5321|43731|1|228|188419|81|26.92|51.95|45.71|0.00|3702.51|2180.52|4207.95|222.15|0.00|3702.51|3924.66|1521.99| +2451198|74249|14209|48645|1592083|6274|15665|2|65|186598|75|91.71|98.12|77.51|0.00|5813.25|6878.25|7359.00|406.92|0.00|5813.25|6220.17|-1065.00| +2452473|69962|12792|41194|1037106|6618|44977|8|121|34304|51|83.37|109.21|40.40|762.34|2060.40|4251.87|5569.71|38.94|762.34|1298.06|1337.00|-2953.81| +2451530|63519|11710|18146|985664|1629|2747|8|171|220578|2|64.62|105.33|81.10|71.36|162.20|129.24|210.66|5.45|71.36|90.84|96.29|-38.40| +2451513|47691|12001|49051|1754192|6886|43227|1|279|162205|65|75.54|145.79|14.57|0.00|947.05|4910.10|9476.35|18.94|0.00|947.05|965.99|-3963.05| +2452179|33759|4835|1224|355484|6191|39698|4|48|59946|79|74.59|111.88|90.62|0.00|7158.98|5892.61|8838.52|214.76|0.00|7158.98|7373.74|1266.37| +2451503|68642|8653|45285|597082|5232|15429|2|289|105403|24|38.99|48.73|9.25|0.00|222.00|935.76|1169.52|6.66|0.00|222.00|228.66|-713.76| +2452152|72853|6325|23464|1692344|7177|11257|1|196|82179|73|15.12|17.53|15.95|128.07|1164.35|1103.76|1279.69|31.08|128.07|1036.28|1067.36|-67.48| +2452204|52920|10557|71600|1916525|1803|19081|1|58|87839|11|12.69|18.65|8.20|0.00|90.20|139.59|205.15|1.80|0.00|90.20|92.00|-49.39| diff --git a/data/files/tpcds-perf/10k/time_dim.dat b/data/files/tpcds-perf/10k/time_dim.dat new file mode 100644 index 0000000..7958c01 --- /dev/null +++ b/data/files/tpcds-perf/10k/time_dim.dat @@ -0,0 +1 @@ +71715|AAAAAAAAECIBBAAA|71715|19|55|15|PM|second|evening|dinner| diff --git a/data/files/tpcds-perf/10k/warehouse.dat b/data/files/tpcds-perf/10k/warehouse.dat new file mode 100644 index 0000000..50a4988 --- /dev/null +++ b/data/files/tpcds-perf/10k/warehouse.dat @@ -0,0 +1 @@ +3|AAAAAAAADAAAAAAA|Doors canno|294242|534|Ash Laurel|Dr.|Suite 0|Fairview|Williamson County|TN|35709|United States|-5| diff --git a/data/files/tpcds-perf/10k/web_page.dat b/data/files/tpcds-perf/10k/web_page.dat new file mode 100644 index 0000000..302e9bc --- /dev/null +++ b/data/files/tpcds-perf/10k/web_page.dat @@ -0,0 +1 @@ +57|AAAAAAAAIDAAAAAA|2000-09-03||2450811|2452568|N||http://www.foo.com|ad|5733|16|2|2| diff --git a/data/files/tpcds-perf/10k/web_returns.dat b/data/files/tpcds-perf/10k/web_returns.dat new file mode 100644 index 0000000..d94b6d9 --- /dev/null +++ b/data/files/tpcds-perf/10k/web_returns.dat @@ -0,0 +1 @@ +2451819|14522|7412|87022|830112|849|18786|87022|830112|849|18786|26|14|29805|4|260.00|7.80|267.80|9.89|159.32|33.80|79.17|147.03|177.01| diff --git a/data/files/tpcds-perf/10k/web_sales.dat b/data/files/tpcds-perf/10k/web_sales.dat new file mode 100644 index 0000000..5c44850 --- /dev/null +++ b/data/files/tpcds-perf/10k/web_sales.dat @@ -0,0 +1,8 @@ +2452088|29996|2452140|487|36365|234305|6292|46632|81196|72618|2499|32439|47|11|1|3|185|58716|96|46.96|139.94|47.57|8867.52|4566.72|4508.16|13434.24|319.67|0.00|1746.24|4566.72|4886.39|6312.96|6632.63|58.56| +2451034|56417|2451116|1303|93988|433954|1567|17133|619|512094|6325|20738|1|4|2|1|210|1784|42|31.93|88.44|76.05|520.38|3194.10|1341.06|3714.48|63.88|0.00|1782.90|3194.10|3257.98|4977.00|5040.88|1853.04| +2451887|28679|2451991|16304|78601|558342|4930|49071|86034|688673|5141|32129|2|25|11|2|120|26758|21|96.19|103.88|38.43|1374.45|807.03|2019.99|2181.48|48.42|0.00|130.83|807.03|855.45|937.86|986.28|-1212.96| +2451531|48574|2451591|6103|6114|1448479|4444|19209|45993|190857|5457|3022|50|16|2|5|78|35899|78|39.17|90.87|21.80|5387.46|1700.40|3055.26|7087.86|0.00|1700.40|141.18|0.00|0.00|141.18|141.18|-3055.26| +2452270|23615|2452288|7359|61450|1227319|4835|34704|85420|1172287|5558|37827|19|15|3|3|76|52885|89|28.16|57.44|43.08|1278.04|3834.12|2506.24|5112.16|230.04|0.00|1891.25|3834.12|4064.16|5725.37|5955.41|1327.88| +2451534|76733|2451615|14648|32678|1252271|2617|46210|44871|761749|3389|25782|7|26|11|3|65|42894|52|14.96|29.17|7.29|1137.76|379.08|777.92|1516.84|11.37|0.00|60.32|379.08|390.45|439.40|450.77|-398.84| +2451434|37011|2451484|5276|34571|1687275|5932|11036|96005|443974|2348|7852|16|19|1|5|186|38321|47|21.82|41.67|40.83|39.48|1919.01|1025.54|1958.49|38.38|0.00|940.00|1919.01|1957.39|2859.01|2897.39|893.47| +2452173|17872|2452233|913|46428|1157897|4919|41541|16664|1305817|654|24123|41|11|1|1|291|43783|30|86.49|128.00|64.00|1920.00|1920.00|2594.70|3840.00|115.20|0.00|1036.80|1920.00|2035.20|2956.80|3072.00|-674.70| diff --git a/data/files/tpcds-perf/10k/web_site.dat b/data/files/tpcds-perf/10k/web_site.dat new file mode 100644 index 0000000..312fd47 --- /dev/null +++ b/data/files/tpcds-perf/10k/web_site.dat @@ -0,0 +1 @@ +28|AAAAAAAAMBAAAAAA|1997-08-16|1999-08-16|site_4|2450577|2448752|Unknown|Raymond Oneill|4|Hands look again nice years. Alre|Skills can want as common agencies. Appropriate issues can use. Over national lives may lear|Jeffrey Campbell|3|pri|730|Central 14th|Dr.|Suite Q|Midway|Williamson County|TN|31904|United States|-5|0.09| diff --git a/data/scripts/q_perf_test_cleanup.sql b/data/scripts/q_perf_test_cleanup.sql new file mode 100644 index 0000000..555d472 --- /dev/null +++ b/data/scripts/q_perf_test_cleanup.sql @@ -0,0 +1,24 @@ +drop table if exists call_center; +drop table if exists catalog_page; +drop table if exists catalog_returns; +drop table if exists catalog_sales; +drop table if exists customer; +drop table if exists customer_address; +drop table if exists customer_demographics; +drop table if exists date_dim; +drop table if exists household_demographics; +drop table if exists income_band; +drop table if exists inventory; +drop table if exists item; +drop table if exists promotion; +drop table if exists reason; +drop table if exists ship_mode; +drop table if exists store; +drop table if exists store_returns; +drop table if exists store_sales; +drop table if exists time_dim; +drop table if exists warehouse; +drop table if exists web_page; +drop table if exists web_returns; +drop table if exists web_sales; +drop table if exists web_site; diff --git a/data/scripts/q_perf_test_init.sql b/data/scripts/q_perf_test_init.sql new file mode 100644 index 0000000..5d94b89 --- /dev/null +++ b/data/scripts/q_perf_test_init.sql @@ -0,0 +1,616 @@ +drop table if exists call_center; +create external table call_center +( + cc_call_center_sk int, + cc_call_center_id string, + cc_rec_start_date string, + cc_rec_end_date string, + cc_closed_date_sk int, + cc_open_date_sk int, + cc_name string, + cc_class string, + cc_employees int, + cc_sq_ft int, + cc_hours string, + cc_manager string, + cc_mkt_id int, + cc_mkt_class string, + cc_mkt_desc string, + cc_market_manager string, + cc_division int, + cc_division_name string, + cc_company int, + cc_company_name string, + cc_street_number string, + cc_street_name string, + cc_street_type string, + cc_suite_number string, + cc_city string, + cc_county string, + cc_state string, + cc_zip string, + cc_country string, + cc_gmt_offset decimal(5,2), + cc_tax_percentage decimal(5,2) +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/call_center.dat" INTO TABLE call_center; + +drop table if exists catalog_page; +create external table catalog_page +( + cp_catalog_page_sk int, + cp_catalog_page_id string, + cp_start_date_sk int, + cp_end_date_sk int, + cp_department string, + cp_catalog_number int, + cp_catalog_page_number int, + cp_description string, + cp_type string +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/catalog_page.dat" INTO TABLE catalog_page; + +drop table if exists catalog_returns; +create external table catalog_returns +( + cr_returned_date_sk int, + cr_returned_time_sk int, + cr_item_sk int, + cr_refunded_customer_sk int, + cr_refunded_cdemo_sk int, + cr_refunded_hdemo_sk int, + cr_refunded_addr_sk int, + cr_returning_customer_sk int, + cr_returning_cdemo_sk int, + cr_returning_hdemo_sk int, + cr_returning_addr_sk int, + cr_call_center_sk int, + cr_catalog_page_sk int, + cr_ship_mode_sk int, + cr_warehouse_sk int, + cr_reason_sk int, + cr_order_number int, + cr_return_quantity int, + cr_return_amount decimal(7,2), + cr_return_tax decimal(7,2), + cr_return_amt_inc_tax decimal(7,2), + cr_fee decimal(7,2), + cr_return_ship_cost decimal(7,2), + cr_refunded_cash decimal(7,2), + cr_reversed_charge decimal(7,2), + cr_store_credit decimal(7,2), + cr_net_loss decimal(7,2) +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/catalog_returns.dat" INTO TABLE catalog_returns; + +drop table if exists catalog_sales; +create external table catalog_sales +( + cs_sold_date_sk int, + cs_sold_time_sk int, + cs_ship_date_sk int, + cs_bill_customer_sk int, + cs_bill_cdemo_sk int, + cs_bill_hdemo_sk int, + cs_bill_addr_sk int, + cs_ship_customer_sk int, + cs_ship_cdemo_sk int, + cs_ship_hdemo_sk int, + cs_ship_addr_sk int, + cs_call_center_sk int, + cs_catalog_page_sk int, + cs_ship_mode_sk int, + cs_warehouse_sk int, + cs_item_sk int, + cs_promo_sk int, + cs_order_number int, + cs_quantity int, + cs_wholesale_cost decimal(7,2), + cs_list_price decimal(7,2), + cs_sales_price decimal(7,2), + cs_ext_discount_amt decimal(7,2), + cs_ext_sales_price decimal(7,2), + cs_ext_wholesale_cost decimal(7,2), + cs_ext_list_price decimal(7,2), + cs_ext_tax decimal(7,2), + cs_coupon_amt decimal(7,2), + cs_ext_ship_cost decimal(7,2), + cs_net_paid decimal(7,2), + cs_net_paid_inc_tax decimal(7,2), + cs_net_paid_inc_ship decimal(7,2), + cs_net_paid_inc_ship_tax decimal(7,2), + cs_net_profit decimal(7,2) +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/catalog_sales.dat" INTO TABLE catalog_sales; + +drop table if exists customer; +create external table customer +( + c_customer_sk int, + c_customer_id string, + c_current_cdemo_sk int, + c_current_hdemo_sk int, + c_current_addr_sk int, + c_first_shipto_date_sk int, + c_first_sales_date_sk int, + c_salutation string, + c_first_name string, + c_last_name string, + c_preferred_cust_flag string, + c_birth_day int, + c_birth_month int, + c_birth_year int, + c_birth_country string, + c_login string, + c_email_address string, + c_last_review_date string +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/customer.dat" INTO TABLE customer; + +drop table if exists customer_address; +create external table customer_address +( + ca_address_sk int, + ca_address_id string, + ca_street_number string, + ca_street_name string, + ca_street_type string, + ca_suite_number string, + ca_city string, + ca_county string, + ca_state string, + ca_zip string, + ca_country string, + ca_gmt_offset decimal(5,2), + ca_location_type string +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/customer_address.dat" INTO TABLE customer_address; + +drop table if exists customer_demographics; +create external table customer_demographics +( + cd_demo_sk int, + cd_gender string, + cd_marital_status string, + cd_education_status string, + cd_purchase_estimate int, + cd_credit_rating string, + cd_dep_count int, + cd_dep_employed_count int, + cd_dep_college_count int +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/customer_demographics.dat" INTO TABLE customer_demographics; + +drop table if exists date_dim; +create external table date_dim +( + d_date_sk int, + d_date_id string, + d_date string, + d_month_seq int, + d_week_seq int, + d_quarter_seq int, + d_year int, + d_dow int, + d_moy int, + d_dom int, + d_qoy int, + d_fy_year int, + d_fy_quarter_seq int, + d_fy_week_seq int, + d_day_name string, + d_quarter_name string, + d_holiday string, + d_weekend string, + d_following_holiday string, + d_first_dom int, + d_last_dom int, + d_same_day_ly int, + d_same_day_lq int, + d_current_day string, + d_current_week string, + d_current_month string, + d_current_quarter string, + d_current_year string +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/date_dim.dat" INTO TABLE date_dim; + +drop table if exists household_demographics; +create external table household_demographics +( + hd_demo_sk int, + hd_income_band_sk int, + hd_buy_potential string, + hd_dep_count int, + hd_vehicle_count int +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/household_demographics.dat" INTO TABLE household_demographics; + +drop table if exists income_band; +create external table income_band +( + ib_income_band_sk int, + ib_lower_bound int, + ib_upper_bound int +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/income_band.dat" INTO TABLE income_band; + +drop table if exists inventory; +create external table inventory +( + inv_date_sk int, + inv_item_sk int, + inv_warehouse_sk int, + inv_quantity_on_hand int +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/inventory.dat" INTO TABLE inventory; + +drop table if exists item; +create external table item +( + i_item_sk int, + i_item_id string, + i_rec_start_date string, + i_rec_end_date string, + i_item_desc string, + i_current_price decimal(7,2), + i_wholesale_cost decimal(7,2), + i_brand_id int, + i_brand string, + i_class_id int, + i_class string, + i_category_id int, + i_category string, + i_manufact_id int, + i_manufact string, + i_size string, + i_formulation string, + i_color string, + i_units string, + i_container string, + i_manager_id int, + i_product_name string +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/item.dat" INTO TABLE item; + +drop table if exists promotion; +create external table promotion +( + p_promo_sk int, + p_promo_id string, + p_start_date_sk int, + p_end_date_sk int, + p_item_sk int, + p_cost decimal(15,2), + p_response_target int, + p_promo_name string, + p_channel_dmail string, + p_channel_email string, + p_channel_catalog string, + p_channel_tv string, + p_channel_radio string, + p_channel_press string, + p_channel_event string, + p_channel_demo string, + p_channel_details string, + p_purpose string, + p_discount_active string +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/promotion.dat" INTO TABLE promotion; + +drop table if exists reason; +create external table reason +( + r_reason_sk int, + r_reason_id string, + r_reason_desc string +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/reason.dat" INTO TABLE reason; + +drop table if exists ship_mode; +create external table ship_mode +( + sm_ship_mode_sk int, + sm_ship_mode_id string, + sm_type string, + sm_code string, + sm_carrier string, + sm_contract string +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/ship_mode.dat" INTO TABLE ship_mode; + +drop table if exists store; +create external table store +( + s_store_sk int, + s_store_id string, + s_rec_start_date string, + s_rec_end_date string, + s_closed_date_sk int, + s_store_name string, + s_number_employees int, + s_floor_space int, + s_hours string, + s_manager string, + s_market_id int, + s_geography_class string, + s_market_desc string, + s_market_manager string, + s_division_id int, + s_division_name string, + s_company_id int, + s_company_name string, + s_street_number string, + s_street_name string, + s_street_type string, + s_suite_number string, + s_city string, + s_county string, + s_state string, + s_zip string, + s_country string, + s_gmt_offset decimal(5,2), + s_tax_precentage decimal(5,2) +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/store.dat" INTO TABLE store; + +drop table if exists store_returns; +create external table store_returns +( + sr_returned_date_sk int, + sr_return_time_sk int, + sr_item_sk int, + sr_customer_sk int, + sr_cdemo_sk int, + sr_hdemo_sk int, + sr_addr_sk int, + sr_store_sk int, + sr_reason_sk int, + sr_ticket_number int, + sr_return_quantity int, + sr_return_amt decimal(7,2), + sr_return_tax decimal(7,2), + sr_return_amt_inc_tax decimal(7,2), + sr_fee decimal(7,2), + sr_return_ship_cost decimal(7,2), + sr_refunded_cash decimal(7,2), + sr_reversed_charge decimal(7,2), + sr_store_credit decimal(7,2), + sr_net_loss decimal(7,2) +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/store_returns.dat" INTO TABLE store_returns; + +drop table if exists store_sales; +create external table store_sales +( + ss_sold_date_sk int, + ss_sold_time_sk int, + ss_item_sk int, + ss_customer_sk int, + ss_cdemo_sk int, + ss_hdemo_sk int, + ss_addr_sk int, + ss_store_sk int, + ss_promo_sk int, + ss_ticket_number int, + ss_quantity int, + ss_wholesale_cost decimal(7,2), + ss_list_price decimal(7,2), + ss_sales_price decimal(7,2), + ss_ext_discount_amt decimal(7,2), + ss_ext_sales_price decimal(7,2), + ss_ext_wholesale_cost decimal(7,2), + ss_ext_list_price decimal(7,2), + ss_ext_tax decimal(7,2), + ss_coupon_amt decimal(7,2), + ss_net_paid decimal(7,2), + ss_net_paid_inc_tax decimal(7,2), + ss_net_profit decimal(7,2) +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/store_sales.dat" INTO TABLE store_sales; + +drop table if exists time_dim; +create external table time_dim +( + t_time_sk int, + t_time_id string, + t_time int, + t_hour int, + t_minute int, + t_second int, + t_am_pm string, + t_shift string, + t_sub_shift string, + t_meal_time string +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/time_dim.dat" INTO TABLE time_dim; + +drop table if exists warehouse; +create external table warehouse +( + w_warehouse_sk int, + w_warehouse_id string, + w_warehouse_name string, + w_warehouse_sq_ft int, + w_street_number string, + w_street_name string, + w_street_type string, + w_suite_number string, + w_city string, + w_county string, + w_state string, + w_zip string, + w_country string, + w_gmt_offset decimal(5,2) +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/warehouse.dat" INTO TABLE warehouse; + +drop table if exists web_page; +create external table web_page +( + wp_web_page_sk int, + wp_web_page_id string, + wp_rec_start_date string, + wp_rec_end_date string, + wp_creation_date_sk int, + wp_access_date_sk int, + wp_autogen_flag string, + wp_customer_sk int, + wp_url string, + wp_type string, + wp_char_count int, + wp_link_count int, + wp_image_count int, + wp_max_ad_count int +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/web_page.dat" INTO TABLE web_page; + +drop table if exists web_returns; +create external table web_returns +( + wr_returned_date_sk int, + wr_returned_time_sk int, + wr_item_sk int, + wr_refunded_customer_sk int, + wr_refunded_cdemo_sk int, + wr_refunded_hdemo_sk int, + wr_refunded_addr_sk int, + wr_returning_customer_sk int, + wr_returning_cdemo_sk int, + wr_returning_hdemo_sk int, + wr_returning_addr_sk int, + wr_web_page_sk int, + wr_reason_sk int, + wr_order_number int, + wr_return_quantity int, + wr_return_amt decimal(7,2), + wr_return_tax decimal(7,2), + wr_return_amt_inc_tax decimal(7,2), + wr_fee decimal(7,2), + wr_return_ship_cost decimal(7,2), + wr_refunded_cash decimal(7,2), + wr_reversed_charge decimal(7,2), + wr_account_credit decimal(7,2), + wr_net_loss decimal(7,2) +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/web_returns.dat" INTO TABLE web_returns; + +drop table if exists web_sales; +create external table web_sales +( + ws_sold_date_sk int, + ws_sold_time_sk int, + ws_ship_date_sk int, + ws_item_sk int, + ws_bill_customer_sk int, + ws_bill_cdemo_sk int, + ws_bill_hdemo_sk int, + ws_bill_addr_sk int, + ws_ship_customer_sk int, + ws_ship_cdemo_sk int, + ws_ship_hdemo_sk int, + ws_ship_addr_sk int, + ws_web_page_sk int, + ws_web_site_sk int, + ws_ship_mode_sk int, + ws_warehouse_sk int, + ws_promo_sk int, + ws_order_number int, + ws_quantity int, + ws_wholesale_cost decimal(7,2), + ws_list_price decimal(7,2), + ws_sales_price decimal(7,2), + ws_ext_discount_amt decimal(7,2), + ws_ext_sales_price decimal(7,2), + ws_ext_wholesale_cost decimal(7,2), + ws_ext_list_price decimal(7,2), + ws_ext_tax decimal(7,2), + ws_coupon_amt decimal(7,2), + ws_ext_ship_cost decimal(7,2), + ws_net_paid decimal(7,2), + ws_net_paid_inc_tax decimal(7,2), + ws_net_paid_inc_ship decimal(7,2), + ws_net_paid_inc_ship_tax decimal(7,2), + ws_net_profit decimal(7,2) +) +row format delimited fields terminated by '|' +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/web_sales.dat" INTO TABLE web_sales; + +drop table if exists web_site; +create external table web_site +( + web_site_sk int, + web_site_id string, + web_rec_start_date string, + web_rec_end_date string, + web_name string, + web_open_date_sk int, + web_close_date_sk int, + web_class string, + web_manager string, + web_mkt_id int, + web_mkt_class string, + web_mkt_desc string, + web_market_manager string, + web_company_id int, + web_company_name string, + web_street_number string, + web_street_name string, + web_street_type string, + web_suite_number string, + web_city string, + web_county string, + web_state string, + web_zip string, + web_country string, + web_gmt_offset decimal(5,2), + web_tax_percentage decimal(5,2) +) +STORED AS TEXTFILE; +LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/tpcds-perf/10k/web_site.dat" INTO TABLE web_site; + diff --git a/itests/qtest/pom.xml b/itests/qtest/pom.xml index e195bee..faac464 100644 --- a/itests/qtest/pom.xml +++ b/itests/qtest/pom.xml @@ -395,6 +395,7 @@ + @@ -440,6 +441,23 @@ initScript="q_test_init.sql" cleanupScript="q_test_cleanup.sql"/> + + + 500) and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and date_dim.d_qoy = 2 and date_dim.d_year = 2000 group by ca_zip order by ca_zip limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query17.q b/ql/src/test/queries/clientpositive/perf/query17.q new file mode 100644 index 0000000..bb8a33b --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query17.q @@ -0,0 +1 @@ +explain select i_item_id ,i_item_desc ,s_state ,count(ss_quantity) as store_sales_quantitycount ,avg(ss_quantity) as store_sales_quantityave ,stddev_samp(ss_quantity) as store_sales_quantitystdev ,stddev_samp(ss_quantity)/avg(ss_quantity) as store_sales_quantitycov ,count(sr_return_quantity) as_store_returns_quantitycount ,avg(sr_return_quantity) as_store_returns_quantityave ,stddev_samp(sr_return_quantity) as_store_returns_quantitystdev ,stddev_samp(sr_return_quantity)/avg(sr_return_quantity) as store_returns_quantitycov ,count(cs_quantity) as catalog_sales_quantitycount ,avg(cs_quantity) as catalog_sales_quantityave ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitystdev ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitycov from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_quarter_name = '2000Q1' and d1.d_date_sk = store_sales.ss_sold_date_sk and item.i_item_sk = store_sales.ss_item_sk and store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_customer_sk = store_returns.sr_customer_sk and store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number and store_returns.sr_returned_date_sk = d2.d_date_sk and d2.d_quarter_name in ('2000Q1','2000Q2','2000Q3') and store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk and store_returns.sr_item_sk = catalog_sales.cs_item_sk and catalog_sales.cs_sold_date_sk = d3.d_date_sk and d3.d_quarter_name in ('2000Q1','2000Q2','2000Q3') group by i_item_id ,i_item_desc ,s_state order by i_item_id ,i_item_desc ,s_state limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query18.q b/ql/src/test/queries/clientpositive/perf/query18.q new file mode 100644 index 0000000..e6061f5 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query18.q @@ -0,0 +1 @@ +explain select i_item_id, ca_country, ca_state, ca_county, avg( cast(cs_quantity as decimal(12,2))) agg1, avg( cast(cs_list_price as decimal(12,2))) agg2, avg( cast(cs_coupon_amt as decimal(12,2))) agg3, avg( cast(cs_sales_price as decimal(12,2))) agg4, avg( cast(cs_net_profit as decimal(12,2))) agg5, avg( cast(c_birth_year as decimal(12,2))) agg6, avg( cast(cd1.cd_dep_count as decimal(12,2))) agg7 from catalog_sales, date_dim, customer_demographics cd1, item, customer, customer_address, customer_demographics cd2 where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_item_sk = item.i_item_sk and catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk and catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and cd1.cd_gender = 'M' and cd1.cd_education_status = 'College' and customer.c_current_cdemo_sk = cd2.cd_demo_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and c_birth_month in (9,5,12,4,1,10) and d_year = 2001 and ca_state in ('ND','WI','AL' ,'NC','OK','MS','TN') group by i_item_id, ca_country, ca_state, ca_county with rollup order by ca_country, ca_state, ca_county, i_item_id limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query19.q b/ql/src/test/queries/clientpositive/perf/query19.q new file mode 100644 index 0000000..cfb6218 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query19.q @@ -0,0 +1 @@ +explain select i_brand_id brand_id, i_brand brand, i_manufact_id, i_manufact, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item,customer,customer_address,store where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and i_manager_id=7 and d_moy=11 and d_year=1999 and store_sales.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and substr(ca_zip,1,5) <> substr(s_zip,1,5) and store_sales.ss_store_sk = store.s_store_sk group by i_brand ,i_brand_id ,i_manufact_id ,i_manufact order by ext_price desc ,i_brand ,i_brand_id ,i_manufact_id ,i_manufact limit 100 ; diff --git a/ql/src/test/queries/clientpositive/perf/query20.q b/ql/src/test/queries/clientpositive/perf/query20.q new file mode 100644 index 0000000..d4ea10d --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query20.q @@ -0,0 +1 @@ +explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(cs_ext_sales_price) as itemrevenue ,sum(cs_ext_sales_price)*100/sum(sum(cs_ext_sales_price)) over (partition by i_class) as revenueratio from catalog_sales ,item ,date_dim where catalog_sales.cs_item_sk = item.i_item_sk and i_category in ('Jewelry', 'Sports', 'Books') and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and d_date between '2001-01-12' and '2001-02-11' group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query22.q b/ql/src/test/queries/clientpositive/perf/query22.q new file mode 100644 index 0000000..17cece2 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query22.q @@ -0,0 +1 @@ +explain select i_product_name ,i_brand ,i_class ,i_category ,avg(inv_quantity_on_hand) qoh from inventory ,date_dim ,item ,warehouse where inventory.inv_date_sk=date_dim.d_date_sk and inventory.inv_item_sk=item.i_item_sk and inventory.inv_warehouse_sk = warehouse.w_warehouse_sk and date_dim.d_month_seq between 1193 and 1193 + 11 group by i_product_name ,i_brand ,i_class ,i_category with rollup order by qoh, i_product_name, i_brand, i_class, i_category limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query25.q b/ql/src/test/queries/clientpositive/perf/query25.q new file mode 100644 index 0000000..80185ab --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query25.q @@ -0,0 +1 @@ +explain select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,sum(ss_net_profit) as store_sales_profit ,sum(sr_net_loss) as store_returns_loss ,sum(cs_net_profit) as catalog_sales_profit from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 4 and d1.d_year = 1998 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 4 and 10 and d2.d_year = 1998 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_moy between 4 and 10 and d3.d_year = 1998 group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query26.q b/ql/src/test/queries/clientpositive/perf/query26.q new file mode 100644 index 0000000..0e81120 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query26.q @@ -0,0 +1 @@ +explain select i_item_id, avg(cs_quantity) agg1, avg(cs_list_price) agg2, avg(cs_coupon_amt) agg3, avg(cs_sales_price) agg4 from catalog_sales, customer_demographics, date_dim, item, promotion where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_item_sk = item.i_item_sk and catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk and catalog_sales.cs_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query27.q b/ql/src/test/queries/clientpositive/perf/query27.q new file mode 100644 index 0000000..58be664 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query27.q @@ -0,0 +1 @@ +explain select i_item_id, s_state, avg(ss_quantity) agg1, avg(ss_list_price) agg2, avg(ss_coupon_amt) agg3, avg(ss_sales_price) agg4 from store_sales, customer_demographics, date_dim, store, item where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and customer_demographics.cd_gender = 'F' and customer_demographics.cd_marital_status = 'D' and customer_demographics.cd_education_status = 'Unknown' and date_dim.d_year = 1998 and store.s_state in ('KS','AL', 'MN', 'AL', 'SC', 'VT') group by i_item_id, s_state order by i_item_id ,s_state limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query29.q b/ql/src/test/queries/clientpositive/perf/query29.q new file mode 100644 index 0000000..1634b1f --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query29.q @@ -0,0 +1 @@ +explain select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,sum(ss_quantity) as store_sales_quantity ,sum(sr_return_quantity) as store_returns_quantity ,sum(cs_quantity) as catalog_sales_quantity from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 2 and d1.d_year = 2000 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 2 and 2 + 3 and d2.d_year = 2000 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_year in (2000,2000+1,2000+2) group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query3.q b/ql/src/test/queries/clientpositive/perf/query3.q new file mode 100644 index 0000000..47dfac5 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query3.q @@ -0,0 +1 @@ +explain select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) sum_agg from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manufact_id = 436 and dt.d_moy=12 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,sum_agg desc ,brand_id limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query31.q b/ql/src/test/queries/clientpositive/perf/query31.q new file mode 100644 index 0000000..147ad15 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query31.q @@ -0,0 +1 @@ +explain with ss as (select ca_county,d_qoy, d_year,sum(ss_ext_sales_price) as store_sales from store_sales,date_dim,customer_address where ss_sold_date_sk = d_date_sk and ss_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year), ws as (select ca_county,d_qoy, d_year,sum(ws_ext_sales_price) as web_sales from web_sales,date_dim,customer_address where ws_sold_date_sk = d_date_sk and ws_bill_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year) select ss1.ca_county ,ss1.d_year ,ws2.web_sales/ws1.web_sales web_q1_q2_increase ,ss2.store_sales/ss1.store_sales store_q1_q2_increase ,ws3.web_sales/ws2.web_sales web_q2_q3_increase ,ss3.store_sales/ss2.store_sales store_q2_q3_increase from ss ss1 ,ss ss2 ,ss ss3 ,ws ws1 ,ws ws2 ,ws ws3 where ss1.d_qoy = 1 and ss1.d_year = 1998 and ss1.ca_county = ss2.ca_county and ss2.d_qoy = 2 and ss2.d_year = 1998 and ss2.ca_county = ss3.ca_county and ss3.d_qoy = 3 and ss3.d_year = 1998 and ss1.ca_county = ws1.ca_county and ws1.d_qoy = 1 and ws1.d_year = 1998 and ws1.ca_county = ws2.ca_county and ws2.d_qoy = 2 and ws2.d_year = 1998 and ws1.ca_county = ws3.ca_county and ws3.d_qoy = 3 and ws3.d_year =1998 and case when ws1.web_sales > 0 then ws2.web_sales/ws1.web_sales else null end > case when ss1.store_sales > 0 then ss2.store_sales/ss1.store_sales else null end and case when ws2.web_sales > 0 then ws3.web_sales/ws2.web_sales else null end > case when ss2.store_sales > 0 then ss3.store_sales/ss2.store_sales else null end order by web_q1_q2_increase; diff --git a/ql/src/test/queries/clientpositive/perf/query34.q b/ql/src/test/queries/clientpositive/perf/query34.q new file mode 100644 index 0000000..5fc82cb --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query34.q @@ -0,0 +1 @@ +explain select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (date_dim.d_dom between 1 and 3 or date_dim.d_dom between 25 and 28) and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '5001-10000') and household_demographics.hd_vehicle_count > 0 and (case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end) > 1.2 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_county in ('Kittitas County','Adams County','Richland County','Furnas County', 'Orange County','Appanoose County','Franklin Parish','Tehama County') group by ss_ticket_number,ss_customer_sk) dn,customer where dn.ss_customer_sk = customer.c_customer_sk and cnt between 15 and 20 order by c_last_name,c_first_name,c_salutation,c_preferred_cust_flag desc; diff --git a/ql/src/test/queries/clientpositive/perf/query39.q b/ql/src/test/queries/clientpositive/perf/query39.q new file mode 100644 index 0000000..abf2bdd --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query39.q @@ -0,0 +1 @@ +explain with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov ; with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 and inv1.cov > 1.5 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov ; diff --git a/ql/src/test/queries/clientpositive/perf/query40.q b/ql/src/test/queries/clientpositive/perf/query40.q new file mode 100644 index 0000000..2a6c273 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query40.q @@ -0,0 +1 @@ +explain select w_state ,i_item_id ,sum(case when (cast(d_date as date) < cast ('1998-04-08' as date)) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_before ,sum(case when (cast(d_date as date) >= cast ('1998-04-08' as date)) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_after from catalog_sales left outer join catalog_returns on (catalog_sales.cs_order_number = catalog_returns.cr_order_number and catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) ,warehouse ,item ,date_dim where i_current_price between 0.99 and 1.49 and item.i_item_sk = catalog_sales.cs_item_sk and catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and date_dim.d_date between '1998-03-09' and '1998-05-08' group by w_state,i_item_id order by w_state,i_item_id limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query42.q b/ql/src/test/queries/clientpositive/perf/query42.q new file mode 100644 index 0000000..c4b115b --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query42.q @@ -0,0 +1 @@ +explain select dt.d_year ,item.i_category_id ,item.i_category ,sum(ss_ext_sales_price) as s from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=1998 group by dt.d_year ,item.i_category_id ,item.i_category order by s desc,dt.d_year ,item.i_category_id ,item.i_category limit 100 ; diff --git a/ql/src/test/queries/clientpositive/perf/query43.q b/ql/src/test/queries/clientpositive/perf/query43.q new file mode 100644 index 0000000..f1c22e8 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query43.q @@ -0,0 +1 @@ +explain select s_store_name, s_store_id, sum(case when (d_day_name='Sunday') then ss_sales_price else null end) sun_sales, sum(case when (d_day_name='Monday') then ss_sales_price else null end) mon_sales, sum(case when (d_day_name='Tuesday') then ss_sales_price else null end) tue_sales, sum(case when (d_day_name='Wednesday') then ss_sales_price else null end) wed_sales, sum(case when (d_day_name='Thursday') then ss_sales_price else null end) thu_sales, sum(case when (d_day_name='Friday') then ss_sales_price else null end) fri_sales, sum(case when (d_day_name='Saturday') then ss_sales_price else null end) sat_sales from date_dim, store_sales, store where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store.s_store_sk = store_sales.ss_store_sk and s_gmt_offset = -6 and d_year = 1998 group by s_store_name, s_store_id order by s_store_name, s_store_id,sun_sales,mon_sales,tue_sales,wed_sales,thu_sales,fri_sales,sat_sales limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query45.q b/ql/src/test/queries/clientpositive/perf/query45.q new file mode 100644 index 0000000..0b34bfd --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query45.q @@ -0,0 +1 @@ +explain select ca_zip, ca_county, sum(ws_sales_price) from web_sales JOIN customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk JOIN customer_address ON customer.c_current_addr_sk = customer_address.ca_address_sk JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk JOIN item ON web_sales.ws_item_sk = item.i_item_sk where ( item.i_item_id in (select i_item_id from item i2 where i2.i_item_sk in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) ) ) and d_qoy = 2 and d_year = 2000 group by ca_zip, ca_county order by ca_zip, ca_county limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query46.q b/ql/src/test/queries/clientpositive/perf/query46.q new file mode 100644 index 0000000..3e8711f --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query46.q @@ -0,0 +1 @@ +explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,amt,profit from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from store_sales,date_dim,store,household_demographics,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_dow in (6,0) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem','Clinton','Clifton','Springfield') group by ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city) dn,customer,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query48.q b/ql/src/test/queries/clientpositive/perf/query48.q new file mode 100644 index 0000000..27fa4db --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query48.q @@ -0,0 +1 @@ +explain select sum (ss_quantity) from store_sales, store, customer_demographics, customer_address, date_dim where store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_sold_date_sk = date_dim.d_date_sk and d_year = 1998 and ( ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 100.00 and 150.00 ) or ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 50.00 and 100.00 ) or ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 150.00 and 200.00 ) ) and ( ( store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ss_net_profit between 0 and 2000 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN') and ss_net_profit between 150 and 3000 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV') and ss_net_profit between 50 and 25000 ) ) ; diff --git a/ql/src/test/queries/clientpositive/perf/query50.q b/ql/src/test/queries/clientpositive/perf/query50.q new file mode 100644 index 0000000..b347f6f --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query50.q @@ -0,0 +1 @@ +explain select s_store_name ,s_company_id ,s_street_number ,s_street_name ,s_street_type ,s_suite_number ,s_city ,s_county ,s_state ,s_zip ,sum(case when (sr_returned_date_sk - ss_sold_date_sk <= 30 ) then 1 else 0 end) as 30days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 30) and (sr_returned_date_sk - ss_sold_date_sk <= 60) then 1 else 0 end ) as 3160days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 60) and (sr_returned_date_sk - ss_sold_date_sk <= 90) then 1 else 0 end) as 6190days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 90) and (sr_returned_date_sk - ss_sold_date_sk <= 120) then 1 else 0 end) as 91120days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 120) then 1 else 0 end) as 120days from store_sales ,store_returns ,store ,date_dim d1 ,date_dim d2 where d2.d_year = 2000 and d2.d_moy = 9 and store_sales.ss_ticket_number = store_returns.sr_ticket_number and store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_sold_date_sk = d1.d_date_sk and sr_returned_date_sk = d2.d_date_sk and store_sales.ss_customer_sk = store_returns.sr_customer_sk and store_sales.ss_store_sk = store.s_store_sk group by s_store_name ,s_company_id ,s_street_number ,s_street_name ,s_street_type ,s_suite_number ,s_city ,s_county ,s_state ,s_zip order by s_store_name ,s_company_id ,s_street_number ,s_street_name ,s_street_type ,s_suite_number ,s_city ,s_county ,s_state ,s_zip limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query52.q b/ql/src/test/queries/clientpositive/perf/query52.q new file mode 100644 index 0000000..24d0ac3 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query52.q @@ -0,0 +1 @@ +explain select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) ext_price from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=1998 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,ext_price desc ,brand_id limit 100 ; diff --git a/ql/src/test/queries/clientpositive/perf/query54.q b/ql/src/test/queries/clientpositive/perf/query54.q new file mode 100644 index 0000000..b1a3e83 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query54.q @@ -0,0 +1 @@ +explain with my_customers as ( select c_customer_sk , c_current_addr_sk from ( select cs_sold_date_sk sold_date_sk, cs_bill_customer_sk customer_sk, cs_item_sk item_sk from catalog_sales union all select ws_sold_date_sk sold_date_sk, ws_bill_customer_sk customer_sk, ws_item_sk item_sk from web_sales ) cs_or_ws_sales, item, date_dim, customer where sold_date_sk = d_date_sk and item_sk = i_item_sk and i_category = 'Jewelry' and i_class = 'football' and c_customer_sk = cs_or_ws_sales.customer_sk and d_moy = 3 and d_year = 2000 group by c_customer_sk , c_current_addr_sk ) , my_revenue as ( select c_customer_sk, sum(ss_ext_sales_price) as revenue from my_customers, store_sales, customer_address, store, date_dim where c_current_addr_sk = ca_address_sk and ca_county = s_county and ca_state = s_state and ss_sold_date_sk = d_date_sk and c_customer_sk = ss_customer_sk and d_month_seq between (1203) and (1205) group by c_customer_sk ) , segments as (select cast((revenue/50) as int) as segment from my_revenue ) select segment, count(*) as num_customers, segment*50 as segment_base from segments group by segment order by segment, num_customers limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query55.q b/ql/src/test/queries/clientpositive/perf/query55.q new file mode 100644 index 0000000..644ba1a --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query55.q @@ -0,0 +1 @@ +explain select i_brand_id brand_id, i_brand brand, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and i_manager_id=36 and d_moy=12 and d_year=2001 group by i_brand, i_brand_id order by ext_price desc, i_brand_id limit 100 ; diff --git a/ql/src/test/queries/clientpositive/perf/query64.q b/ql/src/test/queries/clientpositive/perf/query64.q new file mode 100644 index 0000000..7afb7d2 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query64.q @@ -0,0 +1 @@ +explain select cs1.product_name ,cs1.store_name ,cs1.store_zip ,cs1.b_street_number ,cs1.b_streen_name ,cs1.b_city ,cs1.b_zip ,cs1.c_street_number ,cs1.c_street_name ,cs1.c_city ,cs1.c_zip ,cs1.syear ,cs1.cnt ,cs1.s1 ,cs1.s2 ,cs1.s3 ,cs2.s1 ,cs2.s2 ,cs2.s3 ,cs2.syear ,cs2.cnt from (select i_product_name as product_name ,i_item_sk as item_sk ,s_store_name as store_name ,s_zip as store_zip ,ad1.ca_street_number as b_street_number ,ad1.ca_street_name as b_streen_name ,ad1.ca_city as b_city ,ad1.ca_zip as b_zip ,ad2.ca_street_number as c_street_number ,ad2.ca_street_name as c_street_name ,ad2.ca_city as c_city ,ad2.ca_zip as c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year as s2year ,count(*) as cnt ,sum(ss_wholesale_cost) as s1 ,sum(ss_list_price) as s2 ,sum(ss_coupon_amt) as s3 FROM store_sales JOIN store_returns ON store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk JOIN date_dim d1 ON store_sales.ss_sold_date_sk = d1.d_date_sk JOIN date_dim d2 ON customer.c_first_sales_date_sk = d2.d_date_sk JOIN date_dim d3 ON customer.c_first_shipto_date_sk = d3.d_date_sk JOIN store ON store_sales.ss_store_sk = store.s_store_sk JOIN customer_demographics cd1 ON store_sales.ss_cdemo_sk= cd1.cd_demo_sk JOIN customer_demographics cd2 ON customer.c_current_cdemo_sk = cd2.cd_demo_sk JOIN promotion ON store_sales.ss_promo_sk = promotion.p_promo_sk JOIN household_demographics hd1 ON store_sales.ss_hdemo_sk = hd1.hd_demo_sk JOIN household_demographics hd2 ON customer.c_current_hdemo_sk = hd2.hd_demo_sk JOIN customer_address ad1 ON store_sales.ss_addr_sk = ad1.ca_address_sk JOIN customer_address ad2 ON customer.c_current_addr_sk = ad2.ca_address_sk JOIN income_band ib1 ON hd1.hd_income_band_sk = ib1.ib_income_band_sk JOIN income_band ib2 ON hd2.hd_income_band_sk = ib2.ib_income_band_sk JOIN item ON store_sales.ss_item_sk = item.i_item_sk JOIN (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from catalog_sales JOIN catalog_returns ON catalog_sales.cs_item_sk = catalog_returns.cr_item_sk and catalog_sales.cs_order_number = catalog_returns.cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)) cs_ui ON store_sales.ss_item_sk = cs_ui.cs_item_sk WHERE cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('maroon','burnished','dim','steel','navajo','chocolate') and i_current_price between 35 and 35 + 10 and i_current_price between 35 + 1 and 35 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) cs1 JOIN (select i_product_name as product_name ,i_item_sk as item_sk ,s_store_name as store_name ,s_zip as store_zip ,ad1.ca_street_number as b_street_number ,ad1.ca_street_name as b_streen_name ,ad1.ca_city as b_city ,ad1.ca_zip as b_zip ,ad2.ca_street_number as c_street_number ,ad2.ca_street_name as c_street_name ,ad2.ca_city as c_city ,ad2.ca_zip as c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year as s2year ,count(*) as cnt ,sum(ss_wholesale_cost) as s1 ,sum(ss_list_price) as s2 ,sum(ss_coupon_amt) as s3 FROM store_sales JOIN store_returns ON store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk JOIN date_dim d1 ON store_sales.ss_sold_date_sk = d1.d_date_sk JOIN date_dim d2 ON customer.c_first_sales_date_sk = d2.d_date_sk JOIN date_dim d3 ON customer.c_first_shipto_date_sk = d3.d_date_sk JOIN store ON store_sales.ss_store_sk = store.s_store_sk JOIN customer_demographics cd1 ON store_sales.ss_cdemo_sk= cd1.cd_demo_sk JOIN customer_demographics cd2 ON customer.c_current_cdemo_sk = cd2.cd_demo_sk JOIN promotion ON store_sales.ss_promo_sk = promotion.p_promo_sk JOIN household_demographics hd1 ON store_sales.ss_hdemo_sk = hd1.hd_demo_sk JOIN household_demographics hd2 ON customer.c_current_hdemo_sk = hd2.hd_demo_sk JOIN customer_address ad1 ON store_sales.ss_addr_sk = ad1.ca_address_sk JOIN customer_address ad2 ON customer.c_current_addr_sk = ad2.ca_address_sk JOIN income_band ib1 ON hd1.hd_income_band_sk = ib1.ib_income_band_sk JOIN income_band ib2 ON hd2.hd_income_band_sk = ib2.ib_income_band_sk JOIN item ON store_sales.ss_item_sk = item.i_item_sk JOIN (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from catalog_sales JOIN catalog_returns ON catalog_sales.cs_item_sk = catalog_returns.cr_item_sk and catalog_sales.cs_order_number = catalog_returns.cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)) cs_ui ON store_sales.ss_item_sk = cs_ui.cs_item_sk WHERE cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('maroon','burnished','dim','steel','navajo','chocolate') and i_current_price between 35 and 35 + 10 and i_current_price between 35 + 1 and 35 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) cs2 ON cs1.item_sk=cs2.item_sk where cs1.syear = 2000 and cs2.syear = 2000 + 1 and cs2.cnt <= cs1.cnt and cs1.store_name = cs2.store_name and cs1.store_zip = cs2.store_zip order by cs1.product_name ,cs1.store_name ,cs2.cnt; diff --git a/ql/src/test/queries/clientpositive/perf/query68.q b/ql/src/test/queries/clientpositive/perf/query68.q new file mode 100644 index 0000000..34f87c2 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query68.q @@ -0,0 +1 @@ +explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,extended_price ,extended_tax ,list_price from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_ext_sales_price) extended_price ,sum(ss_ext_list_price) list_price ,sum(ss_ext_tax) extended_tax from store_sales ,date_dim ,store ,household_demographics ,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem') group by ss_ticket_number ,ss_customer_sk ,ss_addr_sk,ca_city) dn ,customer ,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,ss_ticket_number limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query7.q b/ql/src/test/queries/clientpositive/perf/query7.q new file mode 100644 index 0000000..39c4383 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query7.q @@ -0,0 +1 @@ +explain select i_item_id, avg(ss_quantity) agg1, avg(ss_list_price) agg2, avg(ss_coupon_amt) agg3, avg(ss_sales_price) agg4 from store_sales, customer_demographics, date_dim, item, promotion where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and store_sales.ss_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query70.q b/ql/src/test/queries/clientpositive/perf/query70.q new file mode 100644 index 0000000..df74bfb --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query70.q @@ -0,0 +1 @@ +explain select sum(ss_net_profit) as total_sum ,s_state ,s_county ,grouping__id as lochierarchy , rank() over(partition by grouping__id, case when grouping__id == 2 then s_state end order by sum(ss_net_profit)) as rank_within_parent from store_sales ss join date_dim d1 on d1.d_date_sk = ss.ss_sold_date_sk join store s on s.s_store_sk = ss.ss_store_sk where d1.d_month_seq between 1193 and 1193+11 and s.s_state in ( select s_state from (select s_state as s_state, sum(ss_net_profit), rank() over ( partition by s_state order by sum(ss_net_profit) desc) as ranking from store_sales, store, date_dim where d_month_seq between 1193 and 1193+11 and date_dim.d_date_sk = store_sales.ss_sold_date_sk and store.s_store_sk = store_sales.ss_store_sk group by s_state ) tmp1 where ranking <= 5 ) group by s_state,s_county with rollup order by lochierarchy desc ,case when lochierarchy = 0 then s_state end ,rank_within_parent limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query71.q b/ql/src/test/queries/clientpositive/perf/query71.q new file mode 100644 index 0000000..c7c4e9f --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query71.q @@ -0,0 +1 @@ +explain select i_brand_id brand_id, i_brand brand,t_hour,t_minute, sum(ext_price) ext_price from item JOIN (select ws_ext_sales_price as ext_price, ws_sold_date_sk as sold_date_sk, ws_item_sk as sold_item_sk, ws_sold_time_sk as time_sk from web_sales,date_dim where date_dim.d_date_sk = web_sales.ws_sold_date_sk and d_moy=12 and d_year=2001 union all select cs_ext_sales_price as ext_price, cs_sold_date_sk as sold_date_sk, cs_item_sk as sold_item_sk, cs_sold_time_sk as time_sk from catalog_sales,date_dim where date_dim.d_date_sk = catalog_sales.cs_sold_date_sk and d_moy=12 and d_year=2001 union all select ss_ext_sales_price as ext_price, ss_sold_date_sk as sold_date_sk, ss_item_sk as sold_item_sk, ss_sold_time_sk as time_sk from store_sales,date_dim where date_dim.d_date_sk = store_sales.ss_sold_date_sk and d_moy=12 and d_year=2001 ) tmp ON tmp.sold_item_sk = item.i_item_sk JOIN time_dim ON tmp.time_sk = time_dim.t_time_sk where i_manager_id=1 and (t_meal_time = 'breakfast' or t_meal_time = 'dinner') group by i_brand, i_brand_id,t_hour,t_minute order by ext_price desc, i_brand_id ; diff --git a/ql/src/test/queries/clientpositive/perf/query72.q b/ql/src/test/queries/clientpositive/perf/query72.q new file mode 100644 index 0000000..ee4c3d0 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query72.q @@ -0,0 +1 @@ +explain select i_item_desc ,w_warehouse_name ,d1.d_week_seq ,count(case when p_promo_sk is null then 1 else 0 end) no_promo ,count(case when p_promo_sk is not null then 1 else 0 end) promo ,count(*) total_cnt from catalog_sales join inventory on (catalog_sales.cs_item_sk = inventory.inv_item_sk) join warehouse on (warehouse.w_warehouse_sk=inventory.inv_warehouse_sk) join item on (item.i_item_sk = catalog_sales.cs_item_sk) join customer_demographics on (catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk) join household_demographics on (catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk) join date_dim d1 on (catalog_sales.cs_sold_date_sk = d1.d_date_sk) join date_dim d2 on (inventory.inv_date_sk = d2.d_date_sk) join date_dim d3 on (catalog_sales.cs_ship_date_sk = d3.d_date_sk) left outer join promotion on (catalog_sales.cs_promo_sk=promotion.p_promo_sk) left outer join catalog_returns on (catalog_returns.cr_item_sk = catalog_sales.cs_item_sk and catalog_returns.cr_order_number = catalog_sales.cs_order_number) where d1.d_week_seq = d2.d_week_seq and inv_quantity_on_hand < cs_quantity and d3.d_date > d1.d_date + 5 and hd_buy_potential = '1001-5000' and d1.d_year = 2001 and hd_buy_potential = '1001-5000' and cd_marital_status = 'M' and d1.d_year = 2001 group by i_item_desc,w_warehouse_name,d1.d_week_seq order by total_cnt desc, i_item_desc, w_warehouse_name, d_week_seq limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query73.q b/ql/src/test/queries/clientpositive/perf/query73.q new file mode 100644 index 0000000..7465e6d --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query73.q @@ -0,0 +1 @@ +explain select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '5001-10000') and household_demographics.hd_vehicle_count > 0 and case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end > 1 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_county in ('Kittitas County','Adams County','Richland County','Furnas County') group by ss_ticket_number,ss_customer_sk) dj,customer where dj.ss_customer_sk = customer.c_customer_sk and cnt between 1 and 5 order by cnt desc; diff --git a/ql/src/test/queries/clientpositive/perf/query75.q b/ql/src/test/queries/clientpositive/perf/query75.q new file mode 100644 index 0000000..a815c9e --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query75.q @@ -0,0 +1 @@ +explain WITH all_sales AS ( SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,SUM(sales_cnt) AS sales_cnt ,SUM(sales_amt) AS sales_amt FROM (SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,cs_quantity - COALESCE(cr_return_quantity,0) AS sales_cnt ,cs_ext_sales_price - COALESCE(cr_return_amount,0.0) AS sales_amt FROM catalog_sales JOIN item ON i_item_sk=cs_item_sk JOIN date_dim ON d_date_sk=cs_sold_date_sk LEFT JOIN catalog_returns ON (cs_order_number=cr_order_number AND cs_item_sk=cr_item_sk) WHERE i_category='Sports' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ss_quantity - COALESCE(sr_return_quantity,0) AS sales_cnt ,ss_ext_sales_price - COALESCE(sr_return_amt,0.0) AS sales_amt FROM store_sales JOIN item ON i_item_sk=ss_item_sk JOIN date_dim ON d_date_sk=ss_sold_date_sk LEFT JOIN store_returns ON (ss_ticket_number=sr_ticket_number AND ss_item_sk=sr_item_sk) WHERE i_category='Sports' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ws_quantity - COALESCE(wr_return_quantity,0) AS sales_cnt ,ws_ext_sales_price - COALESCE(wr_return_amt,0.0) AS sales_amt FROM web_sales JOIN item ON i_item_sk=ws_item_sk JOIN date_dim ON d_date_sk=ws_sold_date_sk LEFT JOIN web_returns ON (ws_order_number=wr_order_number AND ws_item_sk=wr_item_sk) WHERE i_category='Sports') sales_detail GROUP BY d_year, i_brand_id, i_class_id, i_category_id, i_manufact_id) SELECT prev_yr.d_year AS prev_year ,curr_yr.d_year AS year ,curr_yr.i_brand_id ,curr_yr.i_class_id ,curr_yr.i_category_id ,curr_yr.i_manufact_id ,prev_yr.sales_cnt AS prev_yr_cnt ,curr_yr.sales_cnt AS curr_yr_cnt ,curr_yr.sales_cnt-prev_yr.sales_cnt AS sales_cnt_diff ,curr_yr.sales_amt-prev_yr.sales_amt AS sales_amt_diff FROM all_sales curr_yr, all_sales prev_yr WHERE curr_yr.i_brand_id=prev_yr.i_brand_id AND curr_yr.i_class_id=prev_yr.i_class_id AND curr_yr.i_category_id=prev_yr.i_category_id AND curr_yr.i_manufact_id=prev_yr.i_manufact_id AND curr_yr.d_year=2002 AND prev_yr.d_year=2002-1 AND CAST(curr_yr.sales_cnt AS DECIMAL(17,2))/CAST(prev_yr.sales_cnt AS DECIMAL(17,2))<0.9 ORDER BY sales_cnt_diff limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query76.q b/ql/src/test/queries/clientpositive/perf/query76.q new file mode 100644 index 0000000..1894cf4 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query76.q @@ -0,0 +1 @@ +explain select channel, col_name, d_year, d_qoy, i_category, COUNT(*) sales_cnt, SUM(ext_sales_price) sales_amt FROM ( SELECT 'store' as channel, 'ss_addr_sk' col_name, d_year, d_qoy, i_category, ss_ext_sales_price ext_sales_price FROM store_sales, item, date_dim WHERE ss_addr_sk IS NULL AND store_sales.ss_sold_date_sk=date_dim.d_date_sk AND store_sales.ss_item_sk=item.i_item_sk UNION ALL SELECT 'web' as channel, 'ws_web_page_sk' col_name, d_year, d_qoy, i_category, ws_ext_sales_price ext_sales_price FROM web_sales, item, date_dim WHERE ws_web_page_sk IS NULL AND web_sales.ws_sold_date_sk=date_dim.d_date_sk AND web_sales.ws_item_sk=item.i_item_sk UNION ALL SELECT 'catalog' as channel, 'cs_warehouse_sk' col_name, d_year, d_qoy, i_category, cs_ext_sales_price ext_sales_price FROM catalog_sales, item, date_dim WHERE cs_warehouse_sk IS NULL AND catalog_sales.cs_sold_date_sk=date_dim.d_date_sk AND catalog_sales.cs_item_sk=item.i_item_sk) foo GROUP BY channel, col_name, d_year, d_qoy, i_category ORDER BY channel, col_name, d_year, d_qoy, i_category limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query79.q b/ql/src/test/queries/clientpositive/perf/query79.q new file mode 100644 index 0000000..d104602 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query79.q @@ -0,0 +1 @@ +explain select c_last_name,c_first_name,substr(s_city,1,30) sub,ss_ticket_number,amt,profit from (select ss_ticket_number ,ss_customer_sk ,store.s_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (household_demographics.hd_dep_count = 8 or household_demographics.hd_vehicle_count > 0) and date_dim.d_dow = 1 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_number_employees between 200 and 295 group by ss_ticket_number,ss_customer_sk,ss_addr_sk,store.s_city) ms,customer where ms.ss_customer_sk = customer.c_customer_sk order by c_last_name,c_first_name,sub, profit limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query80.q b/ql/src/test/queries/clientpositive/perf/query80.q new file mode 100644 index 0000000..5ded3c5 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query80.q @@ -0,0 +1 @@ +explain with ssr as (select s_store_id as store_id, sum(ss_ext_sales_price) as sales, sum(coalesce(sr_return_amt, 0)) as returns, sum(ss_net_profit - coalesce(sr_net_loss, 0)) as profit from store_sales left outer join store_returns on (ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number), date_dim, store, item, promotion where ss_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and ss_store_sk = s_store_sk and ss_item_sk = i_item_sk and i_current_price > 50 and ss_promo_sk = p_promo_sk and p_channel_tv = 'N' group by s_store_id) , csr as (select cp_catalog_page_id as catalog_page_id, sum(cs_ext_sales_price) as sales, sum(coalesce(cr_return_amount, 0)) as returns, sum(cs_net_profit - coalesce(cr_net_loss, 0)) as profit from catalog_sales left outer join catalog_returns on (cs_item_sk = cr_item_sk and cs_order_number = cr_order_number), date_dim, catalog_page, item, promotion where cs_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and cs_catalog_page_sk = cp_catalog_page_sk and cs_item_sk = i_item_sk and i_current_price > 50 and cs_promo_sk = p_promo_sk and p_channel_tv = 'N' group by cp_catalog_page_id) , wsr as (select web_site_id, sum(ws_ext_sales_price) as sales, sum(coalesce(wr_return_amt, 0)) as returns, sum(ws_net_profit - coalesce(wr_net_loss, 0)) as profit from web_sales left outer join web_returns on (ws_item_sk = wr_item_sk and ws_order_number = wr_order_number), date_dim, web_site, item, promotion where ws_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and ws_web_site_sk = web_site_sk and ws_item_sk = i_item_sk and i_current_price > 50 and ws_promo_sk = p_promo_sk and p_channel_tv = 'N' group by web_site_id) select channel , id , sum(sales) as sales , sum(returns) as returns , sum(profit) as profit from (select 'store channel' as channel , concat('store', store_id) as id , sales , returns , profit from ssr union all select 'catalog channel' as channel , concat('catalog_page', catalog_page_id) as id , sales , returns , profit from csr union all select 'web channel' as channel , concat('web_site', web_site_id) as id , sales , returns , profit from wsr ) x group by channel, id with rollup order by channel ,id limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query82.q b/ql/src/test/queries/clientpositive/perf/query82.q new file mode 100644 index 0000000..aec30ea --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query82.q @@ -0,0 +1 @@ +explain select i_item_id ,i_item_desc ,i_current_price from item, inventory, date_dim, store_sales where i_current_price between 30 and 30+30 and inv_item_sk = i_item_sk and d_date_sk=inv_date_sk and d_date between '2002-05-30' and '2002-07-30' and i_manufact_id in (437,129,727,663) and inv_quantity_on_hand between 100 and 500 and ss_item_sk = i_item_sk group by i_item_id,i_item_desc,i_current_price order by i_item_id limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query84.q b/ql/src/test/queries/clientpositive/perf/query84.q new file mode 100644 index 0000000..bcc2f4e --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query84.q @@ -0,0 +1 @@ +explain select c_customer_id as customer_id ,concat(c_last_name, ', ', c_first_name) as customername from customer ,customer_address ,customer_demographics ,household_demographics ,income_band ,store_returns where ca_city = 'Hopewell' and customer.c_current_addr_sk = customer_address.ca_address_sk and ib_lower_bound >= 32287 and ib_upper_bound <= 32287 + 50000 and income_band.ib_income_band_sk = household_demographics.hd_income_band_sk and customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk and household_demographics.hd_demo_sk = customer.c_current_hdemo_sk and store_returns.sr_cdemo_sk = customer_demographics.cd_demo_sk order by customer_id limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query85.q b/ql/src/test/queries/clientpositive/perf/query85.q new file mode 100644 index 0000000..b1e2b64 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query85.q @@ -0,0 +1 @@ +explain select substr(r_reason_desc,1,20) as r ,avg(ws_quantity) wq ,avg(wr_refunded_cash) ref ,avg(wr_fee) fee from web_sales, web_returns, web_page, customer_demographics cd1, customer_demographics cd2, customer_address, date_dim, reason where web_sales.ws_web_page_sk = web_page.wp_web_page_sk and web_sales.ws_item_sk = web_returns.wr_item_sk and web_sales.ws_order_number = web_returns.wr_order_number and web_sales.ws_sold_date_sk = date_dim.d_date_sk and d_year = 1998 and cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk and cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk and customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk and reason.r_reason_sk = web_returns.wr_reason_sk and ( ( cd1.cd_marital_status = 'M' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = '4 yr Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 100.00 and 150.00 ) or ( cd1.cd_marital_status = 'D' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Primary' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 50.00 and 100.00 ) or ( cd1.cd_marital_status = 'U' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Advanced Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 150.00 and 200.00 ) ) and ( ( ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ws_net_profit between 100 and 200 ) or ( ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN') and ws_net_profit between 150 and 300 ) or ( ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV') and ws_net_profit between 50 and 250 ) ) group by r_reason_desc order by r, wq, ref, fee limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query87.q b/ql/src/test/queries/clientpositive/perf/query87.q new file mode 100644 index 0000000..6fd059f --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query87.q @@ -0,0 +1 @@ +explain select count(*) from (select distinct c_last_name as l1, c_first_name as f1, d_date as d1 from store_sales JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t1 LEFT OUTER JOIN ( select distinct c_last_name as l2, c_first_name as f2, d_date as d2 from catalog_sales JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk JOIN customer ON catalog_sales.cs_bill_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t2 ON t1.l1 = t2.l2 and t1.f1 = t2.f2 and t1.d1 = t2.d2 LEFT OUTER JOIN (select distinct c_last_name as l3, c_first_name as f3, d_date as d3 from web_sales JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk JOIN customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t3 ON t1.l1 = t3.l3 and t1.f1 = t3.f3 and t1.d1 = t3.d3 WHERE l2 is null and l3 is null ; diff --git a/ql/src/test/queries/clientpositive/perf/query90.q b/ql/src/test/queries/clientpositive/perf/query90.q new file mode 100644 index 0000000..e067de9 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query90.q @@ -0,0 +1 @@ +explain select cast(amc as decimal(15,4))/cast(pmc as decimal(15,4)) am_pm_ratio from ( select count(*) amc from web_sales, household_demographics , time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 6 and 6+1 and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 and 5200) at, ( select count(*) pmc from web_sales, household_demographics , time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 14 and 14+1 and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 and 5200) pt order by am_pm_ratio limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query91.q b/ql/src/test/queries/clientpositive/perf/query91.q new file mode 100644 index 0000000..3b1dd20 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query91.q @@ -0,0 +1 @@ +explain select cc_call_center_id Call_Center, cc_name Call_Center_Name, cc_manager Manager, sum(cr_net_loss) Returns_Loss from call_center, catalog_returns, date_dim, customer, customer_address, customer_demographics, household_demographics where catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk and catalog_returns.cr_returned_date_sk = date_dim.d_date_sk and catalog_returns.cr_returning_customer_sk= customer.c_customer_sk and customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk and household_demographics.hd_demo_sk = customer.c_current_hdemo_sk and customer_address.ca_address_sk = customer.c_current_addr_sk and d_year = 1999 and d_moy = 11 and ( (cd_marital_status = 'M' and cd_education_status = 'Unknown') or(cd_marital_status = 'W' and cd_education_status = 'Advanced Degree')) and hd_buy_potential like '0-500%' and ca_gmt_offset = -7 group by cc_call_center_id,cc_name,cc_manager,cd_marital_status,cd_education_status order by Returns_Loss desc; diff --git a/ql/src/test/queries/clientpositive/perf/query92.q b/ql/src/test/queries/clientpositive/perf/query92.q new file mode 100644 index 0000000..625e99f --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query92.q @@ -0,0 +1 @@ +explain SELECT sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) as store_only, sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) as catalog_only, sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) as store_and_catalog FROM (SELECT ss.ss_customer_sk as customer_sk, ss.ss_item_sk as item_sk FROM store_sales ss JOIN date_dim d1 ON (ss.ss_sold_date_sk = d1.d_date_sk) WHERE d1.d_month_seq >= 1206 and d1.d_month_seq <= 1217 GROUP BY ss.ss_customer_sk, ss.ss_item_sk) ssci FULL OUTER JOIN (SELECT cs.cs_bill_customer_sk as customer_sk, cs.cs_item_sk as item_sk FROM catalog_sales cs JOIN date_dim d2 ON (cs.cs_sold_date_sk = d2.d_date_sk) WHERE d2.d_month_seq >= 1206 and d2.d_month_seq <= 1217 GROUP BY cs.cs_bill_customer_sk, cs.cs_item_sk) csci ON (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk); diff --git a/ql/src/test/queries/clientpositive/perf/query93.q b/ql/src/test/queries/clientpositive/perf/query93.q new file mode 100644 index 0000000..b60b041 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query93.q @@ -0,0 +1 @@ +explain select ss_customer_sk ,sum(act_sales) sumsales from (select ss_item_sk ,ss_ticket_number ,ss_customer_sk ,case when sr_return_quantity is not null then (ss_quantity-sr_return_quantity)*ss_sales_price else (ss_quantity*ss_sales_price) end act_sales from store_sales left outer join store_returns on (store_returns.sr_item_sk = store_sales.ss_item_sk and store_returns.sr_ticket_number = store_sales.ss_ticket_number) ,reason where store_returns.sr_reason_sk = reason.r_reason_sk and r_reason_desc = 'Did not like the warranty') t group by ss_customer_sk order by sumsales, ss_customer_sk limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query94.q b/ql/src/test/queries/clientpositive/perf/query94.q new file mode 100644 index 0000000..f9f4bc1 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query94.q @@ -0,0 +1 @@ +explain SELECT count(distinct ws_order_number) as order_count, sum(ws_ext_ship_cost) as total_shipping_cost, sum(ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk) JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk) LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number FROM web_sales ws2 JOIN web_sales ws3 ON (ws2.ws_order_number = ws3.ws_order_number) WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk ) ws_wh1 ON (ws1.ws_order_number = ws_wh1.ws_order_number) LEFT OUTER JOIN web_returns wr1 ON (ws1.ws_order_number = wr1.wr_order_number) WHERE d.d_date between '1999-05-01' and '1999-07-01' and ca.ca_state = 'TX' and s.web_company_name = 'pri' and wr1.wr_order_number is null limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query95.q b/ql/src/test/queries/clientpositive/perf/query95.q new file mode 100644 index 0000000..fbd2d47 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query95.q @@ -0,0 +1 @@ +explain SELECT count(distinct ws1.ws_order_number) as order_count, sum(ws1.ws_ext_ship_cost) as total_shipping_cost, sum(ws1.ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk) JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk) LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number FROM web_sales ws2 JOIN web_sales ws3 ON (ws2.ws_order_number = ws3.ws_order_number) WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk ) ws_wh1 ON (ws1.ws_order_number = ws_wh1.ws_order_number) LEFT SEMI JOIN (SELECT wr_order_number FROM web_returns wr JOIN (SELECT ws4.ws_order_number as ws_order_number FROM web_sales ws4 JOIN web_sales ws5 ON (ws4.ws_order_number = ws5.ws_order_number) WHERE ws4.ws_warehouse_sk <> ws5.ws_warehouse_sk ) ws_wh2 ON (wr.wr_order_number = ws_wh2.ws_order_number)) tmp1 ON (ws1.ws_order_number = tmp1.wr_order_number) WHERE d.d_date between '2002-05-01' and '2002-06-30' and ca.ca_state = 'GA' and s.web_company_name = 'pri'; diff --git a/ql/src/test/queries/clientpositive/perf/query96.q b/ql/src/test/queries/clientpositive/perf/query96.q new file mode 100644 index 0000000..29265ed --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query96.q @@ -0,0 +1 @@ +explain select count(*) as c from store_sales ,household_demographics ,time_dim, store where store_sales.ss_sold_time_sk = time_dim.t_time_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_store_sk = store.s_store_sk and time_dim.t_hour = 8 and time_dim.t_minute >= 30 and household_demographics.hd_dep_count = 5 and store.s_store_name = 'ese' order by c limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query97.q b/ql/src/test/queries/clientpositive/perf/query97.q new file mode 100644 index 0000000..4995309 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query97.q @@ -0,0 +1 @@ +explain select sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) store_only ,sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) catalog_only ,sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) store_and_catalog from ( select ss_customer_sk customer_sk ,ss_item_sk item_sk from store_sales JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk where d_month_seq between 1193 and 1193 + 11 group by ss_customer_sk ,ss_item_sk) ssci full outer join ( select cs_bill_customer_sk customer_sk ,cs_item_sk item_sk from catalog_sales JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk where d_month_seq between 1193 and 1193 + 11 group by cs_bill_customer_sk ,cs_item_sk) csci on (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk) limit 100; diff --git a/ql/src/test/queries/clientpositive/perf/query98.q b/ql/src/test/queries/clientpositive/perf/query98.q new file mode 100644 index 0000000..5605d62 --- /dev/null +++ b/ql/src/test/queries/clientpositive/perf/query98.q @@ -0,0 +1 @@ +explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(ss_ext_sales_price) as itemrevenue ,sum(ss_ext_sales_price)*100/sum(sum(ss_ext_sales_price)) over (partition by i_class) as revenueratio from store_sales ,item ,date_dim where store_sales.ss_item_sk = item.i_item_sk and i_category in ('Jewelry', 'Sports', 'Books') and store_sales.ss_sold_date_sk = date_dim.d_date_sk and d_date between cast('2001-01-12' as date) and (cast('2001-02-11' as date)) group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio; diff --git a/ql/src/test/results/clientpositive/perf/query12.q.out b/ql/src/test/results/clientpositive/perf/query12.q.out new file mode 100644 index 0000000..b154936 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query12.q.out @@ -0,0 +1,208 @@ +PREHOOK: query: explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(ws_ext_sales_price) as itemrevenue ,sum(ws_ext_sales_price)*100/sum(sum(ws_ext_sales_price)) over (partition by i_class) as revenueratio from web_sales ,item ,date_dim where web_sales.ws_item_sk = item.i_item_sk and item.i_category in ('Jewelry', 'Sports', 'Books') and web_sales.ws_sold_date_sk = date_dim.d_date_sk and date_dim.d_date between '2001-01-12' and '2001-02-11' group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(ws_ext_sales_price) as itemrevenue ,sum(ws_ext_sales_price)*100/sum(sum(ws_ext_sales_price)) over (partition by i_class) as revenueratio from web_sales ,item ,date_dim where web_sales.ws_item_sk = item.i_item_sk and item.i_category in ('Jewelry', 'Sports', 'Books') and web_sales.ws_sold_date_sk = date_dim.d_date_sk and date_dim.d_date between '2001-01-12' and '2001-02-11' group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-0 depends on stages: Stage-5 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 13 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ws_item_sk is not null and ws_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 4 Data size: 504 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_item_sk (type: int) + sort order: + + Map-reduce partition columns: ws_item_sk (type: int) + Statistics: Num rows: 4 Data size: 504 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_sold_date_sk (type: int), ws_ext_sales_price (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and (i_category) IN ('Jewelry', 'Sports', 'Books')) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string), i_item_desc (type: string), i_current_price (type: decimal(7,2)), i_class (type: string), i_category (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col3, _col23, _col37, _col38, _col41, _col42, _col47, _col49 + Statistics: Num rows: 4 Data size: 554 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 4 Data size: 554 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: int), _col23 (type: decimal(7,2)), _col37 (type: int), _col38 (type: string), _col41 (type: string), _col42 (type: decimal(7,2)), _col47 (type: string), _col49 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_date BETWEEN '2001-01-12' AND '2001-02-11') (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col3, _col23, _col37, _col38, _col41, _col42, _col47, _col49, _col62, _col64 + Statistics: Num rows: 4 Data size: 609 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((_col3 = _col37) and (_col49) IN ('Jewelry', 'Sports', 'Books')) and (_col0 = _col62)) and _col64 BETWEEN '2001-01-12' AND '2001-02-11') (type: boolean) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col38 (type: string), _col41 (type: string), _col49 (type: string), _col47 (type: string), _col42 (type: decimal(7,2)), _col23 (type: decimal(7,2)) + outputColumnNames: _col38, _col41, _col49, _col47, _col42, _col23 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col23) + keys: _col38 (type: string), _col41 (type: string), _col49 (type: string), _col47 (type: string), _col42 (type: decimal(7,2)) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: decimal(7,2)) + sort order: +++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: decimal(7,2)) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: decimal(7,2)) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: string) + sort order: + + Map-reduce partition columns: _col3 (type: string) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col4 (type: decimal(7,2)), _col5 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: string), VALUE._col1 (type: string), VALUE._col2 (type: string), KEY.reducesinkkey0 (type: string), VALUE._col3 (type: decimal(7,2)), VALUE._col4 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + PTF Operator + Function definitions: + Input definition + input alias: ptf_0 + output shape: _col0: string, _col1: string, _col2: string, _col3: string, _col4: decimal(7,2), _col5: decimal(17,2) + type: WINDOWING + Windowing table definition + input alias: ptf_1 + name: windowingtablefunction + order by: _col3 + partition by: _col3 + raw input shape: + window functions: + window function definition + alias: sum_window_0 + arguments: _col5 + name: sum + window function: GenericUDAFSumHiveDecimal + window frame: PRECEDING(MAX)~FOLLOWING(MAX) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: decimal(7,2)), _col0 (type: string), _col5 (type: decimal(17,2)), ((_col5 * 100) / sum_window_0) (type: decimal(38,23)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: string), _col2 (type: string), _col4 (type: string), _col0 (type: string), _col6 (type: decimal(38,23)) + sort order: +++++ + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(7,2)), _col5 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey3 (type: string), KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: decimal(7,2)), KEY.reducesinkkey2 (type: string), VALUE._col1 (type: decimal(17,2)), KEY.reducesinkkey4 (type: decimal(38,23)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query13.q.out b/ql/src/test/results/clientpositive/perf/query13.q.out new file mode 100644 index 0000000..1adaa62 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query13.q.out @@ -0,0 +1,229 @@ +Warning: Shuffle Join JOIN[19][tables = [store_sales, store, customer_demographics, household_demographics, customer_address]] in Stage 'Stage-4:MAPRED' is a cross product +Warning: Shuffle Join JOIN[16][tables = [store_sales, store, customer_demographics, household_demographics]] in Stage 'Stage-3:MAPRED' is a cross product +Warning: Shuffle Join JOIN[13][tables = [store_sales, store, customer_demographics]] in Stage 'Stage-2:MAPRED' is a cross product +PREHOOK: query: explain select avg(ss_quantity) ,avg(ss_ext_sales_price) ,avg(ss_ext_wholesale_cost) ,sum(ss_ext_wholesale_cost) from store_sales ,store ,customer_demographics ,household_demographics ,customer_address ,date_dim where store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_sold_date_sk = date_dim.d_date_sk and date_dim.d_year = 2001 and((store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk and customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and customer_demographics.cd_marital_status = 'M' and customer_demographics.cd_education_status = '4 yr Degree' and store_sales.ss_sales_price between 100.00 and 150.00 and household_demographics.hd_dep_count = 3 )or (store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk and customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and customer_demographics.cd_marital_status = 'D' and customer_demographics.cd_education_status = 'Primary' and store_sales.ss_sales_price between 50.00 and 100.00 and household_demographics.hd_dep_count = 1 ) or (store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk and customer_demographics.cd_demo_sk = ss_cdemo_sk and customer_demographics.cd_marital_status = 'U' and customer_demographics.cd_education_status = 'Advanced Degree' and store_sales.ss_sales_price between 150.00 and 200.00 and household_demographics.hd_dep_count = 1 )) and((store_sales.ss_addr_sk = customer_address.ca_address_sk and customer_address.ca_country = 'United States' and customer_address.ca_state in ('KY', 'GA', 'NM') and store_sales.ss_net_profit between 100 and 200 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and customer_address.ca_country = 'United States' and customer_address.ca_state in ('MT', 'OR', 'IN') and store_sales.ss_net_profit between 150 and 300 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and customer_address.ca_country = 'United States' and customer_address.ca_state in ('WI', 'MO', 'WV') and store_sales.ss_net_profit between 50 and 250 )) +PREHOOK: type: QUERY +POSTHOOK: query: explain select avg(ss_quantity) ,avg(ss_ext_sales_price) ,avg(ss_ext_wholesale_cost) ,sum(ss_ext_wholesale_cost) from store_sales ,store ,customer_demographics ,household_demographics ,customer_address ,date_dim where store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_sold_date_sk = date_dim.d_date_sk and date_dim.d_year = 2001 and((store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk and customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and customer_demographics.cd_marital_status = 'M' and customer_demographics.cd_education_status = '4 yr Degree' and store_sales.ss_sales_price between 100.00 and 150.00 and household_demographics.hd_dep_count = 3 )or (store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk and customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and customer_demographics.cd_marital_status = 'D' and customer_demographics.cd_education_status = 'Primary' and store_sales.ss_sales_price between 50.00 and 100.00 and household_demographics.hd_dep_count = 1 ) or (store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk and customer_demographics.cd_demo_sk = ss_cdemo_sk and customer_demographics.cd_marital_status = 'U' and customer_demographics.cd_education_status = 'Advanced Degree' and store_sales.ss_sales_price between 150.00 and 200.00 and household_demographics.hd_dep_count = 1 )) and((store_sales.ss_addr_sk = customer_address.ca_address_sk and customer_address.ca_country = 'United States' and customer_address.ca_state in ('KY', 'GA', 'NM') and store_sales.ss_net_profit between 100 and 200 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and customer_address.ca_country = 'United States' and customer_address.ca_state in ('MT', 'OR', 'IN') and store_sales.ss_net_profit between 150 and 300 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and customer_address.ca_country = 'United States' and customer_address.ca_state in ('WI', 'MO', 'WV') and store_sales.ss_net_profit between 50 and 250 )) +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 8 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_store_sk is not null and ss_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 2 Data size: 1017 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_store_sk (type: int) + sort order: + + Map-reduce partition columns: ss_store_sk (type: int) + Statistics: Num rows: 2 Data size: 1017 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_cdemo_sk (type: int), ss_hdemo_sk (type: int), ss_addr_sk (type: int), ss_quantity (type: int), ss_sales_price (type: decimal(7,2)), ss_ext_sales_price (type: decimal(7,2)), ss_ext_wholesale_cost (type: decimal(7,2)), ss_net_profit (type: decimal(7,2)) + TableScan + alias: store + Statistics: Num rows: 63 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: s_store_sk is not null (type: boolean) + Statistics: Num rows: 32 Data size: 129 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 32 Data size: 129 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_store_sk (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col4, _col5, _col6, _col7, _col10, _col13, _col15, _col16, _col22, _col26 + Statistics: Num rows: 35 Data size: 141 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 35 Data size: 141 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col10 (type: int), _col13 (type: decimal(7,2)), _col15 (type: decimal(7,2)), _col16 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col26 (type: int) + TableScan + alias: customer_demographics + Statistics: Num rows: 4 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + sort order: + Statistics: Num rows: 4 Data size: 850 Basic stats: COMPLETE Column stats: NONE + value expressions: cd_demo_sk (type: int), cd_marital_status (type: string), cd_education_status (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 + 1 + outputColumnNames: _col0, _col4, _col5, _col6, _col7, _col10, _col13, _col15, _col16, _col22, _col26, _col58, _col60, _col61 + Statistics: Num rows: 38 Data size: 155 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 38 Data size: 155 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col10 (type: int), _col13 (type: decimal(7,2)), _col15 (type: decimal(7,2)), _col16 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col26 (type: int), _col58 (type: int), _col60 (type: string), _col61 (type: string) + TableScan + alias: household_demographics + Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + sort order: + Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: NONE + value expressions: hd_demo_sk (type: int), hd_dep_count (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 + 1 + outputColumnNames: _col0, _col4, _col5, _col6, _col7, _col10, _col13, _col15, _col16, _col22, _col26, _col58, _col60, _col61, _col70, _col73 + Statistics: Num rows: 41 Data size: 170 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 41 Data size: 170 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col10 (type: int), _col13 (type: decimal(7,2)), _col15 (type: decimal(7,2)), _col16 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col26 (type: int), _col58 (type: int), _col60 (type: string), _col61 (type: string), _col70 (type: int), _col73 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_address_sk (type: int), ca_state (type: string), ca_country (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 + 1 + outputColumnNames: _col0, _col4, _col5, _col6, _col7, _col10, _col13, _col15, _col16, _col22, _col26, _col58, _col60, _col61, _col70, _col73, _col78, _col86, _col88 + Statistics: Num rows: 45 Data size: 187 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 45 Data size: 187 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col10 (type: int), _col13 (type: decimal(7,2)), _col15 (type: decimal(7,2)), _col16 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col26 (type: int), _col58 (type: int), _col60 (type: string), _col61 (type: string), _col70 (type: int), _col73 (type: int), _col78 (type: int), _col86 (type: string), _col88 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 2001)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col4, _col5, _col6, _col7, _col10, _col13, _col15, _col16, _col22, _col26, _col58, _col60, _col61, _col70, _col73, _col78, _col86, _col88, _col94 + Statistics: Num rows: 49 Data size: 205 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((_col26 = _col7) and (_col0 = _col94)) and ((((((((_col5 = _col70) and (_col58 = _col4)) and (_col60 = 'M')) and (_col61 = '4 yr Degree')) and _col13 BETWEEN 100.0 AND 150.0) and (_col73 = 3)) or ((((((_col5 = _col70) and (_col58 = _col4)) and (_col60 = 'D')) and (_col61 = 'Primary')) and _col13 BETWEEN 50.0 AND 100.0) and (_col73 = 1))) or ((((((_col5 = _col70) and (_col58 = _col4)) and (_col60 = 'U')) and (_col61 = 'Advanced Degree')) and _col13 BETWEEN 150.0 AND 200.0) and (_col73 = 1)))) and ((((((_col6 = _col78) and (_col88 = 'United States')) and (_col86) IN ('KY', 'GA', 'NM')) and _col22 BETWEEN 100 AND 200) or ((((_col6 = _col78) and (_col88 = 'United States')) and (_col86) IN ('MT', 'OR', 'IN')) and _col22 BETWEEN 150 AND 300)) or ((((_col6 = _col78) and (_col88 = 'United States')) and (_col86) IN ('WI', 'MO', 'WV')) and _col22 BETWEEN 50 AND 250))) (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col10 (type: int), _col15 (type: decimal(7,2)), _col16 (type: decimal(7,2)) + outputColumnNames: _col10, _col15, _col16 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: avg(_col10), avg(_col15), avg(_col16), sum(_col16) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: struct), _col1 (type: struct), _col2 (type: struct), _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: avg(VALUE._col0), avg(VALUE._col1), avg(VALUE._col2), sum(VALUE._col3) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query15.q.out b/ql/src/test/results/clientpositive/perf/query15.q.out new file mode 100644 index 0000000..96a35af --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query15.q.out @@ -0,0 +1,199 @@ +PREHOOK: query: explain select ca_zip ,sum(cs_sales_price) from catalog_sales ,customer ,customer_address ,date_dim where catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', '85392', '85460', '80348', '81792') or customer_address.ca_state in ('CA','WA','GA') or catalog_sales.cs_sales_price > 500) and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and date_dim.d_qoy = 2 and date_dim.d_year = 2000 group by ca_zip order by ca_zip limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select ca_zip ,sum(cs_sales_price) from catalog_sales ,customer ,customer_address ,date_dim where catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', '85392', '85460', '80348', '81792') or customer_address.ca_state in ('CA','WA','GA') or catalog_sales.cs_sales_price > 500) and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and date_dim.d_qoy = 2 and date_dim.d_year = 2000 group by ca_zip order by ca_zip limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-0 depends on stages: Stage-5 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 26 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (cs_bill_customer_sk is not null and cs_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_bill_customer_sk (type: int) + sort order: + + Map-reduce partition columns: cs_bill_customer_sk (type: int) + Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_date_sk (type: int), cs_sales_price (type: decimal(7,2)) + TableScan + alias: customer + Statistics: Num rows: 17 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean) + Statistics: Num rows: 5 Data size: 40 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 5 Data size: 40 Basic stats: COMPLETE Column stats: NONE + value expressions: c_current_addr_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_bill_customer_sk (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col3, _col21, _col37, _col41 + Statistics: Num rows: 7 Data size: 924 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col41 (type: int) + sort order: + + Map-reduce partition columns: _col41 (type: int) + Statistics: Num rows: 7 Data size: 924 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col21 (type: decimal(7,2)), _col37 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ca_address_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_state (type: string), ca_zip (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col41 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col3, _col21, _col37, _col41, _col58, _col66, _col67 + Statistics: Num rows: 7 Data size: 1016 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 7 Data size: 1016 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: int), _col21 (type: decimal(7,2)), _col37 (type: int), _col41 (type: int), _col58 (type: int), _col66 (type: string), _col67 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_qoy = 2)) and (d_year = 2000)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col3, _col21, _col37, _col41, _col58, _col66, _col67, _col74 + Statistics: Num rows: 7 Data size: 1117 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((_col3 = _col37) and (_col41 = _col58)) and (((substr(_col67, 1, 5)) IN ('85669', '86197', '88274', '83405', '86475', '85392', '85460', '80348', '81792') or (_col66) IN ('CA', 'WA', 'GA')) or (_col21 > 500))) and (_col0 = _col74)) (type: boolean) + Statistics: Num rows: 1 Data size: 159 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col67 (type: string), _col21 (type: decimal(7,2)) + outputColumnNames: _col67, _col21 + Statistics: Num rows: 1 Data size: 159 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col21) + keys: _col67 (type: string) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 159 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 159 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 159 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Statistics: Num rows: 1 Data size: 159 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), VALUE._col0 (type: decimal(17,2)) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 159 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 159 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 159 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query17.q.out b/ql/src/test/results/clientpositive/perf/query17.q.out new file mode 100644 index 0000000..3863644 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query17.q.out @@ -0,0 +1,359 @@ +PREHOOK: query: explain select i_item_id ,i_item_desc ,s_state ,count(ss_quantity) as store_sales_quantitycount ,avg(ss_quantity) as store_sales_quantityave ,stddev_samp(ss_quantity) as store_sales_quantitystdev ,stddev_samp(ss_quantity)/avg(ss_quantity) as store_sales_quantitycov ,count(sr_return_quantity) as_store_returns_quantitycount ,avg(sr_return_quantity) as_store_returns_quantityave ,stddev_samp(sr_return_quantity) as_store_returns_quantitystdev ,stddev_samp(sr_return_quantity)/avg(sr_return_quantity) as store_returns_quantitycov ,count(cs_quantity) as catalog_sales_quantitycount ,avg(cs_quantity) as catalog_sales_quantityave ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitystdev ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitycov from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_quarter_name = '2000Q1' and d1.d_date_sk = store_sales.ss_sold_date_sk and item.i_item_sk = store_sales.ss_item_sk and store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_customer_sk = store_returns.sr_customer_sk and store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number and store_returns.sr_returned_date_sk = d2.d_date_sk and d2.d_quarter_name in ('2000Q1','2000Q2','2000Q3') and store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk and store_returns.sr_item_sk = catalog_sales.cs_item_sk and catalog_sales.cs_sold_date_sk = d3.d_date_sk and d3.d_quarter_name in ('2000Q1','2000Q2','2000Q3') group by i_item_id ,i_item_desc ,s_state order by i_item_id ,i_item_desc ,s_state limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_id ,i_item_desc ,s_state ,count(ss_quantity) as store_sales_quantitycount ,avg(ss_quantity) as store_sales_quantityave ,stddev_samp(ss_quantity) as store_sales_quantitystdev ,stddev_samp(ss_quantity)/avg(ss_quantity) as store_sales_quantitycov ,count(sr_return_quantity) as_store_returns_quantitycount ,avg(sr_return_quantity) as_store_returns_quantityave ,stddev_samp(sr_return_quantity) as_store_returns_quantitystdev ,stddev_samp(sr_return_quantity)/avg(sr_return_quantity) as store_returns_quantitycov ,count(cs_quantity) as catalog_sales_quantitycount ,avg(cs_quantity) as catalog_sales_quantityave ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitystdev ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitycov from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_quarter_name = '2000Q1' and d1.d_date_sk = store_sales.ss_sold_date_sk and item.i_item_sk = store_sales.ss_item_sk and store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_customer_sk = store_returns.sr_customer_sk and store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number and store_returns.sr_returned_date_sk = d2.d_date_sk and d2.d_quarter_name in ('2000Q1','2000Q2','2000Q3') and store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk and store_returns.sr_item_sk = catalog_sales.cs_item_sk and catalog_sales.cs_sold_date_sk = d3.d_date_sk and d3.d_quarter_name in ('2000Q1','2000Q2','2000Q3') group by i_item_id ,i_item_desc ,s_state order by i_item_id ,i_item_desc ,s_state limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-8 depends on stages: Stage-7 + Stage-9 depends on stages: Stage-8 + Stage-0 depends on stages: Stage-9 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 169 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((ss_customer_sk is not null and ss_item_sk is not null) and ss_ticket_number is not null) and ss_sold_date_sk is not null) and ss_store_sk is not null) (type: boolean) + Statistics: Num rows: 6 Data size: 144 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_customer_sk (type: int), ss_item_sk (type: int), ss_ticket_number (type: int) + sort order: +++ + Map-reduce partition columns: ss_customer_sk (type: int), ss_item_sk (type: int), ss_ticket_number (type: int) + Statistics: Num rows: 6 Data size: 144 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_store_sk (type: int), ss_quantity (type: int) + TableScan + alias: store_returns + Statistics: Num rows: 16 Data size: 338 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((sr_customer_sk is not null and sr_item_sk is not null) and sr_ticket_number is not null) and sr_returned_date_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: sr_customer_sk (type: int), sr_item_sk (type: int), sr_ticket_number (type: int) + sort order: +++ + Map-reduce partition columns: sr_customer_sk (type: int), sr_item_sk (type: int), sr_ticket_number (type: int) + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + value expressions: sr_returned_date_sk (type: int), sr_return_quantity (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_customer_sk (type: int), ss_item_sk (type: int), ss_ticket_number (type: int) + 1 sr_customer_sk (type: int), sr_item_sk (type: int), sr_ticket_number (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36 + Statistics: Num rows: 6 Data size: 158 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col29 (type: int), _col28 (type: int) + sort order: ++ + Map-reduce partition columns: _col29 (type: int), _col28 (type: int) + Statistics: Num rows: 6 Data size: 158 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col10 (type: int), _col26 (type: int), _col35 (type: int), _col36 (type: int) + TableScan + alias: catalog_sales + Statistics: Num rows: 195 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((cs_bill_customer_sk is not null and cs_item_sk is not null) and cs_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 25 Data size: 400 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_bill_customer_sk (type: int), cs_item_sk (type: int) + sort order: ++ + Map-reduce partition columns: cs_bill_customer_sk (type: int), cs_item_sk (type: int) + Statistics: Num rows: 25 Data size: 400 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_date_sk (type: int), cs_quantity (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col29 (type: int), _col28 (type: int) + 1 cs_bill_customer_sk (type: int), cs_item_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36, _col49, _col52, _col64, _col67 + Statistics: Num rows: 27 Data size: 440 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 27 Data size: 440 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col10 (type: int), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col36 (type: int), _col49 (type: int), _col52 (type: int), _col64 (type: int), _col67 (type: int) + TableScan + alias: d1 + Statistics: Num rows: 14 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_quarter_name = '2000Q1')) (type: boolean) + Statistics: Num rows: 3 Data size: 30 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 3 Data size: 30 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36, _col49, _col52, _col64, _col67, _col86 + Statistics: Num rows: 29 Data size: 484 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col26 (type: int) + sort order: + + Map-reduce partition columns: _col26 (type: int) + Statistics: Num rows: 29 Data size: 484 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col10 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col36 (type: int), _col49 (type: int), _col52 (type: int), _col64 (type: int), _col67 (type: int), _col86 (type: int) + TableScan + alias: d2 + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_quarter_name) IN ('2000Q1', '2000Q2', '2000Q3')) (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_quarter_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col26 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36, _col49, _col52, _col64, _col67, _col86, _col117, _col132 + Statistics: Num rows: 31 Data size: 532 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col49 (type: int) + sort order: + + Map-reduce partition columns: _col49 (type: int) + Statistics: Num rows: 31 Data size: 532 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col10 (type: int), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col36 (type: int), _col52 (type: int), _col64 (type: int), _col67 (type: int), _col86 (type: int), _col117 (type: int), _col132 (type: string) + TableScan + alias: d3 + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_quarter_name) IN ('2000Q1', '2000Q2', '2000Q3')) (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_quarter_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col49 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36, _col49, _col52, _col64, _col67, _col86, _col117, _col132, _col148, _col163 + Statistics: Num rows: 34 Data size: 585 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 34 Data size: 585 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col9 (type: int), _col10 (type: int), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col36 (type: int), _col49 (type: int), _col52 (type: int), _col64 (type: int), _col67 (type: int), _col86 (type: int), _col117 (type: int), _col132 (type: string), _col148 (type: int), _col163 (type: string) + TableScan + alias: store + Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: s_store_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + value expressions: s_state (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36, _col49, _col52, _col64, _col67, _col86, _col117, _col132, _col148, _col163, _col179, _col203 + Statistics: Num rows: 37 Data size: 643 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 37 Data size: 643 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col10 (type: int), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col36 (type: int), _col49 (type: int), _col52 (type: int), _col64 (type: int), _col67 (type: int), _col86 (type: int), _col117 (type: int), _col132 (type: string), _col148 (type: int), _col163 (type: string), _col179 (type: int), _col203 (type: string) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string), i_item_desc (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36, _col49, _col52, _col64, _col67, _col86, _col117, _col132, _col148, _col163, _col179, _col203, _col211, _col212, _col215 + Statistics: Num rows: 40 Data size: 707 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((((((((_col86 = _col0) and (_col211 = _col2)) and (_col179 = _col7)) and (_col3 = _col29)) and (_col2 = _col28)) and (_col9 = _col35)) and (_col26 = _col117)) and (_col132) IN ('2000Q1', '2000Q2', '2000Q3')) and (_col29 = _col52)) and (_col28 = _col64)) and (_col49 = _col148)) and (_col163) IN ('2000Q1', '2000Q2', '2000Q3')) (type: boolean) + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col212 (type: string), _col215 (type: string), _col203 (type: string), _col10 (type: int), _col36 (type: int), _col67 (type: int) + outputColumnNames: _col212, _col215, _col203, _col10, _col36, _col67 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count(_col10), avg(_col10), stddev_samp(_col10), count(_col36), avg(_col36), stddev_samp(_col36), count(_col67), avg(_col67), stddev_samp(_col67) + keys: _col212 (type: string), _col215 (type: string), _col203 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: bigint), _col4 (type: struct), _col5 (type: struct), _col6 (type: bigint), _col7 (type: struct), _col8 (type: struct), _col9 (type: bigint), _col10 (type: struct), _col11 (type: struct) + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0), avg(VALUE._col1), stddev_samp(VALUE._col2), count(VALUE._col3), avg(VALUE._col4), stddev_samp(VALUE._col5), count(VALUE._col6), avg(VALUE._col7), stddev_samp(VALUE._col8) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: string), _col1 (type: string), (_col8 / _col7) (type: double), _col9 (type: bigint), _col10 (type: double), (_col11 / _col10) (type: double), _col2 (type: string), _col3 (type: bigint), _col4 (type: double), _col5 (type: double), (_col5 / _col4) (type: double), _col6 (type: bigint), _col7 (type: double), _col8 (type: double) + outputColumnNames: _col0, _col1, _col10, _col11, _col12, _col13, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-9 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + sort order: +++ + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: bigint), _col4 (type: double), _col5 (type: double), _col6 (type: double), _col7 (type: bigint), _col8 (type: double), _col9 (type: double), _col10 (type: double), _col11 (type: bigint), _col12 (type: double), _col13 (type: double) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), VALUE._col0 (type: bigint), VALUE._col1 (type: double), VALUE._col2 (type: double), VALUE._col3 (type: double), VALUE._col4 (type: bigint), VALUE._col5 (type: double), VALUE._col6 (type: double), VALUE._col7 (type: double), VALUE._col8 (type: bigint), VALUE._col9 (type: double), VALUE._col10 (type: double), VALUE._col10 (type: double) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query18.q.out b/ql/src/test/results/clientpositive/perf/query18.q.out new file mode 100644 index 0000000..415a144 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query18.q.out @@ -0,0 +1,320 @@ +PREHOOK: query: explain select i_item_id, ca_country, ca_state, ca_county, avg( cast(cs_quantity as decimal(12,2))) agg1, avg( cast(cs_list_price as decimal(12,2))) agg2, avg( cast(cs_coupon_amt as decimal(12,2))) agg3, avg( cast(cs_sales_price as decimal(12,2))) agg4, avg( cast(cs_net_profit as decimal(12,2))) agg5, avg( cast(c_birth_year as decimal(12,2))) agg6, avg( cast(cd1.cd_dep_count as decimal(12,2))) agg7 from catalog_sales, date_dim, customer_demographics cd1, item, customer, customer_address, customer_demographics cd2 where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_item_sk = item.i_item_sk and catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk and catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and cd1.cd_gender = 'M' and cd1.cd_education_status = 'College' and customer.c_current_cdemo_sk = cd2.cd_demo_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and c_birth_month in (9,5,12,4,1,10) and d_year = 2001 and ca_state in ('ND','WI','AL' ,'NC','OK','MS','TN') group by i_item_id, ca_country, ca_state, ca_county with rollup order by ca_country, ca_state, ca_county, i_item_id limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_id, ca_country, ca_state, ca_county, avg( cast(cs_quantity as decimal(12,2))) agg1, avg( cast(cs_list_price as decimal(12,2))) agg2, avg( cast(cs_coupon_amt as decimal(12,2))) agg3, avg( cast(cs_sales_price as decimal(12,2))) agg4, avg( cast(cs_net_profit as decimal(12,2))) agg5, avg( cast(c_birth_year as decimal(12,2))) agg6, avg( cast(cd1.cd_dep_count as decimal(12,2))) agg7 from catalog_sales, date_dim, customer_demographics cd1, item, customer, customer_address, customer_demographics cd2 where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_item_sk = item.i_item_sk and catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk and catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and cd1.cd_gender = 'M' and cd1.cd_education_status = 'College' and customer.c_current_cdemo_sk = cd2.cd_demo_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and c_birth_month in (9,5,12,4,1,10) and d_year = 2001 and ca_state in ('ND','WI','AL' ,'NC','OK','MS','TN') group by i_item_id, ca_country, ca_state, ca_county with rollup order by ca_country, ca_state, ca_county, i_item_id limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-8 depends on stages: Stage-7 + Stage-0 depends on stages: Stage-8 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 6 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((cs_sold_date_sk is not null and cs_bill_cdemo_sk is not null) and cs_item_sk is not null) and cs_bill_customer_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 520 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: cs_sold_date_sk (type: int) + Statistics: Num rows: 1 Data size: 520 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_bill_customer_sk (type: int), cs_bill_cdemo_sk (type: int), cs_item_sk (type: int), cs_quantity (type: int), cs_list_price (type: decimal(7,2)), cs_sales_price (type: decimal(7,2)), cs_coupon_amt (type: decimal(7,2)), cs_net_profit (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 2001)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col3, _col4, _col15, _col18, _col20, _col21, _col27, _col33, _col37 + Statistics: Num rows: 4 Data size: 35 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col4 (type: int) + sort order: + + Map-reduce partition columns: _col4 (type: int) + Statistics: Num rows: 4 Data size: 35 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col15 (type: int), _col18 (type: int), _col20 (type: decimal(7,2)), _col21 (type: decimal(7,2)), _col27 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col37 (type: int) + TableScan + alias: cd1 + Statistics: Num rows: 53 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((cd_demo_sk is not null and (cd_gender = 'M')) and (cd_education_status = 'College')) (type: boolean) + Statistics: Num rows: 6 Data size: 96 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 6 Data size: 96 Basic stats: COMPLETE Column stats: NONE + value expressions: cd_dep_count (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col4 (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col0, _col3, _col4, _col15, _col18, _col20, _col21, _col27, _col33, _col37, _col68, _col74 + Statistics: Num rows: 6 Data size: 105 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col15 (type: int) + sort order: + + Map-reduce partition columns: _col15 (type: int) + Statistics: Num rows: 6 Data size: 105 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col4 (type: int), _col18 (type: int), _col20 (type: decimal(7,2)), _col21 (type: decimal(7,2)), _col27 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col37 (type: int), _col68 (type: int), _col74 (type: int) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col15 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col3, _col4, _col15, _col18, _col20, _col21, _col27, _col33, _col37, _col68, _col74, _col80, _col81 + Statistics: Num rows: 6 Data size: 115 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: int) + sort order: + + Map-reduce partition columns: _col3 (type: int) + Statistics: Num rows: 6 Data size: 115 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col4 (type: int), _col15 (type: int), _col18 (type: int), _col20 (type: decimal(7,2)), _col21 (type: decimal(7,2)), _col27 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col37 (type: int), _col68 (type: int), _col74 (type: int), _col80 (type: int), _col81 (type: string) + TableScan + alias: customer + Statistics: Num rows: 6 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((c_customer_sk is not null and c_current_addr_sk is not null) and c_current_cdemo_sk is not null) and (c_birth_month) IN (9, 5, 12, 4, 1, 10)) (type: boolean) + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + value expressions: c_current_cdemo_sk (type: int), c_current_addr_sk (type: int), c_birth_month (type: int), c_birth_year (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col3 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col3, _col4, _col15, _col18, _col20, _col21, _col27, _col33, _col37, _col68, _col74, _col80, _col81, _col105, _col107, _col109, _col117, _col118 + Statistics: Num rows: 6 Data size: 126 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col109 (type: int) + sort order: + + Map-reduce partition columns: _col109 (type: int) + Statistics: Num rows: 6 Data size: 126 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col4 (type: int), _col15 (type: int), _col18 (type: int), _col20 (type: decimal(7,2)), _col21 (type: decimal(7,2)), _col27 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col37 (type: int), _col68 (type: int), _col74 (type: int), _col80 (type: int), _col81 (type: string), _col105 (type: int), _col107 (type: int), _col117 (type: int), _col118 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ca_address_sk is not null and (ca_state) IN ('ND', 'WI', 'AL', 'NC', 'OK', 'MS', 'TN')) (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_county (type: string), ca_state (type: string), ca_country (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col109 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col3, _col4, _col15, _col18, _col20, _col21, _col27, _col33, _col37, _col68, _col74, _col80, _col81, _col105, _col107, _col109, _col117, _col118, _col126, _col133, _col134, _col136 + Statistics: Num rows: 6 Data size: 138 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col107 (type: int) + sort order: + + Map-reduce partition columns: _col107 (type: int) + Statistics: Num rows: 6 Data size: 138 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col4 (type: int), _col15 (type: int), _col18 (type: int), _col20 (type: decimal(7,2)), _col21 (type: decimal(7,2)), _col27 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col37 (type: int), _col68 (type: int), _col74 (type: int), _col80 (type: int), _col81 (type: string), _col105 (type: int), _col109 (type: int), _col117 (type: int), _col118 (type: int), _col126 (type: int), _col133 (type: string), _col134 (type: string), _col136 (type: string) + TableScan + alias: cd2 + Statistics: Num rows: 212 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cd_demo_sk is not null (type: boolean) + Statistics: Num rows: 106 Data size: 425 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 106 Data size: 425 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col107 (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col0, _col3, _col4, _col15, _col18, _col20, _col21, _col27, _col33, _col37, _col68, _col74, _col80, _col81, _col105, _col107, _col109, _col117, _col118, _col126, _col133, _col134, _col136, _col142 + Statistics: Num rows: 116 Data size: 467 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((((_col0 = _col37) and (_col15 = _col80)) and (_col4 = _col68)) and (_col3 = _col105)) and (_col107 = _col142)) and (_col109 = _col126)) and (_col117) IN (9, 5, 12, 4, 1, 10)) and (_col134) IN ('ND', 'WI', 'AL', 'NC', 'OK', 'MS', 'TN')) (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col81 (type: string), _col136 (type: string), _col134 (type: string), _col133 (type: string), _col18 (type: int), _col20 (type: decimal(7,2)), _col27 (type: decimal(7,2)), _col21 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col118 (type: int), _col74 (type: int) + outputColumnNames: _col81, _col136, _col134, _col133, _col18, _col20, _col27, _col21, _col33, _col118, _col74 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: avg(CAST( _col18 AS decimal(12,2))), avg(CAST( _col20 AS decimal(12,2))), avg(CAST( _col27 AS decimal(12,2))), avg(CAST( _col21 AS decimal(12,2))), avg(CAST( _col33 AS decimal(12,2))), avg(CAST( _col118 AS decimal(12,2))), avg(CAST( _col74 AS decimal(12,2))) + keys: _col81 (type: string), _col136 (type: string), _col134 (type: string), _col133 (type: string), '0' (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11 + Statistics: Num rows: 5 Data size: 20 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string) + sort order: +++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string) + Statistics: Num rows: 5 Data size: 20 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: struct), _col6 (type: struct), _col7 (type: struct), _col8 (type: struct), _col9 (type: struct), _col10 (type: struct), _col11 (type: struct) + Reduce Operator Tree: + Group By Operator + aggregations: avg(VALUE._col0), avg(VALUE._col1), avg(VALUE._col2), avg(VALUE._col3), avg(VALUE._col4), avg(VALUE._col5), avg(VALUE._col6) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col5, _col6, _col7, _col8, _col9, _col10, _col11 + Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: NONE + pruneGroupingSetId: true + Select Operator + expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: decimal(16,6)), _col6 (type: decimal(16,6)), _col7 (type: decimal(16,6)), _col8 (type: decimal(16,6)), _col9 (type: decimal(16,6)), _col10 (type: decimal(16,6)), _col11 (type: decimal(16,6)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 + Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: string), _col2 (type: string), _col3 (type: string), _col0 (type: string) + sort order: ++++ + Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: decimal(16,6)), _col5 (type: decimal(16,6)), _col6 (type: decimal(16,6)), _col7 (type: decimal(16,6)), _col8 (type: decimal(16,6)), _col9 (type: decimal(16,6)), _col10 (type: decimal(16,6)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey3 (type: string), KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), VALUE._col0 (type: decimal(16,6)), VALUE._col1 (type: decimal(16,6)), VALUE._col2 (type: decimal(16,6)), VALUE._col3 (type: decimal(16,6)), VALUE._col4 (type: decimal(16,6)), VALUE._col5 (type: decimal(16,6)), VALUE._col6 (type: decimal(16,6)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 + Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query19.q.out b/ql/src/test/results/clientpositive/perf/query19.q.out new file mode 100644 index 0000000..cf17739 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query19.q.out @@ -0,0 +1,280 @@ +PREHOOK: query: explain select i_brand_id brand_id, i_brand brand, i_manufact_id, i_manufact, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item,customer,customer_address,store where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and i_manager_id=7 and d_moy=11 and d_year=1999 and store_sales.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and substr(ca_zip,1,5) <> substr(s_zip,1,5) and store_sales.ss_store_sk = store.s_store_sk group by i_brand ,i_brand_id ,i_manufact_id ,i_manufact order by ext_price desc ,i_brand ,i_brand_id ,i_manufact_id ,i_manufact limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_brand_id brand_id, i_brand brand, i_manufact_id, i_manufact, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item,customer,customer_address,store where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and i_manager_id=7 and d_moy=11 and d_year=1999 and store_sales.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and substr(ca_zip,1,5) <> substr(s_zip,1,5) and store_sales.ss_store_sk = store.s_store_sk group by i_brand ,i_brand_id ,i_manufact_id ,i_manufact order by ext_price desc ,i_brand ,i_brand_id ,i_manufact_id ,i_manufact limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-0 depends on stages: Stage-7 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_moy = 11)) and (d_year = 1999)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + TableScan + alias: store_sales + Statistics: Num rows: 31 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((ss_sold_date_sk is not null and ss_item_sk is not null) and ss_customer_sk is not null) and ss_store_sk is not null) (type: boolean) + Statistics: Num rows: 2 Data size: 262 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 2 Data size: 262 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_item_sk (type: int), ss_customer_sk (type: int), ss_store_sk (type: int), ss_ext_sales_price (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 d_date_sk (type: int) + 1 ss_sold_date_sk (type: int) + outputColumnNames: _col0, _col31, _col33, _col34, _col38, _col46 + Statistics: Num rows: 2 Data size: 288 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col33 (type: int) + sort order: + + Map-reduce partition columns: _col33 (type: int) + Statistics: Num rows: 2 Data size: 288 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col31 (type: int), _col34 (type: int), _col38 (type: int), _col46 (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and (i_manager_id = 7)) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_brand_id (type: int), i_brand (type: string), i_manufact_id (type: int), i_manufact (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col33 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col31, _col33, _col34, _col38, _col46, _col57, _col64, _col65, _col70, _col71 + Statistics: Num rows: 2 Data size: 316 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col34 (type: int) + sort order: + + Map-reduce partition columns: _col34 (type: int) + Statistics: Num rows: 2 Data size: 316 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col31 (type: int), _col33 (type: int), _col38 (type: int), _col46 (type: decimal(7,2)), _col57 (type: int), _col64 (type: int), _col65 (type: string), _col70 (type: int), _col71 (type: string) + TableScan + alias: customer + Statistics: Num rows: 17 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean) + Statistics: Num rows: 5 Data size: 40 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 5 Data size: 40 Basic stats: COMPLETE Column stats: NONE + value expressions: c_current_addr_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col34 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col31, _col33, _col34, _col38, _col46, _col57, _col64, _col65, _col70, _col71, _col82, _col86 + Statistics: Num rows: 5 Data size: 44 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col86 (type: int) + sort order: + + Map-reduce partition columns: _col86 (type: int) + Statistics: Num rows: 5 Data size: 44 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col31 (type: int), _col33 (type: int), _col34 (type: int), _col38 (type: int), _col46 (type: decimal(7,2)), _col57 (type: int), _col64 (type: int), _col65 (type: string), _col70 (type: int), _col71 (type: string), _col82 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ca_address_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_zip (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col86 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col31, _col33, _col34, _col38, _col46, _col57, _col64, _col65, _col70, _col71, _col82, _col86, _col103, _col112 + Statistics: Num rows: 5 Data size: 48 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col38 (type: int) + sort order: + + Map-reduce partition columns: _col38 (type: int) + Statistics: Num rows: 5 Data size: 48 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col31 (type: int), _col33 (type: int), _col34 (type: int), _col46 (type: decimal(7,2)), _col57 (type: int), _col64 (type: int), _col65 (type: string), _col70 (type: int), _col71 (type: string), _col82 (type: int), _col86 (type: int), _col103 (type: int), _col112 (type: string) + TableScan + alias: store + Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: s_store_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + value expressions: s_zip (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col38 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col31, _col33, _col34, _col38, _col46, _col57, _col64, _col65, _col70, _col71, _col82, _col86, _col103, _col112, _col119, _col144 + Statistics: Num rows: 5 Data size: 52 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((_col0 = _col31) and (_col33 = _col57)) and (_col34 = _col82)) and (_col86 = _col103)) and (substr(_col112, 1, 5) <> substr(_col144, 1, 5))) and (_col38 = _col119)) (type: boolean) + Statistics: Num rows: 1 Data size: 10 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col65 (type: string), _col64 (type: int), _col70 (type: int), _col71 (type: string), _col46 (type: decimal(7,2)) + outputColumnNames: _col65, _col64, _col70, _col71, _col46 + Statistics: Num rows: 1 Data size: 10 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col46) + keys: _col65 (type: string), _col64 (type: int), _col70 (type: int), _col71 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 10 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: int), _col3 (type: string) + sort order: ++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: int), _col3 (type: string) + Statistics: Num rows: 1 Data size: 10 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 10 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: int), _col0 (type: string), _col2 (type: int), _col3 (type: string), _col4 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 10 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col4 (type: decimal(17,2)), _col1 (type: string), _col0 (type: int), _col2 (type: int), _col3 (type: string) + sort order: -++++ + Statistics: Num rows: 1 Data size: 10 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey2 (type: int), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey3 (type: int), KEY.reducesinkkey4 (type: string), KEY.reducesinkkey0 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 10 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 10 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 10 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query20.q.out b/ql/src/test/results/clientpositive/perf/query20.q.out new file mode 100644 index 0000000..26e91e5 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query20.q.out @@ -0,0 +1,208 @@ +PREHOOK: query: explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(cs_ext_sales_price) as itemrevenue ,sum(cs_ext_sales_price)*100/sum(sum(cs_ext_sales_price)) over (partition by i_class) as revenueratio from catalog_sales ,item ,date_dim where catalog_sales.cs_item_sk = item.i_item_sk and i_category in ('Jewelry', 'Sports', 'Books') and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and d_date between '2001-01-12' and '2001-02-11' group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(cs_ext_sales_price) as itemrevenue ,sum(cs_ext_sales_price)*100/sum(sum(cs_ext_sales_price)) over (partition by i_class) as revenueratio from catalog_sales ,item ,date_dim where catalog_sales.cs_item_sk = item.i_item_sk and i_category in ('Jewelry', 'Sports', 'Books') and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and d_date between '2001-01-12' and '2001-02-11' group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-0 depends on stages: Stage-5 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 26 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (cs_item_sk is not null and cs_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_item_sk (type: int) + sort order: + + Map-reduce partition columns: cs_item_sk (type: int) + Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_date_sk (type: int), cs_ext_sales_price (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and (i_category) IN ('Jewelry', 'Sports', 'Books')) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string), i_item_desc (type: string), i_current_price (type: decimal(7,2)), i_class (type: string), i_category (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col15, _col23, _col37, _col38, _col41, _col42, _col47, _col49 + Statistics: Num rows: 7 Data size: 924 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 7 Data size: 924 Basic stats: COMPLETE Column stats: NONE + value expressions: _col15 (type: int), _col23 (type: decimal(7,2)), _col37 (type: int), _col38 (type: string), _col41 (type: string), _col42 (type: decimal(7,2)), _col47 (type: string), _col49 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_date BETWEEN '2001-01-12' AND '2001-02-11') (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col15, _col23, _col37, _col38, _col41, _col42, _col47, _col49, _col62, _col64 + Statistics: Num rows: 7 Data size: 1016 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((_col15 = _col37) and (_col49) IN ('Jewelry', 'Sports', 'Books')) and (_col0 = _col62)) and _col64 BETWEEN '2001-01-12' AND '2001-02-11') (type: boolean) + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col38 (type: string), _col41 (type: string), _col49 (type: string), _col47 (type: string), _col42 (type: decimal(7,2)), _col23 (type: decimal(7,2)) + outputColumnNames: _col38, _col41, _col49, _col47, _col42, _col23 + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col23) + keys: _col38 (type: string), _col41 (type: string), _col49 (type: string), _col47 (type: string), _col42 (type: decimal(7,2)) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: decimal(7,2)) + sort order: +++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: decimal(7,2)) + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: decimal(7,2)) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: string) + sort order: + + Map-reduce partition columns: _col3 (type: string) + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col4 (type: decimal(7,2)), _col5 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: string), VALUE._col1 (type: string), VALUE._col2 (type: string), KEY.reducesinkkey0 (type: string), VALUE._col3 (type: decimal(7,2)), VALUE._col4 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + PTF Operator + Function definitions: + Input definition + input alias: ptf_0 + output shape: _col0: string, _col1: string, _col2: string, _col3: string, _col4: decimal(7,2), _col5: decimal(17,2) + type: WINDOWING + Windowing table definition + input alias: ptf_1 + name: windowingtablefunction + order by: _col3 + partition by: _col3 + raw input shape: + window functions: + window function definition + alias: sum_window_0 + arguments: _col5 + name: sum + window function: GenericUDAFSumHiveDecimal + window frame: PRECEDING(MAX)~FOLLOWING(MAX) + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: decimal(7,2)), _col0 (type: string), _col5 (type: decimal(17,2)), ((_col5 * 100) / sum_window_0) (type: decimal(38,23)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: string), _col2 (type: string), _col4 (type: string), _col0 (type: string), _col6 (type: decimal(38,23)) + sort order: +++++ + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(7,2)), _col5 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey3 (type: string), KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: decimal(7,2)), KEY.reducesinkkey2 (type: string), VALUE._col1 (type: decimal(17,2)), KEY.reducesinkkey4 (type: decimal(38,23)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 145 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query22.q.out b/ql/src/test/results/clientpositive/perf/query22.q.out new file mode 100644 index 0000000..f85eac8 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query22.q.out @@ -0,0 +1,203 @@ +PREHOOK: query: explain select i_product_name ,i_brand ,i_class ,i_category ,avg(inv_quantity_on_hand) qoh from inventory ,date_dim ,item ,warehouse where inventory.inv_date_sk=date_dim.d_date_sk and inventory.inv_item_sk=item.i_item_sk and inventory.inv_warehouse_sk = warehouse.w_warehouse_sk and date_dim.d_month_seq between 1193 and 1193 + 11 group by i_product_name ,i_brand ,i_class ,i_category with rollup order by qoh, i_product_name, i_brand, i_class, i_category limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_product_name ,i_brand ,i_class ,i_category ,avg(inv_quantity_on_hand) qoh from inventory ,date_dim ,item ,warehouse where inventory.inv_date_sk=date_dim.d_date_sk and inventory.inv_item_sk=item.i_item_sk and inventory.inv_warehouse_sk = warehouse.w_warehouse_sk and date_dim.d_month_seq between 1193 and 1193 + 11 group by i_product_name ,i_brand ,i_class ,i_category with rollup order by qoh, i_product_name, i_brand, i_class, i_category limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-0 depends on stages: Stage-5 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: inventory + Statistics: Num rows: 147 Data size: 2364 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((inv_date_sk is not null and inv_item_sk is not null) and inv_warehouse_sk is not null) (type: boolean) + Statistics: Num rows: 19 Data size: 305 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: inv_date_sk (type: int) + sort order: + + Map-reduce partition columns: inv_date_sk (type: int) + Statistics: Num rows: 19 Data size: 305 Basic stats: COMPLETE Column stats: NONE + value expressions: inv_item_sk (type: int), inv_warehouse_sk (type: int), inv_quantity_on_hand (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + value expressions: d_month_seq (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 inv_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col7, _col10 + Statistics: Num rows: 20 Data size: 335 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int) + sort order: + + Map-reduce partition columns: _col1 (type: int) + Statistics: Num rows: 20 Data size: 335 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col10 (type: int) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_brand (type: string), i_class (type: string), i_category (type: string), i_product_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col7, _col10, _col38, _col46, _col48, _col50, _col59 + Statistics: Num rows: 22 Data size: 368 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 22 Data size: 368 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: int), _col3 (type: int), _col7 (type: int), _col10 (type: int), _col38 (type: int), _col46 (type: string), _col48 (type: string), _col50 (type: string), _col59 (type: string) + TableScan + alias: warehouse + Statistics: Num rows: 29 Data size: 119 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: w_warehouse_sk is not null (type: boolean) + Statistics: Num rows: 15 Data size: 61 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: w_warehouse_sk (type: int) + sort order: + + Map-reduce partition columns: w_warehouse_sk (type: int) + Statistics: Num rows: 15 Data size: 61 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 w_warehouse_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col7, _col10, _col38, _col46, _col48, _col50, _col59, _col63 + Statistics: Num rows: 24 Data size: 404 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((_col0 = _col7) and (_col1 = _col38)) and (_col2 = _col63)) and _col10 BETWEEN 1193 AND 1204) (type: boolean) + Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col59 (type: string), _col46 (type: string), _col48 (type: string), _col50 (type: string), _col3 (type: int) + outputColumnNames: _col59, _col46, _col48, _col50, _col3 + Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: avg(_col3) + keys: _col59 (type: string), _col46 (type: string), _col48 (type: string), _col50 (type: string), '0' (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 5 Data size: 80 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string) + sort order: +++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string) + Statistics: Num rows: 5 Data size: 80 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: struct) + Reduce Operator Tree: + Group By Operator + aggregations: avg(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col5 + Statistics: Num rows: 2 Data size: 32 Basic stats: COMPLETE Column stats: NONE + pruneGroupingSetId: true + Select Operator + expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: double) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 2 Data size: 32 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col4 (type: double), _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string) + sort order: +++++ + Statistics: Num rows: 2 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: string), KEY.reducesinkkey0 (type: double) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 2 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 2 Data size: 32 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 2 Data size: 32 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query25.q.out b/ql/src/test/results/clientpositive/perf/query25.q.out new file mode 100644 index 0000000..0164469 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query25.q.out @@ -0,0 +1,355 @@ +PREHOOK: query: explain select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,sum(ss_net_profit) as store_sales_profit ,sum(sr_net_loss) as store_returns_loss ,sum(cs_net_profit) as catalog_sales_profit from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 4 and d1.d_year = 1998 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 4 and 10 and d2.d_year = 1998 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_moy between 4 and 10 and d3.d_year = 1998 group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,sum(ss_net_profit) as store_sales_profit ,sum(sr_net_loss) as store_returns_loss ,sum(cs_net_profit) as catalog_sales_profit from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 4 and d1.d_year = 1998 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 4 and 10 and d2.d_year = 1998 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_moy between 4 and 10 and d3.d_year = 1998 group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-8 depends on stages: Stage-7 + Stage-9 depends on stages: Stage-8 + Stage-0 depends on stages: Stage-9 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 30 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((ss_customer_sk is not null and ss_item_sk is not null) and ss_ticket_number is not null) and ss_sold_date_sk is not null) and ss_store_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 135 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_customer_sk (type: int), ss_item_sk (type: int), ss_ticket_number (type: int) + sort order: +++ + Map-reduce partition columns: ss_customer_sk (type: int), ss_item_sk (type: int), ss_ticket_number (type: int) + Statistics: Num rows: 1 Data size: 135 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_store_sk (type: int), ss_net_profit (type: decimal(7,2)) + TableScan + alias: store_returns + Statistics: Num rows: 2 Data size: 338 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((sr_customer_sk is not null and sr_item_sk is not null) and sr_ticket_number is not null) and sr_returned_date_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 169 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: sr_customer_sk (type: int), sr_item_sk (type: int), sr_ticket_number (type: int) + sort order: +++ + Map-reduce partition columns: sr_customer_sk (type: int), sr_item_sk (type: int), sr_ticket_number (type: int) + Statistics: Num rows: 1 Data size: 169 Basic stats: COMPLETE Column stats: NONE + value expressions: sr_returned_date_sk (type: int), sr_net_loss (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_customer_sk (type: int), ss_item_sk (type: int), ss_ticket_number (type: int) + 1 sr_customer_sk (type: int), sr_item_sk (type: int), sr_ticket_number (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col22, _col26, _col28, _col29, _col35, _col45 + Statistics: Num rows: 1 Data size: 148 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col29 (type: int), _col28 (type: int) + sort order: ++ + Map-reduce partition columns: _col29 (type: int), _col28 (type: int) + Statistics: Num rows: 1 Data size: 148 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col22 (type: decimal(7,2)), _col26 (type: int), _col35 (type: int), _col45 (type: decimal(7,2)) + TableScan + alias: catalog_sales + Statistics: Num rows: 25 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((cs_bill_customer_sk is not null and cs_item_sk is not null) and cs_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 4 Data size: 499 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_bill_customer_sk (type: int), cs_item_sk (type: int) + sort order: ++ + Map-reduce partition columns: cs_bill_customer_sk (type: int), cs_item_sk (type: int) + Statistics: Num rows: 4 Data size: 499 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_date_sk (type: int), cs_net_profit (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col29 (type: int), _col28 (type: int) + 1 cs_bill_customer_sk (type: int), cs_item_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col22, _col26, _col28, _col29, _col35, _col45, _col49, _col52, _col64, _col82 + Statistics: Num rows: 4 Data size: 548 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 4 Data size: 548 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col22 (type: decimal(7,2)), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col45 (type: decimal(7,2)), _col49 (type: int), _col52 (type: int), _col64 (type: int), _col82 (type: decimal(7,2)) + TableScan + alias: d1 + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_moy = 4)) and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col22, _col26, _col28, _col29, _col35, _col45, _col49, _col52, _col64, _col82, _col86 + Statistics: Num rows: 4 Data size: 602 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col26 (type: int) + sort order: + + Map-reduce partition columns: _col26 (type: int) + Statistics: Num rows: 4 Data size: 602 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col22 (type: decimal(7,2)), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col45 (type: decimal(7,2)), _col49 (type: int), _col52 (type: int), _col64 (type: int), _col82 (type: decimal(7,2)), _col86 (type: int) + TableScan + alias: d2 + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and d_moy BETWEEN 4 AND 10) and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: d_moy (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col26 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col22, _col26, _col28, _col29, _col35, _col45, _col49, _col52, _col64, _col82, _col86, _col117, _col125 + Statistics: Num rows: 4 Data size: 662 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col49 (type: int) + sort order: + + Map-reduce partition columns: _col49 (type: int) + Statistics: Num rows: 4 Data size: 662 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col22 (type: decimal(7,2)), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col45 (type: decimal(7,2)), _col52 (type: int), _col64 (type: int), _col82 (type: decimal(7,2)), _col86 (type: int), _col117 (type: int), _col125 (type: int) + TableScan + alias: d3 + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and d_moy BETWEEN 4 AND 10) and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: d_moy (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col49 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col22, _col26, _col28, _col29, _col35, _col45, _col49, _col52, _col64, _col82, _col86, _col117, _col125, _col148, _col156 + Statistics: Num rows: 4 Data size: 728 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 4 Data size: 728 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col9 (type: int), _col22 (type: decimal(7,2)), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col45 (type: decimal(7,2)), _col49 (type: int), _col52 (type: int), _col64 (type: int), _col82 (type: decimal(7,2)), _col86 (type: int), _col117 (type: int), _col125 (type: int), _col148 (type: int), _col156 (type: int) + TableScan + alias: store + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: s_store_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + value expressions: s_store_id (type: string), s_store_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col22, _col26, _col28, _col29, _col35, _col45, _col49, _col52, _col64, _col82, _col86, _col117, _col125, _col148, _col156, _col179, _col180, _col184 + Statistics: Num rows: 4 Data size: 800 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 4 Data size: 800 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col22 (type: decimal(7,2)), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col45 (type: decimal(7,2)), _col49 (type: int), _col52 (type: int), _col64 (type: int), _col82 (type: decimal(7,2)), _col86 (type: int), _col117 (type: int), _col125 (type: int), _col148 (type: int), _col156 (type: int), _col179 (type: int), _col180 (type: string), _col184 (type: string) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string), i_item_desc (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col22, _col26, _col28, _col29, _col35, _col45, _col49, _col52, _col64, _col82, _col86, _col117, _col125, _col148, _col156, _col179, _col180, _col184, _col211, _col212, _col215 + Statistics: Num rows: 4 Data size: 880 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((((((((_col86 = _col0) and (_col211 = _col2)) and (_col179 = _col7)) and (_col3 = _col29)) and (_col2 = _col28)) and (_col9 = _col35)) and (_col26 = _col117)) and _col125 BETWEEN 4 AND 10) and (_col29 = _col52)) and (_col28 = _col64)) and (_col49 = _col148)) and _col156 BETWEEN 4 AND 10) (type: boolean) + Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col212 (type: string), _col215 (type: string), _col180 (type: string), _col184 (type: string), _col22 (type: decimal(7,2)), _col45 (type: decimal(7,2)), _col82 (type: decimal(7,2)) + outputColumnNames: _col212, _col215, _col180, _col184, _col22, _col45, _col82 + Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col22), sum(_col45), sum(_col82) + keys: _col212 (type: string), _col215 (type: string), _col180 (type: string), _col184 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string) + sort order: ++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string) + Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-9 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string) + sort order: ++++ + Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), VALUE._col0 (type: decimal(17,2)), VALUE._col1 (type: decimal(17,2)), VALUE._col2 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query26.q.out b/ql/src/test/results/clientpositive/perf/query26.q.out new file mode 100644 index 0000000..8d4f8ff --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query26.q.out @@ -0,0 +1,237 @@ +PREHOOK: query: explain select i_item_id, avg(cs_quantity) agg1, avg(cs_list_price) agg2, avg(cs_coupon_amt) agg3, avg(cs_sales_price) agg4 from catalog_sales, customer_demographics, date_dim, item, promotion where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_item_sk = item.i_item_sk and catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk and catalog_sales.cs_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_id, avg(cs_quantity) agg1, avg(cs_list_price) agg2, avg(cs_coupon_amt) agg3, avg(cs_sales_price) agg4 from catalog_sales, customer_demographics, date_dim, item, promotion where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_item_sk = item.i_item_sk and catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk and catalog_sales.cs_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 8 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((cs_bill_cdemo_sk is not null and cs_sold_date_sk is not null) and cs_item_sk is not null) and cs_promo_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 390 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_bill_cdemo_sk (type: int) + sort order: + + Map-reduce partition columns: cs_bill_cdemo_sk (type: int) + Statistics: Num rows: 1 Data size: 390 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_date_sk (type: int), cs_item_sk (type: int), cs_promo_sk (type: int), cs_quantity (type: int), cs_list_price (type: decimal(7,2)), cs_sales_price (type: decimal(7,2)), cs_coupon_amt (type: decimal(7,2)) + TableScan + alias: customer_demographics + Statistics: Num rows: 65 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((cd_demo_sk is not null and (cd_gender = 'F')) and (cd_marital_status = 'W')) and (cd_education_status = 'Primary')) (type: boolean) + Statistics: Num rows: 4 Data size: 52 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 4 Data size: 52 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_bill_cdemo_sk (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col0, _col4, _col15, _col16, _col18, _col20, _col21, _col27, _col37 + Statistics: Num rows: 4 Data size: 57 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 4 Data size: 57 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: int), _col15 (type: int), _col16 (type: int), _col18 (type: int), _col20 (type: decimal(7,2)), _col21 (type: decimal(7,2)), _col27 (type: decimal(7,2)), _col37 (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col4, _col15, _col16, _col18, _col20, _col21, _col27, _col37, _col49 + Statistics: Num rows: 4 Data size: 62 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col15 (type: int) + sort order: + + Map-reduce partition columns: _col15 (type: int) + Statistics: Num rows: 4 Data size: 62 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col4 (type: int), _col16 (type: int), _col18 (type: int), _col20 (type: decimal(7,2)), _col21 (type: decimal(7,2)), _col27 (type: decimal(7,2)), _col37 (type: int), _col49 (type: int) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col15 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col4, _col15, _col16, _col18, _col20, _col21, _col27, _col37, _col49, _col80, _col81 + Statistics: Num rows: 4 Data size: 68 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col16 (type: int) + sort order: + + Map-reduce partition columns: _col16 (type: int) + Statistics: Num rows: 4 Data size: 68 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col4 (type: int), _col15 (type: int), _col18 (type: int), _col20 (type: decimal(7,2)), _col21 (type: decimal(7,2)), _col27 (type: decimal(7,2)), _col37 (type: int), _col49 (type: int), _col80 (type: int), _col81 (type: string) + TableScan + alias: promotion + Statistics: Num rows: 1 Data size: 117 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (p_promo_sk is not null and ((p_channel_email = 'N') or (p_channel_event = 'N'))) (type: boolean) + Statistics: Num rows: 1 Data size: 117 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: p_promo_sk (type: int) + sort order: + + Map-reduce partition columns: p_promo_sk (type: int) + Statistics: Num rows: 1 Data size: 117 Basic stats: COMPLETE Column stats: NONE + value expressions: p_channel_email (type: string), p_channel_event (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col16 (type: int) + 1 p_promo_sk (type: int) + outputColumnNames: _col0, _col4, _col15, _col16, _col18, _col20, _col21, _col27, _col37, _col49, _col80, _col81, _col105, _col114, _col119 + Statistics: Num rows: 4 Data size: 74 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((_col0 = _col49) and (_col15 = _col80)) and (_col4 = _col37)) and (_col16 = _col105)) and ((_col114 = 'N') or (_col119 = 'N'))) (type: boolean) + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col81 (type: string), _col18 (type: int), _col20 (type: decimal(7,2)), _col27 (type: decimal(7,2)), _col21 (type: decimal(7,2)) + outputColumnNames: _col81, _col18, _col20, _col27, _col21 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: avg(_col18), avg(_col20), avg(_col27), avg(_col21) + keys: _col81 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: struct), _col2 (type: struct), _col3 (type: struct), _col4 (type: struct) + Reduce Operator Tree: + Group By Operator + aggregations: avg(VALUE._col0), avg(VALUE._col1), avg(VALUE._col2), avg(VALUE._col3) + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: double), _col2 (type: decimal(11,6)), _col3 (type: decimal(11,6)), _col4 (type: decimal(11,6)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), VALUE._col0 (type: double), VALUE._col1 (type: decimal(11,6)), VALUE._col2 (type: decimal(11,6)), VALUE._col3 (type: decimal(11,6)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query27.q.out b/ql/src/test/results/clientpositive/perf/query27.q.out new file mode 100644 index 0000000..2aa0080 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query27.q.out @@ -0,0 +1,237 @@ +PREHOOK: query: explain select i_item_id, s_state, avg(ss_quantity) agg1, avg(ss_list_price) agg2, avg(ss_coupon_amt) agg3, avg(ss_sales_price) agg4 from store_sales, customer_demographics, date_dim, store, item where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and customer_demographics.cd_gender = 'F' and customer_demographics.cd_marital_status = 'D' and customer_demographics.cd_education_status = 'Unknown' and date_dim.d_year = 1998 and store.s_state in ('KS','AL', 'MN', 'AL', 'SC', 'VT') group by i_item_id, s_state order by i_item_id ,s_state limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_id, s_state, avg(ss_quantity) agg1, avg(ss_list_price) agg2, avg(ss_coupon_amt) agg3, avg(ss_sales_price) agg4 from store_sales, customer_demographics, date_dim, store, item where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and customer_demographics.cd_gender = 'F' and customer_demographics.cd_marital_status = 'D' and customer_demographics.cd_education_status = 'Unknown' and date_dim.d_year = 1998 and store.s_state in ('KS','AL', 'MN', 'AL', 'SC', 'VT') group by i_item_id, s_state order by i_item_id ,s_state limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 11 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((ss_cdemo_sk is not null and ss_sold_date_sk is not null) and ss_store_sk is not null) and ss_item_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 370 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_cdemo_sk (type: int) + sort order: + + Map-reduce partition columns: ss_cdemo_sk (type: int) + Statistics: Num rows: 1 Data size: 370 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_item_sk (type: int), ss_store_sk (type: int), ss_quantity (type: int), ss_list_price (type: decimal(7,2)), ss_sales_price (type: decimal(7,2)), ss_coupon_amt (type: decimal(7,2)) + TableScan + alias: customer_demographics + Statistics: Num rows: 65 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((cd_demo_sk is not null and (cd_gender = 'F')) and (cd_marital_status = 'D')) and (cd_education_status = 'Unknown')) (type: boolean) + Statistics: Num rows: 4 Data size: 52 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 4 Data size: 52 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_cdemo_sk (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col0, _col2, _col4, _col7, _col10, _col12, _col13, _col19, _col26 + Statistics: Num rows: 4 Data size: 57 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 4 Data size: 57 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col4 (type: int), _col7 (type: int), _col10 (type: int), _col12 (type: decimal(7,2)), _col13 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col26 (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col4, _col7, _col10, _col12, _col13, _col19, _col26, _col38 + Statistics: Num rows: 4 Data size: 62 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 4 Data size: 62 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col4 (type: int), _col10 (type: int), _col12 (type: decimal(7,2)), _col13 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col26 (type: int), _col38 (type: int) + TableScan + alias: store + Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (s_store_sk is not null and (s_state) IN ('KS', 'AL', 'MN', 'AL', 'SC', 'VT')) (type: boolean) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + value expressions: s_state (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col2, _col4, _col7, _col10, _col12, _col13, _col19, _col26, _col38, _col69, _col93 + Statistics: Num rows: 4 Data size: 68 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 4 Data size: 68 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col4 (type: int), _col7 (type: int), _col10 (type: int), _col12 (type: decimal(7,2)), _col13 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col26 (type: int), _col38 (type: int), _col69 (type: int), _col93 (type: string) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col2, _col4, _col7, _col10, _col12, _col13, _col19, _col26, _col38, _col69, _col93, _col101, _col102 + Statistics: Num rows: 4 Data size: 74 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((_col0 = _col38) and (_col2 = _col101)) and (_col7 = _col69)) and (_col4 = _col26)) and (_col93) IN ('KS', 'AL', 'MN', 'AL', 'SC', 'VT')) (type: boolean) + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col102 (type: string), _col93 (type: string), _col10 (type: int), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col13 (type: decimal(7,2)) + outputColumnNames: _col102, _col93, _col10, _col12, _col19, _col13 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: avg(_col10), avg(_col12), avg(_col19), avg(_col13) + keys: _col102 (type: string), _col93 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string) + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: struct), _col3 (type: struct), _col4 (type: struct), _col5 (type: struct) + Reduce Operator Tree: + Group By Operator + aggregations: avg(VALUE._col0), avg(VALUE._col1), avg(VALUE._col2), avg(VALUE._col3) + keys: KEY._col0 (type: string), KEY._col1 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: double), _col3 (type: decimal(11,6)), _col4 (type: decimal(11,6)), _col5 (type: decimal(11,6)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: double), VALUE._col1 (type: decimal(11,6)), VALUE._col2 (type: decimal(11,6)), VALUE._col3 (type: decimal(11,6)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query29.q.out b/ql/src/test/results/clientpositive/perf/query29.q.out new file mode 100644 index 0000000..67c8f73 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query29.q.out @@ -0,0 +1,355 @@ +PREHOOK: query: explain select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,sum(ss_quantity) as store_sales_quantity ,sum(sr_return_quantity) as store_returns_quantity ,sum(cs_quantity) as catalog_sales_quantity from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 2 and d1.d_year = 2000 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 2 and 2 + 3 and d2.d_year = 2000 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_year in (2000,2000+1,2000+2) group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,sum(ss_quantity) as store_sales_quantity ,sum(sr_return_quantity) as store_returns_quantity ,sum(cs_quantity) as catalog_sales_quantity from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 2 and d1.d_year = 2000 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 2 and 2 + 3 and d2.d_year = 2000 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_year in (2000,2000+1,2000+2) group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-8 depends on stages: Stage-7 + Stage-9 depends on stages: Stage-8 + Stage-0 depends on stages: Stage-9 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 169 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((ss_customer_sk is not null and ss_item_sk is not null) and ss_ticket_number is not null) and ss_sold_date_sk is not null) and ss_store_sk is not null) (type: boolean) + Statistics: Num rows: 6 Data size: 144 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_customer_sk (type: int), ss_item_sk (type: int), ss_ticket_number (type: int) + sort order: +++ + Map-reduce partition columns: ss_customer_sk (type: int), ss_item_sk (type: int), ss_ticket_number (type: int) + Statistics: Num rows: 6 Data size: 144 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_store_sk (type: int), ss_quantity (type: int) + TableScan + alias: store_returns + Statistics: Num rows: 16 Data size: 338 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((sr_customer_sk is not null and sr_item_sk is not null) and sr_ticket_number is not null) and sr_returned_date_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: sr_customer_sk (type: int), sr_item_sk (type: int), sr_ticket_number (type: int) + sort order: +++ + Map-reduce partition columns: sr_customer_sk (type: int), sr_item_sk (type: int), sr_ticket_number (type: int) + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + value expressions: sr_returned_date_sk (type: int), sr_return_quantity (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_customer_sk (type: int), ss_item_sk (type: int), ss_ticket_number (type: int) + 1 sr_customer_sk (type: int), sr_item_sk (type: int), sr_ticket_number (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36 + Statistics: Num rows: 6 Data size: 158 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col29 (type: int), _col28 (type: int) + sort order: ++ + Map-reduce partition columns: _col29 (type: int), _col28 (type: int) + Statistics: Num rows: 6 Data size: 158 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col10 (type: int), _col26 (type: int), _col35 (type: int), _col36 (type: int) + TableScan + alias: catalog_sales + Statistics: Num rows: 195 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((cs_bill_customer_sk is not null and cs_item_sk is not null) and cs_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 25 Data size: 400 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_bill_customer_sk (type: int), cs_item_sk (type: int) + sort order: ++ + Map-reduce partition columns: cs_bill_customer_sk (type: int), cs_item_sk (type: int) + Statistics: Num rows: 25 Data size: 400 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_date_sk (type: int), cs_quantity (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col29 (type: int), _col28 (type: int) + 1 cs_bill_customer_sk (type: int), cs_item_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36, _col49, _col52, _col64, _col67 + Statistics: Num rows: 27 Data size: 440 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 27 Data size: 440 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col10 (type: int), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col36 (type: int), _col49 (type: int), _col52 (type: int), _col64 (type: int), _col67 (type: int) + TableScan + alias: d1 + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_moy = 2)) and (d_year = 2000)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36, _col49, _col52, _col64, _col67, _col86 + Statistics: Num rows: 29 Data size: 484 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col26 (type: int) + sort order: + + Map-reduce partition columns: _col26 (type: int) + Statistics: Num rows: 29 Data size: 484 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col10 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col36 (type: int), _col49 (type: int), _col52 (type: int), _col64 (type: int), _col67 (type: int), _col86 (type: int) + TableScan + alias: d2 + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and d_moy BETWEEN 2 AND 5) and (d_year = 2000)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: d_moy (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col26 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36, _col49, _col52, _col64, _col67, _col86, _col117, _col125 + Statistics: Num rows: 31 Data size: 532 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col49 (type: int) + sort order: + + Map-reduce partition columns: _col49 (type: int) + Statistics: Num rows: 31 Data size: 532 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col10 (type: int), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col36 (type: int), _col52 (type: int), _col64 (type: int), _col67 (type: int), _col86 (type: int), _col117 (type: int), _col125 (type: int) + TableScan + alias: d3 + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year) IN (2000, 2001, 2002)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col49 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36, _col49, _col52, _col64, _col67, _col86, _col117, _col125, _col148, _col154 + Statistics: Num rows: 34 Data size: 585 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 34 Data size: 585 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col9 (type: int), _col10 (type: int), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col36 (type: int), _col49 (type: int), _col52 (type: int), _col64 (type: int), _col67 (type: int), _col86 (type: int), _col117 (type: int), _col125 (type: int), _col148 (type: int), _col154 (type: int) + TableScan + alias: store + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: s_store_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + value expressions: s_store_id (type: string), s_store_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36, _col49, _col52, _col64, _col67, _col86, _col117, _col125, _col148, _col154, _col179, _col180, _col184 + Statistics: Num rows: 37 Data size: 643 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 37 Data size: 643 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col10 (type: int), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col36 (type: int), _col49 (type: int), _col52 (type: int), _col64 (type: int), _col67 (type: int), _col86 (type: int), _col117 (type: int), _col125 (type: int), _col148 (type: int), _col154 (type: int), _col179 (type: int), _col180 (type: string), _col184 (type: string) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string), i_item_desc (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col10, _col26, _col28, _col29, _col35, _col36, _col49, _col52, _col64, _col67, _col86, _col117, _col125, _col148, _col154, _col179, _col180, _col184, _col211, _col212, _col215 + Statistics: Num rows: 40 Data size: 707 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((((((((_col86 = _col0) and (_col211 = _col2)) and (_col179 = _col7)) and (_col3 = _col29)) and (_col2 = _col28)) and (_col9 = _col35)) and (_col26 = _col117)) and _col125 BETWEEN 2 AND 5) and (_col29 = _col52)) and (_col28 = _col64)) and (_col49 = _col148)) and (_col154) IN (2000, 2001, 2002)) (type: boolean) + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col212 (type: string), _col215 (type: string), _col180 (type: string), _col184 (type: string), _col10 (type: int), _col36 (type: int), _col67 (type: int) + outputColumnNames: _col212, _col215, _col180, _col184, _col10, _col36, _col67 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col10), sum(_col36), sum(_col67) + keys: _col212 (type: string), _col215 (type: string), _col180 (type: string), _col184 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string) + sort order: ++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string) + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: bigint), _col5 (type: bigint), _col6 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-9 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string) + sort order: ++++ + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: bigint), _col5 (type: bigint), _col6 (type: bigint) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), VALUE._col0 (type: bigint), VALUE._col1 (type: bigint), VALUE._col2 (type: bigint) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query3.q.out b/ql/src/test/results/clientpositive/perf/query3.q.out new file mode 100644 index 0000000..176257a --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query3.q.out @@ -0,0 +1,165 @@ +PREHOOK: query: explain select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) sum_agg from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manufact_id = 436 and dt.d_moy=12 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,sum_agg desc ,brand_id limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) sum_agg from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manufact_id = 436 and dt.d_moy=12 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,sum_agg desc ,brand_id limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-0 depends on stages: Stage-4 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: dt + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_moy = 12)) (type: boolean) + Statistics: Num rows: 3 Data size: 38 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 3 Data size: 38 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int) + TableScan + alias: store_sales + Statistics: Num rows: 33 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_sold_date_sk is not null and ss_item_sk is not null) (type: boolean) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_item_sk (type: int), ss_ext_sales_price (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 d_date_sk (type: int) + 1 ss_sold_date_sk (type: int) + outputColumnNames: _col0, _col6, _col31, _col33, _col46 + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col33 (type: int) + sort order: + + Map-reduce partition columns: _col33 (type: int) + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col6 (type: int), _col31 (type: int), _col46 (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and (i_manufact_id = 436)) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_brand_id (type: int), i_brand (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col33 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col6, _col31, _col33, _col46, _col57, _col64, _col65 + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col31) and (_col33 = _col57)) (type: boolean) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col6 (type: int), _col65 (type: string), _col64 (type: int), _col46 (type: decimal(7,2)) + outputColumnNames: _col6, _col65, _col64, _col46 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col46) + keys: _col6 (type: int), _col65 (type: string), _col64 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: string), _col2 (type: int) + sort order: +++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: string), _col2 (type: int) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: int), KEY._col1 (type: string), KEY._col2 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: int), _col2 (type: int), _col1 (type: string), _col3 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col3 (type: decimal(17,2)), _col1 (type: int) + sort order: +-+ + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: string) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey2 (type: int), VALUE._col0 (type: string), KEY.reducesinkkey1 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query31.q.out b/ql/src/test/results/clientpositive/perf/query31.q.out new file mode 100644 index 0000000..7a31873 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query31.q.out @@ -0,0 +1,834 @@ +PREHOOK: query: explain with ss as (select ca_county,d_qoy, d_year,sum(ss_ext_sales_price) as store_sales from store_sales,date_dim,customer_address where ss_sold_date_sk = d_date_sk and ss_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year), ws as (select ca_county,d_qoy, d_year,sum(ws_ext_sales_price) as web_sales from web_sales,date_dim,customer_address where ws_sold_date_sk = d_date_sk and ws_bill_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year) select ss1.ca_county ,ss1.d_year ,ws2.web_sales/ws1.web_sales web_q1_q2_increase ,ss2.store_sales/ss1.store_sales store_q1_q2_increase ,ws3.web_sales/ws2.web_sales web_q2_q3_increase ,ss3.store_sales/ss2.store_sales store_q2_q3_increase from ss ss1 ,ss ss2 ,ss ss3 ,ws ws1 ,ws ws2 ,ws ws3 where ss1.d_qoy = 1 and ss1.d_year = 1998 and ss1.ca_county = ss2.ca_county and ss2.d_qoy = 2 and ss2.d_year = 1998 and ss2.ca_county = ss3.ca_county and ss3.d_qoy = 3 and ss3.d_year = 1998 and ss1.ca_county = ws1.ca_county and ws1.d_qoy = 1 and ws1.d_year = 1998 and ws1.ca_county = ws2.ca_county and ws2.d_qoy = 2 and ws2.d_year = 1998 and ws1.ca_county = ws3.ca_county and ws3.d_qoy = 3 and ws3.d_year =1998 and case when ws1.web_sales > 0 then ws2.web_sales/ws1.web_sales else null end > case when ss1.store_sales > 0 then ss2.store_sales/ss1.store_sales else null end and case when ws2.web_sales > 0 then ws3.web_sales/ws2.web_sales else null end > case when ss2.store_sales > 0 then ss3.store_sales/ss2.store_sales else null end order by web_q1_q2_increase +PREHOOK: type: QUERY +POSTHOOK: query: explain with ss as (select ca_county,d_qoy, d_year,sum(ss_ext_sales_price) as store_sales from store_sales,date_dim,customer_address where ss_sold_date_sk = d_date_sk and ss_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year), ws as (select ca_county,d_qoy, d_year,sum(ws_ext_sales_price) as web_sales from web_sales,date_dim,customer_address where ws_sold_date_sk = d_date_sk and ws_bill_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year) select ss1.ca_county ,ss1.d_year ,ws2.web_sales/ws1.web_sales web_q1_q2_increase ,ss2.store_sales/ss1.store_sales store_q1_q2_increase ,ws3.web_sales/ws2.web_sales web_q2_q3_increase ,ss3.store_sales/ss2.store_sales store_q2_q3_increase from ss ss1 ,ss ss2 ,ss ss3 ,ws ws1 ,ws ws2 ,ws ws3 where ss1.d_qoy = 1 and ss1.d_year = 1998 and ss1.ca_county = ss2.ca_county and ss2.d_qoy = 2 and ss2.d_year = 1998 and ss2.ca_county = ss3.ca_county and ss3.d_qoy = 3 and ss3.d_year = 1998 and ss1.ca_county = ws1.ca_county and ws1.d_qoy = 1 and ws1.d_year = 1998 and ws1.ca_county = ws2.ca_county and ws2.d_qoy = 2 and ws2.d_year = 1998 and ws1.ca_county = ws3.ca_county and ws3.d_qoy = 3 and ws3.d_year =1998 and case when ws1.web_sales > 0 then ws2.web_sales/ws1.web_sales else null end > case when ss1.store_sales > 0 then ss2.store_sales/ss1.store_sales else null end and case when ws2.web_sales > 0 then ws3.web_sales/ws2.web_sales else null end > case when ss2.store_sales > 0 then ss3.store_sales/ss2.store_sales else null end order by web_q1_q2_increase +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3, Stage-10, Stage-15, Stage-20, Stage-25, Stage-30 + Stage-5 depends on stages: Stage-4 + Stage-8 is a root stage + Stage-9 depends on stages: Stage-8 + Stage-10 depends on stages: Stage-9 + Stage-13 is a root stage + Stage-14 depends on stages: Stage-13 + Stage-15 depends on stages: Stage-14 + Stage-18 is a root stage + Stage-19 depends on stages: Stage-18 + Stage-20 depends on stages: Stage-19 + Stage-23 is a root stage + Stage-24 depends on stages: Stage-23 + Stage-25 depends on stages: Stage-24 + Stage-28 is a root stage + Stage-29 depends on stages: Stage-28 + Stage-30 depends on stages: Stage-29 + Stage-0 depends on stages: Stage-5 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 33 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_sold_date_sk is not null and ss_addr_sk is not null) (type: boolean) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_addr_sk (type: int), ss_ext_sales_price (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_qoy = 1)) and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col6, _col15, _col26 + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col6 (type: int) + sort order: + + Map-reduce partition columns: _col6 (type: int) + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col15 (type: decimal(7,2)), _col26 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ca_address_sk is not null and ca_county is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_county (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col6 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col6, _col15, _col26, _col57, _col64 + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col26) and (_col6 = _col57)) (type: boolean) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col64 (type: string), 1 (type: int), 1998 (type: int), _col15 (type: decimal(7,2)) + outputColumnNames: _col64, _col36, _col32, _col15 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col15) + keys: _col64 (type: string), _col36 (type: int), _col32 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: int) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: int) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: decimal(17,2)) + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: decimal(17,2)) + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: decimal(17,2)) + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: decimal(17,2)) + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: decimal(17,2)) + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + Inner Join 1 to 2 + Inner Join 0 to 3 + Inner Join 3 to 4 + Inner Join 3 to 5 + keys: + 0 _col0 (type: string) + 1 _col0 (type: string) + 2 _col0 (type: string) + 3 _col0 (type: string) + 4 _col0 (type: string) + 5 _col0 (type: string) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23 + Statistics: Num rows: 5 Data size: 819 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((((((((((((((((_col1 = 1) and (_col2 = 1998)) and (_col0 = _col4)) and (_col5 = 2)) and (_col6 = 1998)) and (_col4 = _col8)) and (_col9 = 3)) and (_col10 = 1998)) and (_col0 = _col12)) and (_col13 = 1)) and (_col14 = 1998)) and (_col12 = _col16)) and (_col17 = 2)) and (_col18 = 1998)) and (_col12 = _col20)) and (_col21 = 3)) and (_col22 = 1998)) and (CASE WHEN ((_col15 > 0)) THEN ((_col19 / _col15)) ELSE (null) END > CASE WHEN ((_col3 > 0)) THEN ((_col7 / _col3)) ELSE (null) END)) and (CASE WHEN ((_col19 > 0)) THEN ((_col23 / _col19)) ELSE (null) END > CASE WHEN ((_col7 > 0)) THEN ((_col11 / _col7)) ELSE (null) END)) (type: boolean) + Statistics: Num rows: 1 Data size: 163 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: string), (_col19 / _col15) (type: decimal(37,20)), (_col7 / _col3) (type: decimal(37,20)), (_col23 / _col19) (type: decimal(37,20)), (_col11 / _col7) (type: decimal(37,20)) + outputColumnNames: _col0, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 163 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: decimal(37,20)) + sort order: + + Statistics: Num rows: 1 Data size: 163 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col3 (type: decimal(37,20)), _col4 (type: decimal(37,20)), _col5 (type: decimal(37,20)) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: string), 1998 (type: int), KEY.reducesinkkey0 (type: decimal(37,20)), VALUE._col2 (type: decimal(37,20)), VALUE._col3 (type: decimal(37,20)), VALUE._col4 (type: decimal(37,20)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 163 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 163 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 33 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_sold_date_sk is not null and ss_addr_sk is not null) (type: boolean) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_addr_sk (type: int), ss_ext_sales_price (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_qoy = 2)) and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col6, _col15, _col26 + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-9 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col6 (type: int) + sort order: + + Map-reduce partition columns: _col6 (type: int) + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col15 (type: decimal(7,2)), _col26 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ca_address_sk is not null and ca_county is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_county (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col6 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col6, _col15, _col26, _col57, _col64 + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col26) and (_col6 = _col57)) (type: boolean) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col64 (type: string), 2 (type: int), 1998 (type: int), _col15 (type: decimal(7,2)) + outputColumnNames: _col64, _col36, _col32, _col15 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col15) + keys: _col64 (type: string), _col36 (type: int), _col32 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-10 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: int) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: int) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-13 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 33 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_sold_date_sk is not null and ss_addr_sk is not null) (type: boolean) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_addr_sk (type: int), ss_ext_sales_price (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_qoy = 3)) and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col6, _col15, _col26 + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-14 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col6 (type: int) + sort order: + + Map-reduce partition columns: _col6 (type: int) + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col15 (type: decimal(7,2)), _col26 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ca_address_sk is not null and ca_county is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_county (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col6 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col6, _col15, _col26, _col57, _col64 + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col26) and (_col6 = _col57)) (type: boolean) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col64 (type: string), 3 (type: int), 1998 (type: int), _col15 (type: decimal(7,2)) + outputColumnNames: _col64, _col36, _col32, _col15 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col15) + keys: _col64 (type: string), _col36 (type: int), _col32 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-15 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: int) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: int) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-18 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 13 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ws_sold_date_sk is not null and ws_bill_addr_sk is not null) (type: boolean) + Statistics: Num rows: 4 Data size: 504 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ws_sold_date_sk (type: int) + Statistics: Num rows: 4 Data size: 504 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_bill_addr_sk (type: int), ws_ext_sales_price (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_qoy = 1)) and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col7, _col23, _col37 + Statistics: Num rows: 4 Data size: 554 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-19 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 4 Data size: 554 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col23 (type: decimal(7,2)), _col37 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ca_address_sk is not null and ca_county is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_county (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col7, _col23, _col37, _col68, _col75 + Statistics: Num rows: 4 Data size: 609 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col37) and (_col7 = _col68)) (type: boolean) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col75 (type: string), 1 (type: int), 1998 (type: int), _col23 (type: decimal(7,2)) + outputColumnNames: _col75, _col47, _col43, _col23 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col23) + keys: _col75 (type: string), _col47 (type: int), _col43 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-20 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: int) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: int) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-23 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 13 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ws_sold_date_sk is not null and ws_bill_addr_sk is not null) (type: boolean) + Statistics: Num rows: 4 Data size: 504 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ws_sold_date_sk (type: int) + Statistics: Num rows: 4 Data size: 504 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_bill_addr_sk (type: int), ws_ext_sales_price (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_qoy = 2)) and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col7, _col23, _col37 + Statistics: Num rows: 4 Data size: 554 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-24 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 4 Data size: 554 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col23 (type: decimal(7,2)), _col37 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ca_address_sk is not null and ca_county is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_county (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col7, _col23, _col37, _col68, _col75 + Statistics: Num rows: 4 Data size: 609 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col37) and (_col7 = _col68)) (type: boolean) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col75 (type: string), 2 (type: int), 1998 (type: int), _col23 (type: decimal(7,2)) + outputColumnNames: _col75, _col47, _col43, _col23 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col23) + keys: _col75 (type: string), _col47 (type: int), _col43 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-25 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: int) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: int) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-28 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 13 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ws_sold_date_sk is not null and ws_bill_addr_sk is not null) (type: boolean) + Statistics: Num rows: 4 Data size: 504 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ws_sold_date_sk (type: int) + Statistics: Num rows: 4 Data size: 504 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_bill_addr_sk (type: int), ws_ext_sales_price (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_qoy = 3)) and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col7, _col23, _col37 + Statistics: Num rows: 4 Data size: 554 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-29 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 4 Data size: 554 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col23 (type: decimal(7,2)), _col37 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ca_address_sk is not null and ca_county is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_county (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col7, _col23, _col37, _col68, _col75 + Statistics: Num rows: 4 Data size: 609 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col37) and (_col7 = _col68)) (type: boolean) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col75 (type: string), 3 (type: int), 1998 (type: int), _col23 (type: decimal(7,2)) + outputColumnNames: _col75, _col47, _col43, _col23 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col23) + keys: _col75 (type: string), _col47 (type: int), _col43 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-30 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: int) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: int) + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 152 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query34.q.out b/ql/src/test/results/clientpositive/perf/query34.q.out new file mode 100644 index 0000000..bdf4a65 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query34.q.out @@ -0,0 +1,246 @@ +PREHOOK: query: explain select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (date_dim.d_dom between 1 and 3 or date_dim.d_dom between 25 and 28) and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '5001-10000') and household_demographics.hd_vehicle_count > 0 and (case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end) > 1.2 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_county in ('Kittitas County','Adams County','Richland County','Furnas County', 'Orange County','Appanoose County','Franklin Parish','Tehama County') group by ss_ticket_number,ss_customer_sk) dn,customer where dn.ss_customer_sk = customer.c_customer_sk and cnt between 15 and 20 order by c_last_name,c_first_name,c_salutation,c_preferred_cust_flag desc +PREHOOK: type: QUERY +POSTHOOK: query: explain select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (date_dim.d_dom between 1 and 3 or date_dim.d_dom between 25 and 28) and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '5001-10000') and household_demographics.hd_vehicle_count > 0 and (case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end) > 1.2 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_county in ('Kittitas County','Adams County','Richland County','Furnas County', 'Orange County','Appanoose County','Franklin Parish','Tehama County') group by ss_ticket_number,ss_customer_sk) dn,customer where dn.ss_customer_sk = customer.c_customer_sk and cnt between 15 and 20 order by c_last_name,c_first_name,c_salutation,c_preferred_cust_flag desc +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 203 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_customer_sk is not null) (type: boolean) + Statistics: Num rows: 13 Data size: 260 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 13 Data size: 260 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_customer_sk (type: int), ss_hdemo_sk (type: int), ss_store_sk (type: int), ss_ticket_number (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_dom BETWEEN 1 AND 3 or d_dom BETWEEN 25 AND 28)) and (d_year) IN (1998, 1999, 2000)) (type: boolean) + Statistics: Num rows: 3 Data size: 38 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 3 Data size: 38 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int), d_dom (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col7, _col9, _col26, _col32, _col35 + Statistics: Num rows: 14 Data size: 286 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 14 Data size: 286 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col5 (type: int), _col9 (type: int), _col26 (type: int), _col32 (type: int), _col35 (type: int) + TableScan + alias: store + Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (s_store_sk is not null and (s_county) IN ('Kittitas County', 'Adams County', 'Richland County', 'Furnas County', 'Orange County', 'Appanoose County', 'Franklin Parish', 'Tehama County')) (type: boolean) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + value expressions: s_county (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col7, _col9, _col26, _col32, _col35, _col57, _col80 + Statistics: Num rows: 15 Data size: 314 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col5 (type: int) + sort order: + + Map-reduce partition columns: _col5 (type: int) + Statistics: Num rows: 15 Data size: 314 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col26 (type: int), _col32 (type: int), _col35 (type: int), _col57 (type: int), _col80 (type: string) + TableScan + alias: household_demographics + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((hd_demo_sk is not null and ((hd_buy_potential = '1001-5000') or (hd_buy_potential = '5001-10000'))) and (hd_vehicle_count > 0)) and (CASE WHEN ((hd_vehicle_count > 0)) THEN ((hd_dep_count / hd_vehicle_count)) ELSE (null) END > 1.2)) (type: boolean) + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + value expressions: hd_buy_potential (type: string), hd_dep_count (type: int), hd_vehicle_count (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col5 (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col7, _col9, _col26, _col32, _col35, _col57, _col80, _col89, _col91, _col92, _col93 + Statistics: Num rows: 16 Data size: 345 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((((((_col0 = _col26) and (_col7 = _col57)) and (_col5 = _col89)) and (_col35 BETWEEN 1 AND 3 or _col35 BETWEEN 25 AND 28)) and ((_col91 = '1001-5000') or (_col91 = '5001-10000'))) and (_col93 > 0)) and (CASE WHEN ((_col93 > 0)) THEN ((_col92 / _col93)) ELSE (null) END > 1.2)) and (_col32) IN (1998, 1999, 2000)) and (_col80) IN ('Kittitas County', 'Adams County', 'Richland County', 'Furnas County', 'Orange County', 'Appanoose County', 'Franklin Parish', 'Tehama County')) (type: boolean) + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col9 (type: int), _col3 (type: int) + outputColumnNames: _col9, _col3 + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count() + keys: _col9 (type: int), _col3 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0) + keys: KEY._col0 (type: int), KEY._col1 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: _col2 BETWEEN 15 AND 20 (type: boolean) + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int) + sort order: + + Map-reduce partition columns: _col1 (type: int) + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: bigint) + TableScan + alias: customer + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: c_customer_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + value expressions: c_salutation (type: string), c_first_name (type: string), c_last_name (type: string), c_preferred_cust_flag (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col10, _col11, _col12, _col13 + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col1 = _col3) and _col2 BETWEEN 15 AND 20) (type: boolean) + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col12 (type: string), _col11 (type: string), _col10 (type: string), _col13 (type: string), _col0 (type: int), _col2 (type: bigint) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string) + sort order: +++- + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: int), _col5 (type: bigint) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), VALUE._col0 (type: int), VALUE._col1 (type: bigint) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query39.q.out b/ql/src/test/results/clientpositive/perf/query39.q.out new file mode 100644 index 0000000..f7636d1 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query39.q.out @@ -0,0 +1,430 @@ +PREHOOK: query: explain with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov +PREHOOK: type: QUERY +POSTHOOK: query: explain with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4, Stage-13 + Stage-6 depends on stages: Stage-5 + Stage-10 is a root stage + Stage-11 depends on stages: Stage-10 + Stage-12 depends on stages: Stage-11 + Stage-13 depends on stages: Stage-12 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: inventory + Statistics: Num rows: 147 Data size: 2364 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((inv_item_sk is not null and inv_warehouse_sk is not null) and inv_date_sk is not null) (type: boolean) + Statistics: Num rows: 19 Data size: 305 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: inv_item_sk (type: int) + sort order: + + Map-reduce partition columns: inv_item_sk (type: int) + Statistics: Num rows: 19 Data size: 305 Basic stats: COMPLETE Column stats: NONE + value expressions: inv_date_sk (type: int), inv_warehouse_sk (type: int), inv_quantity_on_hand (type: int) + TableScan + alias: item + Statistics: Num rows: 49 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 25 Data size: 101 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 25 Data size: 101 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 inv_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col7 + Statistics: Num rows: 27 Data size: 111 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 27 Data size: 111 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: int), _col3 (type: int), _col7 (type: int) + TableScan + alias: warehouse + Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: w_warehouse_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: w_warehouse_sk (type: int) + sort order: + + Map-reduce partition columns: w_warehouse_sk (type: int) + Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE + value expressions: w_warehouse_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 w_warehouse_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col7, _col32, _col34 + Statistics: Num rows: 29 Data size: 122 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 29 Data size: 122 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col32 (type: int), _col34 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_year = 1999)) and (d_moy = 3)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col7, _col32, _col34, _col49 + Statistics: Num rows: 31 Data size: 134 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((_col1 = _col7) and (_col2 = _col32)) and (_col0 = _col49)) (type: boolean) + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col34 (type: string), _col32 (type: int), _col7 (type: int), 3 (type: int), _col3 (type: int) + outputColumnNames: _col34, _col32, _col7, _col57, _col3 + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: stddev_samp(_col3), avg(_col3) + keys: _col34 (type: string), _col32 (type: int), _col7 (type: int), _col57 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: int), _col3 (type: int) + sort order: ++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: int), _col3 (type: int) + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: struct), _col5 (type: struct) + Reduce Operator Tree: + Group By Operator + aggregations: stddev_samp(VALUE._col0), avg(VALUE._col1) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: double), _col5 (type: double) + outputColumnNames: _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (CASE (_col5) WHEN (0) THEN (0) ELSE ((_col4 / _col5)) END > 1) (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: double), CASE (_col5) WHEN (0) THEN (null) ELSE ((_col4 / _col5)) END (type: double) + outputColumnNames: _col1, _col2, _col3, _col5, _col6 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col2 (type: int), _col1 (type: int) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: int), _col5 (type: double), _col6 (type: double) + TableScan + Reduce Output Operator + key expressions: _col2 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col2 (type: int), _col1 (type: int) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: int), _col5 (type: double), _col6 (type: double) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int), _col1 (type: int) + 1 _col2 (type: int), _col1 (type: int) + outputColumnNames: _col1, _col2, _col3, _col5, _col6, _col8, _col9, _col10, _col12, _col13 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((_col2 = _col9) and (_col1 = _col8)) and (_col3 = 3)) and (_col10 = 4)) (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: int), _col2 (type: int), _col5 (type: double), _col6 (type: double), _col8 (type: int), _col9 (type: int), _col12 (type: double), _col13 (type: double) + outputColumnNames: _col0, _col1, _col3, _col4, _col5, _col6, _col8, _col9 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int), 3 (type: int), _col3 (type: double), _col4 (type: double), 4 (type: int), _col8 (type: double), _col9 (type: double) + sort order: ++++++++ + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: int), _col6 (type: int) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: int), 3 (type: int), KEY.reducesinkkey3 (type: double), KEY.reducesinkkey4 (type: double), VALUE._col0 (type: int), VALUE._col1 (type: int), 4 (type: int), KEY.reducesinkkey6 (type: double), KEY.reducesinkkey7 (type: double) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-10 + Map Reduce + Map Operator Tree: + TableScan + alias: inventory + Statistics: Num rows: 147 Data size: 2364 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((inv_item_sk is not null and inv_warehouse_sk is not null) and inv_date_sk is not null) (type: boolean) + Statistics: Num rows: 19 Data size: 305 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: inv_item_sk (type: int) + sort order: + + Map-reduce partition columns: inv_item_sk (type: int) + Statistics: Num rows: 19 Data size: 305 Basic stats: COMPLETE Column stats: NONE + value expressions: inv_date_sk (type: int), inv_warehouse_sk (type: int), inv_quantity_on_hand (type: int) + TableScan + alias: item + Statistics: Num rows: 49 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 25 Data size: 101 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 25 Data size: 101 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 inv_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col7 + Statistics: Num rows: 27 Data size: 111 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-11 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 27 Data size: 111 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: int), _col3 (type: int), _col7 (type: int) + TableScan + alias: warehouse + Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: w_warehouse_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: w_warehouse_sk (type: int) + sort order: + + Map-reduce partition columns: w_warehouse_sk (type: int) + Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE + value expressions: w_warehouse_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 w_warehouse_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col7, _col32, _col34 + Statistics: Num rows: 29 Data size: 122 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-12 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 29 Data size: 122 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col32 (type: int), _col34 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_year = 1999)) and (d_moy = 4)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col7, _col32, _col34, _col49 + Statistics: Num rows: 31 Data size: 134 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((_col1 = _col7) and (_col2 = _col32)) and (_col0 = _col49)) (type: boolean) + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col34 (type: string), _col32 (type: int), _col7 (type: int), 4 (type: int), _col3 (type: int) + outputColumnNames: _col34, _col32, _col7, _col57, _col3 + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: stddev_samp(_col3), avg(_col3) + keys: _col34 (type: string), _col32 (type: int), _col7 (type: int), _col57 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-13 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: int), _col3 (type: int) + sort order: ++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: int), _col3 (type: int) + Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: struct), _col5 (type: struct) + Reduce Operator Tree: + Group By Operator + aggregations: stddev_samp(VALUE._col0), avg(VALUE._col1) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: double), _col5 (type: double) + outputColumnNames: _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (CASE (_col5) WHEN (0) THEN (0) ELSE ((_col4 / _col5)) END > 1) (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: double), CASE (_col5) WHEN (0) THEN (null) ELSE ((_col4 / _col5)) END (type: double) + outputColumnNames: _col1, _col2, _col3, _col5, _col6 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 and inv1.cov > 1.5 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov +PREHOOK: type: QUERY +PREHOOK: Input: default@date_dim +PREHOOK: Input: default@inventory +PREHOOK: Input: default@item +PREHOOK: Input: default@warehouse +#### A masked pattern was here #### +POSTHOOK: query: with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 and inv1.cov > 1.5 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov +POSTHOOK: type: QUERY +POSTHOOK: Input: default@date_dim +POSTHOOK: Input: default@inventory +POSTHOOK: Input: default@item +POSTHOOK: Input: default@warehouse +#### A masked pattern was here #### diff --git a/ql/src/test/results/clientpositive/perf/query40.q.out b/ql/src/test/results/clientpositive/perf/query40.q.out new file mode 100644 index 0000000..de0d6fc --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query40.q.out @@ -0,0 +1,239 @@ +PREHOOK: query: explain select w_state ,i_item_id ,sum(case when (cast(d_date as date) < cast ('1998-04-08' as date)) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_before ,sum(case when (cast(d_date as date) >= cast ('1998-04-08' as date)) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_after from catalog_sales left outer join catalog_returns on (catalog_sales.cs_order_number = catalog_returns.cr_order_number and catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) ,warehouse ,item ,date_dim where i_current_price between 0.99 and 1.49 and item.i_item_sk = catalog_sales.cs_item_sk and catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and date_dim.d_date between '1998-03-09' and '1998-05-08' group by w_state,i_item_id order by w_state,i_item_id limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select w_state ,i_item_id ,sum(case when (cast(d_date as date) < cast ('1998-04-08' as date)) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_before ,sum(case when (cast(d_date as date) >= cast ('1998-04-08' as date)) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_after from catalog_sales left outer join catalog_returns on (catalog_sales.cs_order_number = catalog_returns.cr_order_number and catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) ,warehouse ,item ,date_dim where i_current_price between 0.99 and 1.49 and item.i_item_sk = catalog_sales.cs_item_sk and catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and date_dim.d_date between '1998-03-09' and '1998-05-08' group by w_state,i_item_id order by w_state,i_item_id limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 24 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((cs_warehouse_sk is not null and cs_item_sk is not null) and cs_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 3 Data size: 390 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_order_number (type: int), cs_item_sk (type: int) + sort order: ++ + Map-reduce partition columns: cs_order_number (type: int), cs_item_sk (type: int) + Statistics: Num rows: 3 Data size: 390 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_date_sk (type: int), cs_warehouse_sk (type: int), cs_sales_price (type: decimal(7,2)) + TableScan + alias: catalog_returns + Statistics: Num rows: 2 Data size: 288 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cr_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 144 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cr_order_number (type: int), cr_item_sk (type: int) + sort order: ++ + Map-reduce partition columns: cr_order_number (type: int), cr_item_sk (type: int) + Statistics: Num rows: 1 Data size: 144 Basic stats: COMPLETE Column stats: NONE + value expressions: cr_refunded_cash (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + keys: + 0 cs_order_number (type: int), cs_item_sk (type: int) + 1 cr_order_number (type: int), cr_item_sk (type: int) + outputColumnNames: _col0, _col14, _col15, _col21, _col60 + Statistics: Num rows: 3 Data size: 429 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col14 (type: int) + sort order: + + Map-reduce partition columns: _col14 (type: int) + Statistics: Num rows: 3 Data size: 429 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col15 (type: int), _col21 (type: decimal(7,2)), _col60 (type: decimal(7,2)) + TableScan + alias: warehouse + Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: w_warehouse_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: w_warehouse_sk (type: int) + sort order: + + Map-reduce partition columns: w_warehouse_sk (type: int) + Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE + value expressions: w_state (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col14 (type: int) + 1 w_warehouse_sk (type: int) + outputColumnNames: _col0, _col14, _col15, _col21, _col60, _col67, _col77 + Statistics: Num rows: 3 Data size: 471 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col15 (type: int) + sort order: + + Map-reduce partition columns: _col15 (type: int) + Statistics: Num rows: 3 Data size: 471 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col14 (type: int), _col21 (type: decimal(7,2)), _col60 (type: decimal(7,2)), _col67 (type: int), _col77 (type: string) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and i_current_price BETWEEN 0.99 AND 1.49) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string), i_current_price (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col15 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col14, _col15, _col21, _col60, _col67, _col77, _col84, _col85, _col89 + Statistics: Num rows: 3 Data size: 518 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 3 Data size: 518 Basic stats: COMPLETE Column stats: NONE + value expressions: _col14 (type: int), _col15 (type: int), _col21 (type: decimal(7,2)), _col60 (type: decimal(7,2)), _col67 (type: int), _col77 (type: string), _col84 (type: int), _col85 (type: string), _col89 (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_date BETWEEN '1998-03-09' AND '1998-05-08') (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col14, _col15, _col21, _col60, _col67, _col77, _col84, _col85, _col89, _col109, _col111 + Statistics: Num rows: 3 Data size: 569 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((_col89 BETWEEN 0.99 AND 1.49 and (_col84 = _col15)) and (_col14 = _col67)) and (_col0 = _col109)) and _col111 BETWEEN '1998-03-09' AND '1998-05-08') (type: boolean) + Statistics: Num rows: 1 Data size: 189 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col77 (type: string), _col85 (type: string), _col111 (type: string), _col21 (type: decimal(7,2)), _col60 (type: decimal(7,2)) + outputColumnNames: _col77, _col85, _col111, _col21, _col60 + Statistics: Num rows: 1 Data size: 189 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(CASE WHEN ((CAST( _col111 AS DATE) < CAST( '1998-04-08' AS DATE))) THEN ((_col21 - COALESCE(_col60,0))) ELSE (0) END), sum(CASE WHEN ((CAST( _col111 AS DATE) >= CAST( '1998-04-08' AS DATE))) THEN ((_col21 - COALESCE(_col60,0))) ELSE (0) END) + keys: _col77 (type: string), _col85 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 189 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string) + Statistics: Num rows: 1 Data size: 189 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: decimal(23,2)), _col3 (type: decimal(23,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1) + keys: KEY._col0 (type: string), KEY._col1 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 189 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Statistics: Num rows: 1 Data size: 189 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: decimal(23,2)), _col3 (type: decimal(23,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: decimal(23,2)), VALUE._col1 (type: decimal(23,2)) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 189 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 189 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 189 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query42.q.out b/ql/src/test/results/clientpositive/perf/query42.q.out new file mode 100644 index 0000000..31150c0 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query42.q.out @@ -0,0 +1,159 @@ +PREHOOK: query: explain select dt.d_year ,item.i_category_id ,item.i_category ,sum(ss_ext_sales_price) as s from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=1998 group by dt.d_year ,item.i_category_id ,item.i_category order by s desc,dt.d_year ,item.i_category_id ,item.i_category limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select dt.d_year ,item.i_category_id ,item.i_category ,sum(ss_ext_sales_price) as s from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=1998 group by dt.d_year ,item.i_category_id ,item.i_category order by s desc,dt.d_year ,item.i_category_id ,item.i_category limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-0 depends on stages: Stage-4 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: dt + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_moy = 12)) and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + TableScan + alias: store_sales + Statistics: Num rows: 33 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_sold_date_sk is not null and ss_item_sk is not null) (type: boolean) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_item_sk (type: int), ss_ext_sales_price (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 d_date_sk (type: int) + 1 ss_sold_date_sk (type: int) + outputColumnNames: _col0, _col31, _col33, _col46 + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col33 (type: int) + sort order: + + Map-reduce partition columns: _col33 (type: int) + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col31 (type: int), _col46 (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and (i_manager_id = 1)) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_category_id (type: int), i_category (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col33 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col31, _col33, _col46, _col57, _col68, _col69 + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col31) and (_col33 = _col57)) (type: boolean) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: 1998 (type: int), _col68 (type: int), _col69 (type: string), _col46 (type: decimal(7,2)) + outputColumnNames: _col6, _col68, _col69, _col46 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col46) + keys: _col6 (type: int), _col68 (type: int), _col69 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int), _col2 (type: string) + sort order: +++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int), _col2 (type: string) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: decimal(17,2)), _col0 (type: int), _col1 (type: int), _col2 (type: string) + sort order: -+++ + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey1 (type: int), KEY.reducesinkkey2 (type: int), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey0 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query43.q.out b/ql/src/test/results/clientpositive/perf/query43.q.out new file mode 100644 index 0000000..eface9b --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query43.q.out @@ -0,0 +1,160 @@ +PREHOOK: query: explain select s_store_name, s_store_id, sum(case when (d_day_name='Sunday') then ss_sales_price else null end) sun_sales, sum(case when (d_day_name='Monday') then ss_sales_price else null end) mon_sales, sum(case when (d_day_name='Tuesday') then ss_sales_price else null end) tue_sales, sum(case when (d_day_name='Wednesday') then ss_sales_price else null end) wed_sales, sum(case when (d_day_name='Thursday') then ss_sales_price else null end) thu_sales, sum(case when (d_day_name='Friday') then ss_sales_price else null end) fri_sales, sum(case when (d_day_name='Saturday') then ss_sales_price else null end) sat_sales from date_dim, store_sales, store where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store.s_store_sk = store_sales.ss_store_sk and s_gmt_offset = -6 and d_year = 1998 group by s_store_name, s_store_id order by s_store_name, s_store_id,sun_sales,mon_sales,tue_sales,wed_sales,thu_sales,fri_sales,sat_sales limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select s_store_name, s_store_id, sum(case when (d_day_name='Sunday') then ss_sales_price else null end) sun_sales, sum(case when (d_day_name='Monday') then ss_sales_price else null end) mon_sales, sum(case when (d_day_name='Tuesday') then ss_sales_price else null end) tue_sales, sum(case when (d_day_name='Wednesday') then ss_sales_price else null end) wed_sales, sum(case when (d_day_name='Thursday') then ss_sales_price else null end) thu_sales, sum(case when (d_day_name='Friday') then ss_sales_price else null end) fri_sales, sum(case when (d_day_name='Saturday') then ss_sales_price else null end) sat_sales from date_dim, store_sales, store where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store.s_store_sk = store_sales.ss_store_sk and s_gmt_offset = -6 and d_year = 1998 group by s_store_name, s_store_id order by s_store_name, s_store_id,sun_sales,mon_sales,tue_sales,wed_sales,thu_sales,fri_sales,sat_sales limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-0 depends on stages: Stage-4 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: date_dim + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_day_name (type: string) + TableScan + alias: store_sales + Statistics: Num rows: 33 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_sold_date_sk is not null and ss_store_sk is not null) (type: boolean) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_store_sk (type: int), ss_sales_price (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 d_date_sk (type: int) + 1 ss_sold_date_sk (type: int) + outputColumnNames: _col0, _col14, _col31, _col38, _col44 + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col38 (type: int) + sort order: + + Map-reduce partition columns: _col38 (type: int) + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col14 (type: string), _col31 (type: int), _col44 (type: decimal(7,2)) + TableScan + alias: store + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (s_store_sk is not null and (s_gmt_offset = -6)) (type: boolean) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + value expressions: s_store_id (type: string), s_store_name (type: string), s_gmt_offset (type: decimal(5,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col38 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col14, _col31, _col38, _col44, _col57, _col58, _col62, _col84 + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((_col0 = _col31) and (_col57 = _col38)) and (_col84 = -6)) (type: boolean) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col62 (type: string), _col58 (type: string), _col14 (type: string), _col44 (type: decimal(7,2)) + outputColumnNames: _col62, _col58, _col14, _col44 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(CASE WHEN ((_col14 = 'Sunday')) THEN (_col44) ELSE (null) END), sum(CASE WHEN ((_col14 = 'Monday')) THEN (_col44) ELSE (null) END), sum(CASE WHEN ((_col14 = 'Tuesday')) THEN (_col44) ELSE (null) END), sum(CASE WHEN ((_col14 = 'Wednesday')) THEN (_col44) ELSE (null) END), sum(CASE WHEN ((_col14 = 'Thursday')) THEN (_col44) ELSE (null) END), sum(CASE WHEN ((_col14 = 'Friday')) THEN (_col44) ELSE (null) END), sum(CASE WHEN ((_col14 = 'Saturday')) THEN (_col44) ELSE (null) END) + keys: _col62 (type: string), _col58 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: decimal(17,2)), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)), _col7 (type: decimal(17,2)), _col8 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2), sum(VALUE._col3), sum(VALUE._col4), sum(VALUE._col5), sum(VALUE._col6) + keys: KEY._col0 (type: string), KEY._col1 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: decimal(17,2)), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)), _col7 (type: decimal(17,2)), _col8 (type: decimal(17,2)) + sort order: +++++++++ + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: decimal(17,2)), KEY.reducesinkkey3 (type: decimal(17,2)), KEY.reducesinkkey4 (type: decimal(17,2)), KEY.reducesinkkey5 (type: decimal(17,2)), KEY.reducesinkkey6 (type: decimal(17,2)), KEY.reducesinkkey7 (type: decimal(17,2)), KEY.reducesinkkey8 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query45.q.out b/ql/src/test/results/clientpositive/perf/query45.q.out new file mode 100644 index 0000000..0b00e5e --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query45.q.out @@ -0,0 +1,282 @@ +PREHOOK: query: explain select ca_zip, ca_county, sum(ws_sales_price) from web_sales JOIN customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk JOIN customer_address ON customer.c_current_addr_sk = customer_address.ca_address_sk JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk JOIN item ON web_sales.ws_item_sk = item.i_item_sk where ( item.i_item_id in (select i_item_id from item i2 where i2.i_item_sk in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) ) ) and d_qoy = 2 and d_year = 2000 group by ca_zip, ca_county order by ca_zip, ca_county limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select ca_zip, ca_county, sum(ws_sales_price) from web_sales JOIN customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk JOIN customer_address ON customer.c_current_addr_sk = customer_address.ca_address_sk JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk JOIN item ON web_sales.ws_item_sk = item.i_item_sk where ( item.i_item_id in (select i_item_id from item i2 where i2.i_item_sk in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) ) ) and d_qoy = 2 and d_year = 2000 group by ca_zip, ca_county order by ca_zip, ca_county limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-0 depends on stages: Stage-7 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 13 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((ws_bill_customer_sk is not null and ws_sold_date_sk is not null) and ws_item_sk is not null) (type: boolean) + Statistics: Num rows: 2 Data size: 252 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_bill_customer_sk (type: int) + sort order: + + Map-reduce partition columns: ws_bill_customer_sk (type: int) + Statistics: Num rows: 2 Data size: 252 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_sold_date_sk (type: int), ws_item_sk (type: int), ws_sales_price (type: decimal(7,2)) + TableScan + alias: customer + Statistics: Num rows: 17 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean) + Statistics: Num rows: 5 Data size: 40 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 5 Data size: 40 Basic stats: COMPLETE Column stats: NONE + value expressions: c_current_addr_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_bill_customer_sk (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col3, _col21, _col41 + Statistics: Num rows: 5 Data size: 44 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col41 (type: int) + sort order: + + Map-reduce partition columns: _col41 (type: int) + Statistics: Num rows: 5 Data size: 44 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col21 (type: decimal(7,2)) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ca_address_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_county (type: string), ca_zip (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col41 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col3, _col21, _col65, _col67 + Statistics: Num rows: 5 Data size: 48 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 5 Data size: 48 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: int), _col21 (type: decimal(7,2)), _col65 (type: string), _col67 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_qoy = 2)) and (d_year = 2000)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col3, _col21, _col65, _col67 + Statistics: Num rows: 5 Data size: 52 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: int) + sort order: + + Map-reduce partition columns: _col3 (type: int) + Statistics: Num rows: 5 Data size: 52 Basic stats: COMPLETE Column stats: NONE + value expressions: _col21 (type: decimal(7,2)), _col65 (type: string), _col67 (type: string) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and i_item_id is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col3 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col21, _col65, _col67, _col106 + Statistics: Num rows: 5 Data size: 57 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col106 (type: string) + sort order: + + Map-reduce partition columns: _col106 (type: string) + Statistics: Num rows: 5 Data size: 57 Basic stats: COMPLETE Column stats: NONE + value expressions: _col21 (type: decimal(7,2)), _col65 (type: string), _col67 (type: string) + TableScan + alias: i2 + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((i_item_sk) IN (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) and i_item_id is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: i_item_id (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Left Semi Join 0 to 1 + keys: + 0 _col106 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col21, _col65, _col67 + Statistics: Num rows: 5 Data size: 62 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col67 (type: string), _col65 (type: string), _col21 (type: decimal(7,2)) + outputColumnNames: _col67, _col65, _col21 + Statistics: Num rows: 5 Data size: 62 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col21) + keys: _col67 (type: string), _col65 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 5 Data size: 62 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string) + Statistics: Num rows: 5 Data size: 62 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 2 Data size: 24 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Statistics: Num rows: 2 Data size: 24 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 2 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 2 Data size: 24 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 2 Data size: 24 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query46.q.out b/ql/src/test/results/clientpositive/perf/query46.q.out new file mode 100644 index 0000000..20071d3 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query46.q.out @@ -0,0 +1,328 @@ +PREHOOK: query: explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,amt,profit from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from store_sales,date_dim,store,household_demographics,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_dow in (6,0) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem','Clinton','Clifton','Springfield') group by ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city) dn,customer,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,amt,profit from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from store_sales,date_dim,store,household_demographics,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_dow in (6,0) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem','Clinton','Clifton','Springfield') group by ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city) dn,customer,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-8 depends on stages: Stage-7 + Stage-0 depends on stages: Stage-8 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 16 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_addr_sk is not null) and ss_customer_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 254 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 1 Data size: 254 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_customer_sk (type: int), ss_hdemo_sk (type: int), ss_addr_sk (type: int), ss_store_sk (type: int), ss_ticket_number (type: int), ss_coupon_amt (type: decimal(7,2)), ss_net_profit (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_dow) IN (6, 0)) and (d_year) IN (1998, 1999, 2000)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int), d_dow (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col6, _col7, _col9, _col19, _col22, _col26, _col32, _col33 + Statistics: Num rows: 1 Data size: 279 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 1 Data size: 279 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: int), _col9 (type: int), _col19 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col26 (type: int), _col32 (type: int), _col33 (type: int) + TableScan + alias: store + Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (s_store_sk is not null and (s_city) IN ('Rosedale', 'Bethlehem', 'Clinton', 'Clifton', 'Springfield')) (type: boolean) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + value expressions: s_city (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col6, _col7, _col9, _col19, _col22, _col26, _col32, _col33, _col57, _col79 + Statistics: Num rows: 1 Data size: 306 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col5 (type: int) + sort order: + + Map-reduce partition columns: _col5 (type: int) + Statistics: Num rows: 1 Data size: 306 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: int), _col19 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col26 (type: int), _col32 (type: int), _col33 (type: int), _col57 (type: int), _col79 (type: string) + TableScan + alias: household_demographics + Statistics: Num rows: 2 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and ((hd_dep_count = 4) or (hd_vehicle_count = 2))) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: hd_dep_count (type: int), hd_vehicle_count (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col5 (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col6, _col7, _col9, _col19, _col22, _col26, _col32, _col33, _col57, _col79, _col89, _col92, _col93 + Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col6 (type: int) + sort order: + + Map-reduce partition columns: _col6 (type: int) + Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col5 (type: int), _col7 (type: int), _col9 (type: int), _col19 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col26 (type: int), _col32 (type: int), _col33 (type: int), _col57 (type: int), _col79 (type: string), _col89 (type: int), _col92 (type: int), _col93 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ca_address_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_city (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col6 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col6, _col7, _col9, _col19, _col22, _col26, _col32, _col33, _col57, _col79, _col89, _col92, _col93, _col97, _col103 + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((((_col0 = _col26) and (_col7 = _col57)) and (_col5 = _col89)) and (_col6 = _col97)) and ((_col92 = 4) or (_col93 = 2))) and (_col33) IN (6, 0)) and (_col32) IN (1998, 1999, 2000)) and (_col79) IN ('Rosedale', 'Bethlehem', 'Clinton', 'Clifton', 'Springfield')) (type: boolean) + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col9 (type: int), _col3 (type: int), _col6 (type: int), _col103 (type: string), _col19 (type: decimal(7,2)), _col22 (type: decimal(7,2)) + outputColumnNames: _col9, _col3, _col6, _col103, _col19, _col22 + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col19), sum(_col22) + keys: _col9 (type: int), _col3 (type: int), _col6 (type: int), _col103 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string) + sort order: ++++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string) + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1) + keys: KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: int), _col1 (type: int), _col3 (type: string), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int) + sort order: + + Map-reduce partition columns: _col1 (type: int) + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) + TableScan + alias: customer + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + value expressions: c_current_addr_sk (type: int), c_first_name (type: string), c_last_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col9, _col13, _col14 + Statistics: Num rows: 1 Data size: 405 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col9 (type: int) + sort order: + + Map-reduce partition columns: _col9 (type: int) + Statistics: Num rows: 1 Data size: 405 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: int), _col13 (type: string), _col14 (type: string) + TableScan + alias: current_addr + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ca_address_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_city (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col9 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col9, _col13, _col14, _col26, _col32 + Statistics: Num rows: 1 Data size: 445 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((_col1 = _col5) and (_col9 = _col26)) and (_col32 <> _col2)) (type: boolean) + Statistics: Num rows: 1 Data size: 445 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col14 (type: string), _col13 (type: string), _col32 (type: string), _col2 (type: string), _col0 (type: int), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 445 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int) + sort order: +++++ + Statistics: Num rows: 1 Data size: 445 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: int), VALUE._col0 (type: decimal(17,2)), VALUE._col1 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 445 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 445 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 445 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query48.q.out b/ql/src/test/results/clientpositive/perf/query48.q.out new file mode 100644 index 0000000..4d78089 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query48.q.out @@ -0,0 +1,196 @@ +Warning: Shuffle Join JOIN[15][tables = [store_sales, store, customer_demographics, customer_address]] in Stage 'Stage-3:MAPRED' is a cross product +Warning: Shuffle Join JOIN[12][tables = [store_sales, store, customer_demographics]] in Stage 'Stage-2:MAPRED' is a cross product +PREHOOK: query: explain select sum (ss_quantity) from store_sales, store, customer_demographics, customer_address, date_dim where store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_sold_date_sk = date_dim.d_date_sk and d_year = 1998 and ( ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 100.00 and 150.00 ) or ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 50.00 and 100.00 ) or ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 150.00 and 200.00 ) ) and ( ( store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ss_net_profit between 0 and 2000 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN') and ss_net_profit between 150 and 3000 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV') and ss_net_profit between 50 and 25000 ) ) +PREHOOK: type: QUERY +POSTHOOK: query: explain select sum (ss_quantity) from store_sales, store, customer_demographics, customer_address, date_dim where store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_sold_date_sk = date_dim.d_date_sk and d_year = 1998 and ( ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 100.00 and 150.00 ) or ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 50.00 and 100.00 ) or ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 150.00 and 200.00 ) ) and ( ( store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ss_net_profit between 0 and 2000 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN') and ss_net_profit between 150 and 3000 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV') and ss_net_profit between 50 and 25000 ) ) +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-0 depends on stages: Stage-5 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 16 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_store_sk is not null and ss_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 4 Data size: 1017 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_store_sk (type: int) + sort order: + + Map-reduce partition columns: ss_store_sk (type: int) + Statistics: Num rows: 4 Data size: 1017 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_cdemo_sk (type: int), ss_addr_sk (type: int), ss_quantity (type: int), ss_sales_price (type: decimal(7,2)), ss_net_profit (type: decimal(7,2)) + TableScan + alias: store + Statistics: Num rows: 63 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: s_store_sk is not null (type: boolean) + Statistics: Num rows: 32 Data size: 129 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 32 Data size: 129 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_store_sk (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col4, _col6, _col7, _col10, _col13, _col22, _col26 + Statistics: Num rows: 35 Data size: 141 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 35 Data size: 141 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col4 (type: int), _col6 (type: int), _col7 (type: int), _col10 (type: int), _col13 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col26 (type: int) + TableScan + alias: customer_demographics + Statistics: Num rows: 4 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + sort order: + Statistics: Num rows: 4 Data size: 850 Basic stats: COMPLETE Column stats: NONE + value expressions: cd_demo_sk (type: int), cd_marital_status (type: string), cd_education_status (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 + 1 + outputColumnNames: _col0, _col4, _col6, _col7, _col10, _col13, _col22, _col26, _col58, _col60, _col61 + Statistics: Num rows: 38 Data size: 155 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 38 Data size: 155 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col4 (type: int), _col6 (type: int), _col7 (type: int), _col10 (type: int), _col13 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col26 (type: int), _col58 (type: int), _col60 (type: string), _col61 (type: string) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_address_sk (type: int), ca_state (type: string), ca_country (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 + 1 + outputColumnNames: _col0, _col4, _col6, _col7, _col10, _col13, _col22, _col26, _col58, _col60, _col61, _col70, _col78, _col80 + Statistics: Num rows: 41 Data size: 170 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 41 Data size: 170 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: int), _col6 (type: int), _col7 (type: int), _col10 (type: int), _col13 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col26 (type: int), _col58 (type: int), _col60 (type: string), _col61 (type: string), _col70 (type: int), _col78 (type: string), _col80 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col4, _col6, _col7, _col10, _col13, _col22, _col26, _col58, _col60, _col61, _col70, _col78, _col80, _col86 + Statistics: Num rows: 45 Data size: 187 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((_col26 = _col7) and (_col0 = _col86)) and ((((((_col58 = _col4) and (_col60 = 'M')) and (_col61 = '4 yr Degree')) and _col13 BETWEEN 100.0 AND 150.0) or ((((_col58 = _col4) and (_col60 = 'M')) and (_col61 = '4 yr Degree')) and _col13 BETWEEN 50.0 AND 100.0)) or ((((_col58 = _col4) and (_col60 = 'M')) and (_col61 = '4 yr Degree')) and _col13 BETWEEN 150.0 AND 200.0))) and ((((((_col6 = _col70) and (_col80 = 'United States')) and (_col78) IN ('KY', 'GA', 'NM')) and _col22 BETWEEN 0 AND 2000) or ((((_col6 = _col70) and (_col80 = 'United States')) and (_col78) IN ('MT', 'OR', 'IN')) and _col22 BETWEEN 150 AND 3000)) or ((((_col6 = _col70) and (_col80 = 'United States')) and (_col78) IN ('WI', 'MO', 'WV')) and _col22 BETWEEN 50 AND 25000))) (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col10 (type: int) + outputColumnNames: _col10 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col10) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query50.q.out b/ql/src/test/results/clientpositive/perf/query50.q.out new file mode 100644 index 0000000..3468ffe --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query50.q.out @@ -0,0 +1,237 @@ +PREHOOK: query: explain select s_store_name ,s_company_id ,s_street_number ,s_street_name ,s_street_type ,s_suite_number ,s_city ,s_county ,s_state ,s_zip ,sum(case when (sr_returned_date_sk - ss_sold_date_sk <= 30 ) then 1 else 0 end) as 30days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 30) and (sr_returned_date_sk - ss_sold_date_sk <= 60) then 1 else 0 end ) as 3160days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 60) and (sr_returned_date_sk - ss_sold_date_sk <= 90) then 1 else 0 end) as 6190days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 90) and (sr_returned_date_sk - ss_sold_date_sk <= 120) then 1 else 0 end) as 91120days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 120) then 1 else 0 end) as 120days from store_sales ,store_returns ,store ,date_dim d1 ,date_dim d2 where d2.d_year = 2000 and d2.d_moy = 9 and store_sales.ss_ticket_number = store_returns.sr_ticket_number and store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_sold_date_sk = d1.d_date_sk and sr_returned_date_sk = d2.d_date_sk and store_sales.ss_customer_sk = store_returns.sr_customer_sk and store_sales.ss_store_sk = store.s_store_sk group by s_store_name ,s_company_id ,s_street_number ,s_street_name ,s_street_type ,s_suite_number ,s_city ,s_county ,s_state ,s_zip order by s_store_name ,s_company_id ,s_street_number ,s_street_name ,s_street_type ,s_suite_number ,s_city ,s_county ,s_state ,s_zip limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select s_store_name ,s_company_id ,s_street_number ,s_street_name ,s_street_type ,s_suite_number ,s_city ,s_county ,s_state ,s_zip ,sum(case when (sr_returned_date_sk - ss_sold_date_sk <= 30 ) then 1 else 0 end) as 30days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 30) and (sr_returned_date_sk - ss_sold_date_sk <= 60) then 1 else 0 end ) as 3160days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 60) and (sr_returned_date_sk - ss_sold_date_sk <= 90) then 1 else 0 end) as 6190days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 90) and (sr_returned_date_sk - ss_sold_date_sk <= 120) then 1 else 0 end) as 91120days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 120) then 1 else 0 end) as 120days from store_sales ,store_returns ,store ,date_dim d1 ,date_dim d2 where d2.d_year = 2000 and d2.d_moy = 9 and store_sales.ss_ticket_number = store_returns.sr_ticket_number and store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_sold_date_sk = d1.d_date_sk and sr_returned_date_sk = d2.d_date_sk and store_sales.ss_customer_sk = store_returns.sr_customer_sk and store_sales.ss_store_sk = store.s_store_sk group by s_store_name ,s_company_id ,s_street_number ,s_street_name ,s_street_type ,s_suite_number ,s_city ,s_county ,s_state ,s_zip order by s_store_name ,s_company_id ,s_street_number ,s_street_name ,s_street_type ,s_suite_number ,s_city ,s_county ,s_state ,s_zip limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 203 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((ss_ticket_number is not null and ss_item_sk is not null) and ss_customer_sk is not null) and ss_store_sk is not null) and ss_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 7 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_ticket_number (type: int), ss_item_sk (type: int), ss_customer_sk (type: int) + sort order: +++ + Map-reduce partition columns: ss_ticket_number (type: int), ss_item_sk (type: int), ss_customer_sk (type: int) + Statistics: Num rows: 7 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_store_sk (type: int) + TableScan + alias: store_returns + Statistics: Num rows: 21 Data size: 338 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((sr_ticket_number is not null and sr_item_sk is not null) and sr_customer_sk is not null) and sr_returned_date_sk is not null) (type: boolean) + Statistics: Num rows: 2 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: sr_ticket_number (type: int), sr_item_sk (type: int), sr_customer_sk (type: int) + sort order: +++ + Map-reduce partition columns: sr_ticket_number (type: int), sr_item_sk (type: int), sr_customer_sk (type: int) + Statistics: Num rows: 2 Data size: 32 Basic stats: COMPLETE Column stats: NONE + value expressions: sr_returned_date_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_ticket_number (type: int), ss_item_sk (type: int), ss_customer_sk (type: int) + 1 sr_ticket_number (type: int), sr_item_sk (type: int), sr_customer_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col26, _col28, _col29, _col35 + Statistics: Num rows: 7 Data size: 154 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 7 Data size: 154 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col9 (type: int), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int) + TableScan + alias: store + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: s_store_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + value expressions: s_store_name (type: string), s_company_id (type: int), s_street_number (type: string), s_street_name (type: string), s_street_type (type: string), s_suite_number (type: string), s_city (type: string), s_county (type: string), s_state (type: string), s_zip (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col26, _col28, _col29, _col35, _col49, _col54, _col65, _col67, _col68, _col69, _col70, _col71, _col72, _col73, _col74 + Statistics: Num rows: 7 Data size: 169 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 7 Data size: 169 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col26 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col49 (type: int), _col54 (type: string), _col65 (type: int), _col67 (type: string), _col68 (type: string), _col69 (type: string), _col70 (type: string), _col71 (type: string), _col72 (type: string), _col73 (type: string), _col74 (type: string) + TableScan + alias: d1 + Statistics: Num rows: 35 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: d_date_sk is not null (type: boolean) + Statistics: Num rows: 18 Data size: 72 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 18 Data size: 72 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col26, _col28, _col29, _col35, _col49, _col54, _col65, _col67, _col68, _col69, _col70, _col71, _col72, _col73, _col74, _col81 + Statistics: Num rows: 19 Data size: 79 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col26 (type: int) + sort order: + + Map-reduce partition columns: _col26 (type: int) + Statistics: Num rows: 19 Data size: 79 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col28 (type: int), _col29 (type: int), _col35 (type: int), _col49 (type: int), _col54 (type: string), _col65 (type: int), _col67 (type: string), _col68 (type: string), _col69 (type: string), _col70 (type: string), _col71 (type: string), _col72 (type: string), _col73 (type: string), _col74 (type: string), _col81 (type: int) + TableScan + alias: d2 + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_year = 2000)) and (d_moy = 9)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col26 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col3, _col7, _col9, _col26, _col28, _col29, _col35, _col49, _col54, _col65, _col67, _col68, _col69, _col70, _col71, _col72, _col73, _col74, _col81, _col112 + Statistics: Num rows: 20 Data size: 86 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((_col9 = _col35) and (_col2 = _col28)) and (_col0 = _col81)) and (_col26 = _col112)) and (_col3 = _col29)) and (_col7 = _col49)) (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col54 (type: string), _col65 (type: int), _col67 (type: string), _col68 (type: string), _col69 (type: string), _col70 (type: string), _col71 (type: string), _col72 (type: string), _col73 (type: string), _col74 (type: string), _col26 (type: int), _col0 (type: int) + outputColumnNames: _col54, _col65, _col67, _col68, _col69, _col70, _col71, _col72, _col73, _col74, _col26, _col0 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(CASE WHEN (((_col26 - _col0) <= 30)) THEN (1) ELSE (0) END), sum(CASE WHEN ((((_col26 - _col0) > 30) and ((_col26 - _col0) <= 60))) THEN (1) ELSE (0) END), sum(CASE WHEN ((((_col26 - _col0) > 60) and ((_col26 - _col0) <= 90))) THEN (1) ELSE (0) END), sum(CASE WHEN ((((_col26 - _col0) > 90) and ((_col26 - _col0) <= 120))) THEN (1) ELSE (0) END), sum(CASE WHEN (((_col26 - _col0) > 120)) THEN (1) ELSE (0) END) + keys: _col54 (type: string), _col65 (type: int), _col67 (type: string), _col68 (type: string), _col69 (type: string), _col70 (type: string), _col71 (type: string), _col72 (type: string), _col73 (type: string), _col74 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string) + sort order: ++++++++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + value expressions: _col10 (type: bigint), _col11 (type: bigint), _col12 (type: bigint), _col13 (type: bigint), _col14 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2), sum(VALUE._col3), sum(VALUE._col4) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string), KEY._col5 (type: string), KEY._col6 (type: string), KEY._col7 (type: string), KEY._col8 (type: string), KEY._col9 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string) + sort order: ++++++++++ + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + value expressions: _col10 (type: bigint), _col11 (type: bigint), _col12 (type: bigint), _col13 (type: bigint), _col14 (type: bigint) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: int), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: string), KEY.reducesinkkey5 (type: string), KEY.reducesinkkey6 (type: string), KEY.reducesinkkey7 (type: string), KEY.reducesinkkey8 (type: string), KEY.reducesinkkey9 (type: string), VALUE._col0 (type: bigint), VALUE._col1 (type: bigint), VALUE._col2 (type: bigint), VALUE._col3 (type: bigint), VALUE._col4 (type: bigint) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query52.q.out b/ql/src/test/results/clientpositive/perf/query52.q.out new file mode 100644 index 0000000..137eae2 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query52.q.out @@ -0,0 +1,164 @@ +PREHOOK: query: explain select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) ext_price from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=1998 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,ext_price desc ,brand_id limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) ext_price from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=1998 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,ext_price desc ,brand_id limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-0 depends on stages: Stage-4 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: dt + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_moy = 12)) and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + TableScan + alias: store_sales + Statistics: Num rows: 33 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_sold_date_sk is not null and ss_item_sk is not null) (type: boolean) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_item_sk (type: int), ss_ext_sales_price (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 d_date_sk (type: int) + 1 ss_sold_date_sk (type: int) + outputColumnNames: _col0, _col31, _col33, _col46 + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col33 (type: int) + sort order: + + Map-reduce partition columns: _col33 (type: int) + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col31 (type: int), _col46 (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and (i_manager_id = 1)) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_brand_id (type: int), i_brand (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col33 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col31, _col33, _col46, _col57, _col64, _col65 + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col31) and (_col33 = _col57)) (type: boolean) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: 1998 (type: int), _col65 (type: string), _col64 (type: int), _col46 (type: decimal(7,2)) + outputColumnNames: _col6, _col65, _col64, _col46 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col46) + keys: _col6 (type: int), _col65 (type: string), _col64 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: string), _col2 (type: int) + sort order: +++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: string), _col2 (type: int) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: int), KEY._col1 (type: string), KEY._col2 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: int), _col2 (type: int), _col1 (type: string), _col3 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col3 (type: decimal(17,2)), _col1 (type: int) + sort order: +-+ + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: string) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey2 (type: int), VALUE._col0 (type: string), KEY.reducesinkkey1 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query54.q.out b/ql/src/test/results/clientpositive/perf/query54.q.out new file mode 100644 index 0000000..0ec79cc --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query54.q.out @@ -0,0 +1,451 @@ +PREHOOK: query: explain with my_customers as ( select c_customer_sk , c_current_addr_sk from ( select cs_sold_date_sk sold_date_sk, cs_bill_customer_sk customer_sk, cs_item_sk item_sk from catalog_sales union all select ws_sold_date_sk sold_date_sk, ws_bill_customer_sk customer_sk, ws_item_sk item_sk from web_sales ) cs_or_ws_sales, item, date_dim, customer where sold_date_sk = d_date_sk and item_sk = i_item_sk and i_category = 'Jewelry' and i_class = 'football' and c_customer_sk = cs_or_ws_sales.customer_sk and d_moy = 3 and d_year = 2000 group by c_customer_sk , c_current_addr_sk ) , my_revenue as ( select c_customer_sk, sum(ss_ext_sales_price) as revenue from my_customers, store_sales, customer_address, store, date_dim where c_current_addr_sk = ca_address_sk and ca_county = s_county and ca_state = s_state and ss_sold_date_sk = d_date_sk and c_customer_sk = ss_customer_sk and d_month_seq between (1203) and (1205) group by c_customer_sk ) , segments as (select cast((revenue/50) as int) as segment from my_revenue ) select segment, count(*) as num_customers, segment*50 as segment_base from segments group by segment order by segment, num_customers limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain with my_customers as ( select c_customer_sk , c_current_addr_sk from ( select cs_sold_date_sk sold_date_sk, cs_bill_customer_sk customer_sk, cs_item_sk item_sk from catalog_sales union all select ws_sold_date_sk sold_date_sk, ws_bill_customer_sk customer_sk, ws_item_sk item_sk from web_sales ) cs_or_ws_sales, item, date_dim, customer where sold_date_sk = d_date_sk and item_sk = i_item_sk and i_category = 'Jewelry' and i_class = 'football' and c_customer_sk = cs_or_ws_sales.customer_sk and d_moy = 3 and d_year = 2000 group by c_customer_sk , c_current_addr_sk ) , my_revenue as ( select c_customer_sk, sum(ss_ext_sales_price) as revenue from my_customers, store_sales, customer_address, store, date_dim where c_current_addr_sk = ca_address_sk and ca_county = s_county and ca_state = s_state and ss_sold_date_sk = d_date_sk and c_customer_sk = ss_customer_sk and d_month_seq between (1203) and (1205) group by c_customer_sk ) , segments as (select cast((revenue/50) as int) as segment from my_revenue ) select segment, count(*) as num_customers, segment*50 as segment_base from segments group by segment order by segment, num_customers limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-8 depends on stages: Stage-7 + Stage-9 depends on stages: Stage-8 + Stage-10 depends on stages: Stage-9 + Stage-11 depends on stages: Stage-10 + Stage-0 depends on stages: Stage-11 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 260 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((cs_item_sk is not null and cs_sold_date_sk is not null) and cs_bill_customer_sk is not null) (type: boolean) + Statistics: Num rows: 33 Data size: 396 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: cs_sold_date_sk (type: int), cs_bill_customer_sk (type: int), cs_item_sk (type: int) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 33 Data size: 396 Basic stats: COMPLETE Column stats: NONE + Union + Statistics: Num rows: 50 Data size: 600 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 50 Data size: 600 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: int) + TableScan + alias: web_sales + Statistics: Num rows: 136 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((ws_item_sk is not null and ws_sold_date_sk is not null) and ws_bill_customer_sk is not null) (type: boolean) + Statistics: Num rows: 17 Data size: 204 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: ws_sold_date_sk (type: int), ws_bill_customer_sk (type: int), ws_item_sk (type: int) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 17 Data size: 204 Basic stats: COMPLETE Column stats: NONE + Union + Statistics: Num rows: 50 Data size: 600 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 50 Data size: 600 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: int) + TableScan + alias: item + Statistics: Num rows: 10 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((i_item_sk is not null and (i_category = 'Jewelry')) and (i_class = 'football')) (type: boolean) + Statistics: Num rows: 1 Data size: 19 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 19 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 55 Data size: 660 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 55 Data size: 660 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_moy = 3)) and (d_year = 2000)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col28 + Statistics: Num rows: 60 Data size: 726 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int) + sort order: + + Map-reduce partition columns: _col1 (type: int) + Statistics: Num rows: 60 Data size: 726 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col3 (type: int), _col28 (type: int) + TableScan + alias: customer + Statistics: Num rows: 17 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean) + Statistics: Num rows: 5 Data size: 40 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 5 Data size: 40 Basic stats: COMPLETE Column stats: NONE + value expressions: c_current_addr_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col28, _col59, _col63 + Statistics: Num rows: 66 Data size: 798 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((_col0 = _col28) and (_col2 = _col3)) and (_col59 = _col1)) (type: boolean) + Statistics: Num rows: 8 Data size: 96 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col59 (type: int), _col63 (type: int) + outputColumnNames: _col59, _col63 + Statistics: Num rows: 8 Data size: 96 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col59 (type: int), _col63 (type: int) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 8 Data size: 96 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 8 Data size: 96 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: int), KEY._col1 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1 + Statistics: Num rows: 4 Data size: 48 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 4 Data size: 48 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int) + TableScan + alias: store_sales + Statistics: Num rows: 33 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_customer_sk is not null and ss_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_customer_sk (type: int) + sort order: + + Map-reduce partition columns: ss_customer_sk (type: int) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_ext_sales_price (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 ss_customer_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col5, _col17 + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int) + sort order: + + Map-reduce partition columns: _col1 (type: int) + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col5 (type: int), _col17 (type: decimal(7,2)) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((ca_address_sk is not null and ca_county is not null) and ca_state is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_county (type: string), ca_state (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col5, _col17, _col28, _col35, _col36 + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col35 (type: string), _col36 (type: string) + sort order: ++ + Map-reduce partition columns: _col35 (type: string), _col36 (type: string) + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col5 (type: int), _col17 (type: decimal(7,2)), _col28 (type: int) + TableScan + alias: store + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (s_county is not null and s_state is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_county (type: string), s_state (type: string) + sort order: ++ + Map-reduce partition columns: s_county (type: string), s_state (type: string) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col35 (type: string), _col36 (type: string) + 1 s_county (type: string), s_state (type: string) + outputColumnNames: _col0, _col1, _col2, _col5, _col17, _col28, _col35, _col36, _col67, _col68 + Statistics: Num rows: 9 Data size: 1477 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 9 Data size: 1477 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: int), _col5 (type: int), _col17 (type: decimal(7,2)), _col28 (type: int), _col35 (type: string), _col36 (type: string), _col67 (type: string), _col68 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_month_seq BETWEEN 1203 AND 1205) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + value expressions: d_month_seq (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col5, _col17, _col28, _col35, _col36, _col67, _col68, _col76, _col79 + Statistics: Num rows: 9 Data size: 1624 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((_col1 = _col28) and (_col35 = _col67)) and (_col36 = _col68)) and (_col2 = _col76)) and (_col0 = _col5)) and _col79 BETWEEN 1203 AND 1205) (type: boolean) + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: int), _col17 (type: decimal(7,2)) + outputColumnNames: _col0, _col17 + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col17) + keys: _col0 (type: int) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-9 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: UDFToInteger((_col1 / 50)) (type: int) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count() + keys: _col0 (type: int) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-10 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0) + keys: KEY._col0 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: int), _col1 (type: bigint), (_col0 * 50) (type: int) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-11 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: bigint) + sort order: ++ + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: bigint), VALUE._col0 (type: int) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 180 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query55.q.out b/ql/src/test/results/clientpositive/perf/query55.q.out new file mode 100644 index 0000000..9f3eae6 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query55.q.out @@ -0,0 +1,164 @@ +PREHOOK: query: explain select i_brand_id brand_id, i_brand brand, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and i_manager_id=36 and d_moy=12 and d_year=2001 group by i_brand, i_brand_id order by ext_price desc, i_brand_id limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_brand_id brand_id, i_brand brand, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and i_manager_id=36 and d_moy=12 and d_year=2001 group by i_brand, i_brand_id order by ext_price desc, i_brand_id limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-0 depends on stages: Stage-4 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_moy = 12)) and (d_year = 2001)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + TableScan + alias: store_sales + Statistics: Num rows: 33 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_sold_date_sk is not null and ss_item_sk is not null) (type: boolean) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_item_sk (type: int), ss_ext_sales_price (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 d_date_sk (type: int) + 1 ss_sold_date_sk (type: int) + outputColumnNames: _col0, _col31, _col33, _col46 + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col33 (type: int) + sort order: + + Map-reduce partition columns: _col33 (type: int) + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col31 (type: int), _col46 (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and (i_manager_id = 36)) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_brand_id (type: int), i_brand (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col33 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col31, _col33, _col46, _col57, _col64, _col65 + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col31) and (_col33 = _col57)) (type: boolean) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col65 (type: string), _col64 (type: int), _col46 (type: decimal(7,2)) + outputColumnNames: _col65, _col64, _col46 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col46) + keys: _col65 (type: string), _col64 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int) + Statistics: Num rows: 2 Data size: 298 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: int), _col0 (type: string), _col2 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: decimal(17,2)), _col0 (type: int) + sort order: -+ + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey1 (type: int), VALUE._col0 (type: string), KEY.reducesinkkey0 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query64.q.out b/ql/src/test/results/clientpositive/perf/query64.q.out new file mode 100644 index 0000000..7196f24 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query64.q.out @@ -0,0 +1,1590 @@ +PREHOOK: query: explain select cs1.product_name ,cs1.store_name ,cs1.store_zip ,cs1.b_street_number ,cs1.b_streen_name ,cs1.b_city ,cs1.b_zip ,cs1.c_street_number ,cs1.c_street_name ,cs1.c_city ,cs1.c_zip ,cs1.syear ,cs1.cnt ,cs1.s1 ,cs1.s2 ,cs1.s3 ,cs2.s1 ,cs2.s2 ,cs2.s3 ,cs2.syear ,cs2.cnt from (select i_product_name as product_name ,i_item_sk as item_sk ,s_store_name as store_name ,s_zip as store_zip ,ad1.ca_street_number as b_street_number ,ad1.ca_street_name as b_streen_name ,ad1.ca_city as b_city ,ad1.ca_zip as b_zip ,ad2.ca_street_number as c_street_number ,ad2.ca_street_name as c_street_name ,ad2.ca_city as c_city ,ad2.ca_zip as c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year as s2year ,count(*) as cnt ,sum(ss_wholesale_cost) as s1 ,sum(ss_list_price) as s2 ,sum(ss_coupon_amt) as s3 FROM store_sales JOIN store_returns ON store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk JOIN date_dim d1 ON store_sales.ss_sold_date_sk = d1.d_date_sk JOIN date_dim d2 ON customer.c_first_sales_date_sk = d2.d_date_sk JOIN date_dim d3 ON customer.c_first_shipto_date_sk = d3.d_date_sk JOIN store ON store_sales.ss_store_sk = store.s_store_sk JOIN customer_demographics cd1 ON store_sales.ss_cdemo_sk= cd1.cd_demo_sk JOIN customer_demographics cd2 ON customer.c_current_cdemo_sk = cd2.cd_demo_sk JOIN promotion ON store_sales.ss_promo_sk = promotion.p_promo_sk JOIN household_demographics hd1 ON store_sales.ss_hdemo_sk = hd1.hd_demo_sk JOIN household_demographics hd2 ON customer.c_current_hdemo_sk = hd2.hd_demo_sk JOIN customer_address ad1 ON store_sales.ss_addr_sk = ad1.ca_address_sk JOIN customer_address ad2 ON customer.c_current_addr_sk = ad2.ca_address_sk JOIN income_band ib1 ON hd1.hd_income_band_sk = ib1.ib_income_band_sk JOIN income_band ib2 ON hd2.hd_income_band_sk = ib2.ib_income_band_sk JOIN item ON store_sales.ss_item_sk = item.i_item_sk JOIN (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from catalog_sales JOIN catalog_returns ON catalog_sales.cs_item_sk = catalog_returns.cr_item_sk and catalog_sales.cs_order_number = catalog_returns.cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)) cs_ui ON store_sales.ss_item_sk = cs_ui.cs_item_sk WHERE cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('maroon','burnished','dim','steel','navajo','chocolate') and i_current_price between 35 and 35 + 10 and i_current_price between 35 + 1 and 35 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) cs1 JOIN (select i_product_name as product_name ,i_item_sk as item_sk ,s_store_name as store_name ,s_zip as store_zip ,ad1.ca_street_number as b_street_number ,ad1.ca_street_name as b_streen_name ,ad1.ca_city as b_city ,ad1.ca_zip as b_zip ,ad2.ca_street_number as c_street_number ,ad2.ca_street_name as c_street_name ,ad2.ca_city as c_city ,ad2.ca_zip as c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year as s2year ,count(*) as cnt ,sum(ss_wholesale_cost) as s1 ,sum(ss_list_price) as s2 ,sum(ss_coupon_amt) as s3 FROM store_sales JOIN store_returns ON store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk JOIN date_dim d1 ON store_sales.ss_sold_date_sk = d1.d_date_sk JOIN date_dim d2 ON customer.c_first_sales_date_sk = d2.d_date_sk JOIN date_dim d3 ON customer.c_first_shipto_date_sk = d3.d_date_sk JOIN store ON store_sales.ss_store_sk = store.s_store_sk JOIN customer_demographics cd1 ON store_sales.ss_cdemo_sk= cd1.cd_demo_sk JOIN customer_demographics cd2 ON customer.c_current_cdemo_sk = cd2.cd_demo_sk JOIN promotion ON store_sales.ss_promo_sk = promotion.p_promo_sk JOIN household_demographics hd1 ON store_sales.ss_hdemo_sk = hd1.hd_demo_sk JOIN household_demographics hd2 ON customer.c_current_hdemo_sk = hd2.hd_demo_sk JOIN customer_address ad1 ON store_sales.ss_addr_sk = ad1.ca_address_sk JOIN customer_address ad2 ON customer.c_current_addr_sk = ad2.ca_address_sk JOIN income_band ib1 ON hd1.hd_income_band_sk = ib1.ib_income_band_sk JOIN income_band ib2 ON hd2.hd_income_band_sk = ib2.ib_income_band_sk JOIN item ON store_sales.ss_item_sk = item.i_item_sk JOIN (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from catalog_sales JOIN catalog_returns ON catalog_sales.cs_item_sk = catalog_returns.cr_item_sk and catalog_sales.cs_order_number = catalog_returns.cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)) cs_ui ON store_sales.ss_item_sk = cs_ui.cs_item_sk WHERE cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('maroon','burnished','dim','steel','navajo','chocolate') and i_current_price between 35 and 35 + 10 and i_current_price between 35 + 1 and 35 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) cs2 ON cs1.item_sk=cs2.item_sk where cs1.syear = 2000 and cs2.syear = 2000 + 1 and cs2.cnt <= cs1.cnt and cs1.store_name = cs2.store_name and cs1.store_zip = cs2.store_zip order by cs1.product_name ,cs1.store_name ,cs2.cnt +PREHOOK: type: QUERY +POSTHOOK: query: explain select cs1.product_name ,cs1.store_name ,cs1.store_zip ,cs1.b_street_number ,cs1.b_streen_name ,cs1.b_city ,cs1.b_zip ,cs1.c_street_number ,cs1.c_street_name ,cs1.c_city ,cs1.c_zip ,cs1.syear ,cs1.cnt ,cs1.s1 ,cs1.s2 ,cs1.s3 ,cs2.s1 ,cs2.s2 ,cs2.s3 ,cs2.syear ,cs2.cnt from (select i_product_name as product_name ,i_item_sk as item_sk ,s_store_name as store_name ,s_zip as store_zip ,ad1.ca_street_number as b_street_number ,ad1.ca_street_name as b_streen_name ,ad1.ca_city as b_city ,ad1.ca_zip as b_zip ,ad2.ca_street_number as c_street_number ,ad2.ca_street_name as c_street_name ,ad2.ca_city as c_city ,ad2.ca_zip as c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year as s2year ,count(*) as cnt ,sum(ss_wholesale_cost) as s1 ,sum(ss_list_price) as s2 ,sum(ss_coupon_amt) as s3 FROM store_sales JOIN store_returns ON store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk JOIN date_dim d1 ON store_sales.ss_sold_date_sk = d1.d_date_sk JOIN date_dim d2 ON customer.c_first_sales_date_sk = d2.d_date_sk JOIN date_dim d3 ON customer.c_first_shipto_date_sk = d3.d_date_sk JOIN store ON store_sales.ss_store_sk = store.s_store_sk JOIN customer_demographics cd1 ON store_sales.ss_cdemo_sk= cd1.cd_demo_sk JOIN customer_demographics cd2 ON customer.c_current_cdemo_sk = cd2.cd_demo_sk JOIN promotion ON store_sales.ss_promo_sk = promotion.p_promo_sk JOIN household_demographics hd1 ON store_sales.ss_hdemo_sk = hd1.hd_demo_sk JOIN household_demographics hd2 ON customer.c_current_hdemo_sk = hd2.hd_demo_sk JOIN customer_address ad1 ON store_sales.ss_addr_sk = ad1.ca_address_sk JOIN customer_address ad2 ON customer.c_current_addr_sk = ad2.ca_address_sk JOIN income_band ib1 ON hd1.hd_income_band_sk = ib1.ib_income_band_sk JOIN income_band ib2 ON hd2.hd_income_band_sk = ib2.ib_income_band_sk JOIN item ON store_sales.ss_item_sk = item.i_item_sk JOIN (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from catalog_sales JOIN catalog_returns ON catalog_sales.cs_item_sk = catalog_returns.cr_item_sk and catalog_sales.cs_order_number = catalog_returns.cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)) cs_ui ON store_sales.ss_item_sk = cs_ui.cs_item_sk WHERE cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('maroon','burnished','dim','steel','navajo','chocolate') and i_current_price between 35 and 35 + 10 and i_current_price between 35 + 1 and 35 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) cs1 JOIN (select i_product_name as product_name ,i_item_sk as item_sk ,s_store_name as store_name ,s_zip as store_zip ,ad1.ca_street_number as b_street_number ,ad1.ca_street_name as b_streen_name ,ad1.ca_city as b_city ,ad1.ca_zip as b_zip ,ad2.ca_street_number as c_street_number ,ad2.ca_street_name as c_street_name ,ad2.ca_city as c_city ,ad2.ca_zip as c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year as s2year ,count(*) as cnt ,sum(ss_wholesale_cost) as s1 ,sum(ss_list_price) as s2 ,sum(ss_coupon_amt) as s3 FROM store_sales JOIN store_returns ON store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk JOIN date_dim d1 ON store_sales.ss_sold_date_sk = d1.d_date_sk JOIN date_dim d2 ON customer.c_first_sales_date_sk = d2.d_date_sk JOIN date_dim d3 ON customer.c_first_shipto_date_sk = d3.d_date_sk JOIN store ON store_sales.ss_store_sk = store.s_store_sk JOIN customer_demographics cd1 ON store_sales.ss_cdemo_sk= cd1.cd_demo_sk JOIN customer_demographics cd2 ON customer.c_current_cdemo_sk = cd2.cd_demo_sk JOIN promotion ON store_sales.ss_promo_sk = promotion.p_promo_sk JOIN household_demographics hd1 ON store_sales.ss_hdemo_sk = hd1.hd_demo_sk JOIN household_demographics hd2 ON customer.c_current_hdemo_sk = hd2.hd_demo_sk JOIN customer_address ad1 ON store_sales.ss_addr_sk = ad1.ca_address_sk JOIN customer_address ad2 ON customer.c_current_addr_sk = ad2.ca_address_sk JOIN income_band ib1 ON hd1.hd_income_band_sk = ib1.ib_income_band_sk JOIN income_band ib2 ON hd2.hd_income_band_sk = ib2.ib_income_band_sk JOIN item ON store_sales.ss_item_sk = item.i_item_sk JOIN (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from catalog_sales JOIN catalog_returns ON catalog_sales.cs_item_sk = catalog_returns.cr_item_sk and catalog_sales.cs_order_number = catalog_returns.cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)) cs_ui ON store_sales.ss_item_sk = cs_ui.cs_item_sk WHERE cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('maroon','burnished','dim','steel','navajo','chocolate') and i_current_price between 35 and 35 + 10 and i_current_price between 35 + 1 and 35 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) cs2 ON cs1.item_sk=cs2.item_sk where cs1.syear = 2000 and cs2.syear = 2000 + 1 and cs2.cnt <= cs1.cnt and cs1.store_name = cs2.store_name and cs1.store_zip = cs2.store_zip order by cs1.product_name ,cs1.store_name ,cs2.cnt +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2, Stage-22 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4, Stage-42 + Stage-6 depends on stages: Stage-5 + Stage-8 is a root stage + Stage-9 depends on stages: Stage-8 + Stage-10 depends on stages: Stage-9 + Stage-11 depends on stages: Stage-10 + Stage-12 depends on stages: Stage-11 + Stage-13 depends on stages: Stage-12 + Stage-14 depends on stages: Stage-13 + Stage-15 depends on stages: Stage-14 + Stage-16 depends on stages: Stage-15 + Stage-17 depends on stages: Stage-16 + Stage-18 depends on stages: Stage-17 + Stage-19 depends on stages: Stage-18 + Stage-20 depends on stages: Stage-19 + Stage-21 depends on stages: Stage-20 + Stage-22 depends on stages: Stage-21 + Stage-39 is a root stage + Stage-40 depends on stages: Stage-39 + Stage-41 depends on stages: Stage-40, Stage-58 + Stage-42 depends on stages: Stage-41 + Stage-44 is a root stage + Stage-45 depends on stages: Stage-44 + Stage-46 depends on stages: Stage-45 + Stage-47 depends on stages: Stage-46 + Stage-48 depends on stages: Stage-47 + Stage-49 depends on stages: Stage-48 + Stage-50 depends on stages: Stage-49 + Stage-51 depends on stages: Stage-50 + Stage-52 depends on stages: Stage-51 + Stage-53 depends on stages: Stage-52 + Stage-54 depends on stages: Stage-53 + Stage-55 depends on stages: Stage-54 + Stage-56 depends on stages: Stage-55 + Stage-57 depends on stages: Stage-56 + Stage-58 depends on stages: Stage-57 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 26 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (cs_item_sk is not null and cs_order_number is not null) (type: boolean) + Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_item_sk (type: int), cs_order_number (type: int) + sort order: ++ + Map-reduce partition columns: cs_item_sk (type: int), cs_order_number (type: int) + Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_ext_list_price (type: decimal(7,2)) + TableScan + alias: catalog_returns + Statistics: Num rows: 1 Data size: 288 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (cr_item_sk is not null and cr_order_number is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 288 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cr_item_sk (type: int), cr_order_number (type: int) + sort order: ++ + Map-reduce partition columns: cr_item_sk (type: int), cr_order_number (type: int) + Statistics: Num rows: 1 Data size: 288 Basic stats: COMPLETE Column stats: NONE + value expressions: cr_refunded_cash (type: decimal(7,2)), cr_reversed_charge (type: decimal(7,2)), cr_store_credit (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_item_sk (type: int), cs_order_number (type: int) + 1 cr_item_sk (type: int), cr_order_number (type: int) + outputColumnNames: _col15, _col25, _col60, _col61, _col62 + Statistics: Num rows: 7 Data size: 924 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col25), sum(((_col60 + _col61) + _col62)) + keys: _col15 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 7 Data size: 924 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 7 Data size: 924 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: decimal(17,2)), _col2 (type: decimal(19,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1) + keys: KEY._col0 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 3 Data size: 396 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (_col1 > (2 * _col2)) (type: boolean) + Statistics: Num rows: 1 Data size: 132 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: int) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 132 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 1 Data size: 132 Basic stats: COMPLETE Column stats: NONE + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 33 Data size: 353 Basic stats: COMPLETE Column stats: NONE + value expressions: _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string), _col259 (type: string), _col260 (type: string), _col263 (type: string), _col266 (type: string), _col275 (type: string), _col276 (type: string), _col279 (type: string), _col282 (type: string) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((i_item_sk is not null and (i_color) IN ('maroon', 'burnished', 'dim', 'steel', 'navajo', 'chocolate')) and i_current_price BETWEEN 35 AND 45) and i_current_price BETWEEN 36 AND 50) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_current_price (type: decimal(7,2)), i_color (type: string), i_product_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + Inner Join 0 to 2 + keys: + 0 _col2 (type: int) + 1 i_item_sk (type: int) + 2 _col0 (type: int) + outputColumnNames: _col11, _col12, _col19, _col107, _col138, _col168, _col188, _col197, _col209, _col259, _col260, _col263, _col266, _col275, _col276, _col279, _col282, _col301, _col306, _col318, _col322 + Statistics: Num rows: 72 Data size: 776 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((_col197 <> _col209) and (_col318) IN ('maroon', 'burnished', 'dim', 'steel', 'navajo', 'chocolate')) and _col306 BETWEEN 35 AND 45) and _col306 BETWEEN 36 AND 50) (type: boolean) + Statistics: Num rows: 9 Data size: 97 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col322 (type: string), _col301 (type: int), _col168 (type: string), _col188 (type: string), _col259 (type: string), _col260 (type: string), _col263 (type: string), _col266 (type: string), _col275 (type: string), _col276 (type: string), _col279 (type: string), _col282 (type: string), 2000 (type: int), _col107 (type: int), _col138 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)) + outputColumnNames: _col322, _col301, _col168, _col188, _col259, _col260, _col263, _col266, _col275, _col276, _col279, _col282, _col76, _col107, _col138, _col11, _col12, _col19 + Statistics: Num rows: 9 Data size: 97 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count(), sum(_col11), sum(_col12), sum(_col19) + keys: _col322 (type: string), _col301 (type: int), _col168 (type: string), _col188 (type: string), _col259 (type: string), _col260 (type: string), _col263 (type: string), _col266 (type: string), _col275 (type: string), _col276 (type: string), _col279 (type: string), _col282 (type: string), _col76 (type: int), _col107 (type: int), _col138 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18 + Statistics: Num rows: 9 Data size: 97 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), _col11 (type: string), _col12 (type: int), _col13 (type: int), _col14 (type: int) + sort order: +++++++++++++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), _col11 (type: string), _col12 (type: int), _col13 (type: int), _col14 (type: int) + Statistics: Num rows: 9 Data size: 97 Basic stats: COMPLETE Column stats: NONE + value expressions: _col15 (type: bigint), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2), sum(VALUE._col3) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string), KEY._col5 (type: string), KEY._col6 (type: string), KEY._col7 (type: string), KEY._col8 (type: string), KEY._col9 (type: string), KEY._col10 (type: string), KEY._col11 (type: string), KEY._col12 (type: int), KEY._col13 (type: int), KEY._col14 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18 + Statistics: Num rows: 4 Data size: 43 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: string), _col1 (type: int), _col10 (type: string), _col11 (type: string), _col12 (type: int), _col15 (type: bigint), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2)), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string) + outputColumnNames: _col0, _col1, _col10, _col11, _col12, _col15, _col16, _col17, _col18, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 + Statistics: Num rows: 4 Data size: 43 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int), _col2 (type: string), _col3 (type: string) + sort order: +++ + Map-reduce partition columns: _col1 (type: int), _col2 (type: string), _col3 (type: string) + Statistics: Num rows: 4 Data size: 43 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), _col11 (type: string), _col12 (type: int), _col15 (type: bigint), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2)) + TableScan + Reduce Output Operator + key expressions: _col1 (type: int), _col2 (type: string), _col3 (type: string) + sort order: +++ + Map-reduce partition columns: _col1 (type: int), _col2 (type: string), _col3 (type: string) + Statistics: Num rows: 4 Data size: 43 Basic stats: COMPLETE Column stats: NONE + value expressions: _col12 (type: int), _col15 (type: bigint), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int), _col2 (type: string), _col3 (type: string) + 1 _col1 (type: int), _col2 (type: string), _col3 (type: string) + outputColumnNames: _col0, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col15, _col16, _col17, _col18, _col21, _col22, _col31, _col34, _col35, _col36, _col37 + Statistics: Num rows: 4 Data size: 47 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((_col12 = 2000) and (_col31 = 2001)) and (_col34 <= _col15)) and (_col2 = _col21)) and (_col3 = _col22)) (type: boolean) + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: string), _col2 (type: string), _col11 (type: string), _col15 (type: bigint), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2)), _col35 (type: decimal(17,2)), _col36 (type: decimal(17,2)), _col37 (type: decimal(17,2)), _col3 (type: string), _col34 (type: bigint), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string) + outputColumnNames: _col0, _col1, _col10, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col2, _col20, _col3, _col4, _col5, _col6, _col7, _col8, _col9 + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col20 (type: bigint) + sort order: +++ + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), _col12 (type: bigint), _col13 (type: decimal(17,2)), _col14 (type: decimal(17,2)), _col15 (type: decimal(17,2)), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: string), VALUE._col1 (type: string), VALUE._col2 (type: string), VALUE._col3 (type: string), VALUE._col4 (type: string), VALUE._col5 (type: string), VALUE._col6 (type: string), VALUE._col7 (type: string), VALUE._col8 (type: string), 2000 (type: int), VALUE._col10 (type: bigint), VALUE._col11 (type: decimal(17,2)), VALUE._col12 (type: decimal(17,2)), VALUE._col13 (type: decimal(17,2)), VALUE._col14 (type: decimal(17,2)), VALUE._col15 (type: decimal(17,2)), VALUE._col16 (type: decimal(17,2)), 2001 (type: int), KEY.reducesinkkey2 (type: bigint) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20 + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 10 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((((ss_item_sk is not null and ss_ticket_number is not null) and ss_customer_sk is not null) and ss_sold_date_sk is not null) and ss_store_sk is not null) and ss_cdemo_sk is not null) and ss_promo_sk is not null) and ss_hdemo_sk is not null) and ss_addr_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 407 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_item_sk (type: int), ss_ticket_number (type: int) + sort order: ++ + Map-reduce partition columns: ss_item_sk (type: int), ss_ticket_number (type: int) + Statistics: Num rows: 1 Data size: 407 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_customer_sk (type: int), ss_cdemo_sk (type: int), ss_hdemo_sk (type: int), ss_addr_sk (type: int), ss_store_sk (type: int), ss_promo_sk (type: int), ss_wholesale_cost (type: decimal(7,2)), ss_list_price (type: decimal(7,2)), ss_coupon_amt (type: decimal(7,2)) + TableScan + alias: store_returns + Statistics: Num rows: 42 Data size: 338 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (sr_item_sk is not null and sr_ticket_number is not null) (type: boolean) + Statistics: Num rows: 11 Data size: 88 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: sr_item_sk (type: int), sr_ticket_number (type: int) + sort order: ++ + Map-reduce partition columns: sr_item_sk (type: int), sr_ticket_number (type: int) + Statistics: Num rows: 11 Data size: 88 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_item_sk (type: int), ss_ticket_number (type: int) + 1 sr_item_sk (type: int), sr_ticket_number (type: int) + outputColumnNames: _col0, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col11, _col12, _col19 + Statistics: Num rows: 12 Data size: 96 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-9 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: int) + sort order: + + Map-reduce partition columns: _col3 (type: int) + Statistics: Num rows: 12 Data size: 96 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)) + TableScan + alias: customer + Statistics: Num rows: 5 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((c_customer_sk is not null and c_first_sales_date_sk is not null) and c_first_shipto_date_sk is not null) and c_current_cdemo_sk is not null) and c_current_hdemo_sk is not null) and c_current_addr_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 27 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 1 Data size: 27 Basic stats: COMPLETE Column stats: NONE + value expressions: c_current_cdemo_sk (type: int), c_current_hdemo_sk (type: int), c_current_addr_sk (type: int), c_first_shipto_date_sk (type: int), c_first_sales_date_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col3 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col2, _col4, _col5, _col6, _col7, _col8, _col11, _col12, _col19, _col51, _col52, _col53, _col54, _col55 + Statistics: Num rows: 13 Data size: 105 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-10 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 13 Data size: 105 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col51 (type: int), _col52 (type: int), _col53 (type: int), _col54 (type: int), _col55 (type: int) + TableScan + alias: d1 + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 2000)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col2, _col4, _col5, _col6, _col7, _col8, _col11, _col12, _col19, _col51, _col52, _col53, _col54, _col55 + Statistics: Num rows: 14 Data size: 115 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-11 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col55 (type: int) + sort order: + + Map-reduce partition columns: _col55 (type: int) + Statistics: Num rows: 14 Data size: 115 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col51 (type: int), _col52 (type: int), _col53 (type: int), _col54 (type: int) + TableScan + alias: d2 + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: d_date_sk is not null (type: boolean) + Statistics: Num rows: 9 Data size: 74 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 9 Data size: 74 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col55 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col2, _col4, _col5, _col6, _col7, _col8, _col11, _col12, _col19, _col51, _col52, _col53, _col54, _col107 + Statistics: Num rows: 15 Data size: 126 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-12 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col54 (type: int) + sort order: + + Map-reduce partition columns: _col54 (type: int) + Statistics: Num rows: 15 Data size: 126 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col51 (type: int), _col52 (type: int), _col53 (type: int), _col107 (type: int) + TableScan + alias: d3 + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: d_date_sk is not null (type: boolean) + Statistics: Num rows: 9 Data size: 74 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 9 Data size: 74 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col54 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col2, _col4, _col5, _col6, _col7, _col8, _col11, _col12, _col19, _col51, _col52, _col53, _col107, _col138 + Statistics: Num rows: 16 Data size: 138 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-13 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 16 Data size: 138 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col51 (type: int), _col52 (type: int), _col53 (type: int), _col107 (type: int), _col138 (type: int) + TableScan + alias: store + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((s_store_sk is not null and s_store_name is not null) and s_zip is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + value expressions: s_store_name (type: string), s_zip (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col2, _col4, _col5, _col6, _col8, _col11, _col12, _col19, _col51, _col52, _col53, _col107, _col138, _col168, _col188 + Statistics: Num rows: 17 Data size: 151 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-14 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col4 (type: int) + sort order: + + Map-reduce partition columns: _col4 (type: int) + Statistics: Num rows: 17 Data size: 151 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col5 (type: int), _col6 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col51 (type: int), _col52 (type: int), _col53 (type: int), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string) + TableScan + alias: cd1 + Statistics: Num rows: 8 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cd_demo_sk is not null (type: boolean) + Statistics: Num rows: 4 Data size: 425 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 4 Data size: 425 Basic stats: COMPLETE Column stats: NONE + value expressions: cd_marital_status (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col4 (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col2, _col5, _col6, _col8, _col11, _col12, _col19, _col51, _col52, _col53, _col107, _col138, _col168, _col188, _col197 + Statistics: Num rows: 18 Data size: 166 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-15 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col51 (type: int) + sort order: + + Map-reduce partition columns: _col51 (type: int) + Statistics: Num rows: 18 Data size: 166 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col5 (type: int), _col6 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col52 (type: int), _col53 (type: int), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string) + TableScan + alias: cd2 + Statistics: Num rows: 8 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cd_demo_sk is not null (type: boolean) + Statistics: Num rows: 4 Data size: 425 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 4 Data size: 425 Basic stats: COMPLETE Column stats: NONE + value expressions: cd_marital_status (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col51 (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col2, _col5, _col6, _col8, _col11, _col12, _col19, _col52, _col53, _col107, _col138, _col168, _col188, _col197, _col209 + Statistics: Num rows: 19 Data size: 182 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-16 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col8 (type: int) + sort order: + + Map-reduce partition columns: _col8 (type: int) + Statistics: Num rows: 19 Data size: 182 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col5 (type: int), _col6 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col52 (type: int), _col53 (type: int), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string) + TableScan + alias: promotion + Statistics: Num rows: 29 Data size: 117 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: p_promo_sk is not null (type: boolean) + Statistics: Num rows: 15 Data size: 60 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: p_promo_sk (type: int) + sort order: + + Map-reduce partition columns: p_promo_sk (type: int) + Statistics: Num rows: 15 Data size: 60 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col8 (type: int) + 1 p_promo_sk (type: int) + outputColumnNames: _col2, _col5, _col6, _col11, _col12, _col19, _col52, _col53, _col107, _col138, _col168, _col188, _col197, _col209 + Statistics: Num rows: 20 Data size: 200 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-17 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col5 (type: int) + sort order: + + Map-reduce partition columns: _col5 (type: int) + Statistics: Num rows: 20 Data size: 200 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col6 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col52 (type: int), _col53 (type: int), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string) + TableScan + alias: hd1 + Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and hd_income_band_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: hd_income_band_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col5 (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col2, _col6, _col11, _col12, _col19, _col52, _col53, _col107, _col138, _col168, _col188, _col197, _col209, _col242 + Statistics: Num rows: 22 Data size: 220 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-18 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col52 (type: int) + sort order: + + Map-reduce partition columns: _col52 (type: int) + Statistics: Num rows: 22 Data size: 220 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col6 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col53 (type: int), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string), _col242 (type: int) + TableScan + alias: hd2 + Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and hd_income_band_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: hd_income_band_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col52 (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col2, _col6, _col11, _col12, _col19, _col53, _col107, _col138, _col168, _col188, _col197, _col209, _col242, _col250 + Statistics: Num rows: 24 Data size: 242 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-19 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col6 (type: int) + sort order: + + Map-reduce partition columns: _col6 (type: int) + Statistics: Num rows: 24 Data size: 242 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col53 (type: int), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string), _col242 (type: int), _col250 (type: int) + TableScan + alias: ad1 + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ca_address_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_street_number (type: string), ca_street_name (type: string), ca_city (type: string), ca_zip (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col6 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col2, _col11, _col12, _col19, _col53, _col107, _col138, _col168, _col188, _col197, _col209, _col242, _col250, _col259, _col260, _col263, _col266 + Statistics: Num rows: 26 Data size: 266 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-20 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col53 (type: int) + sort order: + + Map-reduce partition columns: _col53 (type: int) + Statistics: Num rows: 26 Data size: 266 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string), _col242 (type: int), _col250 (type: int), _col259 (type: string), _col260 (type: string), _col263 (type: string), _col266 (type: string) + TableScan + alias: ad2 + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ca_address_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_street_number (type: string), ca_street_name (type: string), ca_city (type: string), ca_zip (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col53 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col2, _col11, _col12, _col19, _col107, _col138, _col168, _col188, _col197, _col209, _col242, _col250, _col259, _col260, _col263, _col266, _col275, _col276, _col279, _col282 + Statistics: Num rows: 28 Data size: 292 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-21 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col242 (type: int) + sort order: + + Map-reduce partition columns: _col242 (type: int) + Statistics: Num rows: 28 Data size: 292 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string), _col250 (type: int), _col259 (type: string), _col260 (type: string), _col263 (type: string), _col266 (type: string), _col275 (type: string), _col276 (type: string), _col279 (type: string), _col282 (type: string) + TableScan + alias: ib1 + Statistics: Num rows: 4 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ib_income_band_sk is not null (type: boolean) + Statistics: Num rows: 2 Data size: 9 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ib_income_band_sk (type: int) + sort order: + + Map-reduce partition columns: ib_income_band_sk (type: int) + Statistics: Num rows: 2 Data size: 9 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col242 (type: int) + 1 ib_income_band_sk (type: int) + outputColumnNames: _col2, _col11, _col12, _col19, _col107, _col138, _col168, _col188, _col197, _col209, _col250, _col259, _col260, _col263, _col266, _col275, _col276, _col279, _col282 + Statistics: Num rows: 30 Data size: 321 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-22 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col250 (type: int) + sort order: + + Map-reduce partition columns: _col250 (type: int) + Statistics: Num rows: 30 Data size: 321 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string), _col259 (type: string), _col260 (type: string), _col263 (type: string), _col266 (type: string), _col275 (type: string), _col276 (type: string), _col279 (type: string), _col282 (type: string) + TableScan + alias: ib2 + Statistics: Num rows: 4 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ib_income_band_sk is not null (type: boolean) + Statistics: Num rows: 2 Data size: 9 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ib_income_band_sk (type: int) + sort order: + + Map-reduce partition columns: ib_income_band_sk (type: int) + Statistics: Num rows: 2 Data size: 9 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col250 (type: int) + 1 ib_income_band_sk (type: int) + outputColumnNames: _col2, _col11, _col12, _col19, _col107, _col138, _col168, _col188, _col197, _col209, _col259, _col260, _col263, _col266, _col275, _col276, _col279, _col282 + Statistics: Num rows: 33 Data size: 353 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-39 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 26 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (cs_item_sk is not null and cs_order_number is not null) (type: boolean) + Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_item_sk (type: int), cs_order_number (type: int) + sort order: ++ + Map-reduce partition columns: cs_item_sk (type: int), cs_order_number (type: int) + Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_ext_list_price (type: decimal(7,2)) + TableScan + alias: catalog_returns + Statistics: Num rows: 1 Data size: 288 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (cr_item_sk is not null and cr_order_number is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 288 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cr_item_sk (type: int), cr_order_number (type: int) + sort order: ++ + Map-reduce partition columns: cr_item_sk (type: int), cr_order_number (type: int) + Statistics: Num rows: 1 Data size: 288 Basic stats: COMPLETE Column stats: NONE + value expressions: cr_refunded_cash (type: decimal(7,2)), cr_reversed_charge (type: decimal(7,2)), cr_store_credit (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_item_sk (type: int), cs_order_number (type: int) + 1 cr_item_sk (type: int), cr_order_number (type: int) + outputColumnNames: _col15, _col25, _col60, _col61, _col62 + Statistics: Num rows: 7 Data size: 924 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col25), sum(((_col60 + _col61) + _col62)) + keys: _col15 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 7 Data size: 924 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-40 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 7 Data size: 924 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: decimal(17,2)), _col2 (type: decimal(19,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1) + keys: KEY._col0 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 3 Data size: 396 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (_col1 > (2 * _col2)) (type: boolean) + Statistics: Num rows: 1 Data size: 132 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: int) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 132 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-41 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 1 Data size: 132 Basic stats: COMPLETE Column stats: NONE + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 33 Data size: 353 Basic stats: COMPLETE Column stats: NONE + value expressions: _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string), _col259 (type: string), _col260 (type: string), _col263 (type: string), _col266 (type: string), _col275 (type: string), _col276 (type: string), _col279 (type: string), _col282 (type: string) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((i_item_sk is not null and (i_color) IN ('maroon', 'burnished', 'dim', 'steel', 'navajo', 'chocolate')) and i_current_price BETWEEN 35 AND 45) and i_current_price BETWEEN 36 AND 50) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_current_price (type: decimal(7,2)), i_color (type: string), i_product_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + Inner Join 0 to 2 + keys: + 0 _col2 (type: int) + 1 i_item_sk (type: int) + 2 _col0 (type: int) + outputColumnNames: _col11, _col12, _col19, _col107, _col138, _col168, _col188, _col197, _col209, _col259, _col260, _col263, _col266, _col275, _col276, _col279, _col282, _col301, _col306, _col318, _col322 + Statistics: Num rows: 72 Data size: 776 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((_col197 <> _col209) and (_col318) IN ('maroon', 'burnished', 'dim', 'steel', 'navajo', 'chocolate')) and _col306 BETWEEN 35 AND 45) and _col306 BETWEEN 36 AND 50) (type: boolean) + Statistics: Num rows: 9 Data size: 97 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col322 (type: string), _col301 (type: int), _col168 (type: string), _col188 (type: string), _col259 (type: string), _col260 (type: string), _col263 (type: string), _col266 (type: string), _col275 (type: string), _col276 (type: string), _col279 (type: string), _col282 (type: string), 2001 (type: int), _col107 (type: int), _col138 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)) + outputColumnNames: _col322, _col301, _col168, _col188, _col259, _col260, _col263, _col266, _col275, _col276, _col279, _col282, _col76, _col107, _col138, _col11, _col12, _col19 + Statistics: Num rows: 9 Data size: 97 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count(), sum(_col11), sum(_col12), sum(_col19) + keys: _col322 (type: string), _col301 (type: int), _col168 (type: string), _col188 (type: string), _col259 (type: string), _col260 (type: string), _col263 (type: string), _col266 (type: string), _col275 (type: string), _col276 (type: string), _col279 (type: string), _col282 (type: string), _col76 (type: int), _col107 (type: int), _col138 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18 + Statistics: Num rows: 9 Data size: 97 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-42 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), _col11 (type: string), _col12 (type: int), _col13 (type: int), _col14 (type: int) + sort order: +++++++++++++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), _col11 (type: string), _col12 (type: int), _col13 (type: int), _col14 (type: int) + Statistics: Num rows: 9 Data size: 97 Basic stats: COMPLETE Column stats: NONE + value expressions: _col15 (type: bigint), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2), sum(VALUE._col3) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string), KEY._col5 (type: string), KEY._col6 (type: string), KEY._col7 (type: string), KEY._col8 (type: string), KEY._col9 (type: string), KEY._col10 (type: string), KEY._col11 (type: string), KEY._col12 (type: int), KEY._col13 (type: int), KEY._col14 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18 + Statistics: Num rows: 4 Data size: 43 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: int), _col12 (type: int), _col15 (type: bigint), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2)), _col2 (type: string), _col3 (type: string) + outputColumnNames: _col1, _col12, _col15, _col16, _col17, _col18, _col2, _col3 + Statistics: Num rows: 4 Data size: 43 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-44 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 10 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((((ss_item_sk is not null and ss_ticket_number is not null) and ss_customer_sk is not null) and ss_sold_date_sk is not null) and ss_store_sk is not null) and ss_cdemo_sk is not null) and ss_promo_sk is not null) and ss_hdemo_sk is not null) and ss_addr_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 407 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_item_sk (type: int), ss_ticket_number (type: int) + sort order: ++ + Map-reduce partition columns: ss_item_sk (type: int), ss_ticket_number (type: int) + Statistics: Num rows: 1 Data size: 407 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_customer_sk (type: int), ss_cdemo_sk (type: int), ss_hdemo_sk (type: int), ss_addr_sk (type: int), ss_store_sk (type: int), ss_promo_sk (type: int), ss_wholesale_cost (type: decimal(7,2)), ss_list_price (type: decimal(7,2)), ss_coupon_amt (type: decimal(7,2)) + TableScan + alias: store_returns + Statistics: Num rows: 42 Data size: 338 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (sr_item_sk is not null and sr_ticket_number is not null) (type: boolean) + Statistics: Num rows: 11 Data size: 88 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: sr_item_sk (type: int), sr_ticket_number (type: int) + sort order: ++ + Map-reduce partition columns: sr_item_sk (type: int), sr_ticket_number (type: int) + Statistics: Num rows: 11 Data size: 88 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_item_sk (type: int), ss_ticket_number (type: int) + 1 sr_item_sk (type: int), sr_ticket_number (type: int) + outputColumnNames: _col0, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col11, _col12, _col19 + Statistics: Num rows: 12 Data size: 96 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-45 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: int) + sort order: + + Map-reduce partition columns: _col3 (type: int) + Statistics: Num rows: 12 Data size: 96 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)) + TableScan + alias: customer + Statistics: Num rows: 5 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((c_customer_sk is not null and c_first_sales_date_sk is not null) and c_first_shipto_date_sk is not null) and c_current_cdemo_sk is not null) and c_current_hdemo_sk is not null) and c_current_addr_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 27 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 1 Data size: 27 Basic stats: COMPLETE Column stats: NONE + value expressions: c_current_cdemo_sk (type: int), c_current_hdemo_sk (type: int), c_current_addr_sk (type: int), c_first_shipto_date_sk (type: int), c_first_sales_date_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col3 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col2, _col4, _col5, _col6, _col7, _col8, _col11, _col12, _col19, _col51, _col52, _col53, _col54, _col55 + Statistics: Num rows: 13 Data size: 105 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-46 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 13 Data size: 105 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col51 (type: int), _col52 (type: int), _col53 (type: int), _col54 (type: int), _col55 (type: int) + TableScan + alias: d1 + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 2001)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col2, _col4, _col5, _col6, _col7, _col8, _col11, _col12, _col19, _col51, _col52, _col53, _col54, _col55 + Statistics: Num rows: 14 Data size: 115 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-47 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col55 (type: int) + sort order: + + Map-reduce partition columns: _col55 (type: int) + Statistics: Num rows: 14 Data size: 115 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col51 (type: int), _col52 (type: int), _col53 (type: int), _col54 (type: int) + TableScan + alias: d2 + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: d_date_sk is not null (type: boolean) + Statistics: Num rows: 9 Data size: 74 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 9 Data size: 74 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col55 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col2, _col4, _col5, _col6, _col7, _col8, _col11, _col12, _col19, _col51, _col52, _col53, _col54, _col107 + Statistics: Num rows: 15 Data size: 126 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-48 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col54 (type: int) + sort order: + + Map-reduce partition columns: _col54 (type: int) + Statistics: Num rows: 15 Data size: 126 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col51 (type: int), _col52 (type: int), _col53 (type: int), _col107 (type: int) + TableScan + alias: d3 + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: d_date_sk is not null (type: boolean) + Statistics: Num rows: 9 Data size: 74 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 9 Data size: 74 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col54 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col2, _col4, _col5, _col6, _col7, _col8, _col11, _col12, _col19, _col51, _col52, _col53, _col107, _col138 + Statistics: Num rows: 16 Data size: 138 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-49 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 16 Data size: 138 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col51 (type: int), _col52 (type: int), _col53 (type: int), _col107 (type: int), _col138 (type: int) + TableScan + alias: store + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((s_store_sk is not null and s_store_name is not null) and s_zip is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + value expressions: s_store_name (type: string), s_zip (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col2, _col4, _col5, _col6, _col8, _col11, _col12, _col19, _col51, _col52, _col53, _col107, _col138, _col168, _col188 + Statistics: Num rows: 17 Data size: 151 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-50 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col4 (type: int) + sort order: + + Map-reduce partition columns: _col4 (type: int) + Statistics: Num rows: 17 Data size: 151 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col5 (type: int), _col6 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col51 (type: int), _col52 (type: int), _col53 (type: int), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string) + TableScan + alias: cd1 + Statistics: Num rows: 8 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cd_demo_sk is not null (type: boolean) + Statistics: Num rows: 4 Data size: 425 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 4 Data size: 425 Basic stats: COMPLETE Column stats: NONE + value expressions: cd_marital_status (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col4 (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col2, _col5, _col6, _col8, _col11, _col12, _col19, _col51, _col52, _col53, _col107, _col138, _col168, _col188, _col197 + Statistics: Num rows: 18 Data size: 166 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-51 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col51 (type: int) + sort order: + + Map-reduce partition columns: _col51 (type: int) + Statistics: Num rows: 18 Data size: 166 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col5 (type: int), _col6 (type: int), _col8 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col52 (type: int), _col53 (type: int), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string) + TableScan + alias: cd2 + Statistics: Num rows: 8 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cd_demo_sk is not null (type: boolean) + Statistics: Num rows: 4 Data size: 425 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 4 Data size: 425 Basic stats: COMPLETE Column stats: NONE + value expressions: cd_marital_status (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col51 (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col2, _col5, _col6, _col8, _col11, _col12, _col19, _col52, _col53, _col107, _col138, _col168, _col188, _col197, _col209 + Statistics: Num rows: 19 Data size: 182 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-52 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col8 (type: int) + sort order: + + Map-reduce partition columns: _col8 (type: int) + Statistics: Num rows: 19 Data size: 182 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col5 (type: int), _col6 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col52 (type: int), _col53 (type: int), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string) + TableScan + alias: promotion + Statistics: Num rows: 29 Data size: 117 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: p_promo_sk is not null (type: boolean) + Statistics: Num rows: 15 Data size: 60 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: p_promo_sk (type: int) + sort order: + + Map-reduce partition columns: p_promo_sk (type: int) + Statistics: Num rows: 15 Data size: 60 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col8 (type: int) + 1 p_promo_sk (type: int) + outputColumnNames: _col2, _col5, _col6, _col11, _col12, _col19, _col52, _col53, _col107, _col138, _col168, _col188, _col197, _col209 + Statistics: Num rows: 20 Data size: 200 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-53 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col5 (type: int) + sort order: + + Map-reduce partition columns: _col5 (type: int) + Statistics: Num rows: 20 Data size: 200 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col6 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col52 (type: int), _col53 (type: int), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string) + TableScan + alias: hd1 + Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and hd_income_band_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: hd_income_band_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col5 (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col2, _col6, _col11, _col12, _col19, _col52, _col53, _col107, _col138, _col168, _col188, _col197, _col209, _col242 + Statistics: Num rows: 22 Data size: 220 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-54 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col52 (type: int) + sort order: + + Map-reduce partition columns: _col52 (type: int) + Statistics: Num rows: 22 Data size: 220 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col6 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col53 (type: int), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string), _col242 (type: int) + TableScan + alias: hd2 + Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and hd_income_band_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: hd_income_band_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col52 (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col2, _col6, _col11, _col12, _col19, _col53, _col107, _col138, _col168, _col188, _col197, _col209, _col242, _col250 + Statistics: Num rows: 24 Data size: 242 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-55 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col6 (type: int) + sort order: + + Map-reduce partition columns: _col6 (type: int) + Statistics: Num rows: 24 Data size: 242 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col53 (type: int), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string), _col242 (type: int), _col250 (type: int) + TableScan + alias: ad1 + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ca_address_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_street_number (type: string), ca_street_name (type: string), ca_city (type: string), ca_zip (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col6 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col2, _col11, _col12, _col19, _col53, _col107, _col138, _col168, _col188, _col197, _col209, _col242, _col250, _col259, _col260, _col263, _col266 + Statistics: Num rows: 26 Data size: 266 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-56 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col53 (type: int) + sort order: + + Map-reduce partition columns: _col53 (type: int) + Statistics: Num rows: 26 Data size: 266 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string), _col242 (type: int), _col250 (type: int), _col259 (type: string), _col260 (type: string), _col263 (type: string), _col266 (type: string) + TableScan + alias: ad2 + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ca_address_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_street_number (type: string), ca_street_name (type: string), ca_city (type: string), ca_zip (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col53 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col2, _col11, _col12, _col19, _col107, _col138, _col168, _col188, _col197, _col209, _col242, _col250, _col259, _col260, _col263, _col266, _col275, _col276, _col279, _col282 + Statistics: Num rows: 28 Data size: 292 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-57 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col242 (type: int) + sort order: + + Map-reduce partition columns: _col242 (type: int) + Statistics: Num rows: 28 Data size: 292 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string), _col250 (type: int), _col259 (type: string), _col260 (type: string), _col263 (type: string), _col266 (type: string), _col275 (type: string), _col276 (type: string), _col279 (type: string), _col282 (type: string) + TableScan + alias: ib1 + Statistics: Num rows: 4 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ib_income_band_sk is not null (type: boolean) + Statistics: Num rows: 2 Data size: 9 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ib_income_band_sk (type: int) + sort order: + + Map-reduce partition columns: ib_income_band_sk (type: int) + Statistics: Num rows: 2 Data size: 9 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col242 (type: int) + 1 ib_income_band_sk (type: int) + outputColumnNames: _col2, _col11, _col12, _col19, _col107, _col138, _col168, _col188, _col197, _col209, _col250, _col259, _col260, _col263, _col266, _col275, _col276, _col279, _col282 + Statistics: Num rows: 30 Data size: 321 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-58 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col250 (type: int) + sort order: + + Map-reduce partition columns: _col250 (type: int) + Statistics: Num rows: 30 Data size: 321 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col11 (type: decimal(7,2)), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col107 (type: int), _col138 (type: int), _col168 (type: string), _col188 (type: string), _col197 (type: string), _col209 (type: string), _col259 (type: string), _col260 (type: string), _col263 (type: string), _col266 (type: string), _col275 (type: string), _col276 (type: string), _col279 (type: string), _col282 (type: string) + TableScan + alias: ib2 + Statistics: Num rows: 4 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ib_income_band_sk is not null (type: boolean) + Statistics: Num rows: 2 Data size: 9 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ib_income_band_sk (type: int) + sort order: + + Map-reduce partition columns: ib_income_band_sk (type: int) + Statistics: Num rows: 2 Data size: 9 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col250 (type: int) + 1 ib_income_band_sk (type: int) + outputColumnNames: _col2, _col11, _col12, _col19, _col107, _col138, _col168, _col188, _col197, _col209, _col259, _col260, _col263, _col266, _col275, _col276, _col279, _col282 + Statistics: Num rows: 33 Data size: 353 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query68.q.out b/ql/src/test/results/clientpositive/perf/query68.q.out new file mode 100644 index 0000000..925ea36 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query68.q.out @@ -0,0 +1,328 @@ +PREHOOK: query: explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,extended_price ,extended_tax ,list_price from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_ext_sales_price) extended_price ,sum(ss_ext_list_price) list_price ,sum(ss_ext_tax) extended_tax from store_sales ,date_dim ,store ,household_demographics ,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem') group by ss_ticket_number ,ss_customer_sk ,ss_addr_sk,ca_city) dn ,customer ,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,ss_ticket_number limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,extended_price ,extended_tax ,list_price from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_ext_sales_price) extended_price ,sum(ss_ext_list_price) list_price ,sum(ss_ext_tax) extended_tax from store_sales ,date_dim ,store ,household_demographics ,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem') group by ss_ticket_number ,ss_customer_sk ,ss_addr_sk,ca_city) dn ,customer ,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,ss_ticket_number limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-8 depends on stages: Stage-7 + Stage-0 depends on stages: Stage-8 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 11 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_addr_sk is not null) and ss_customer_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 370 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 1 Data size: 370 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_customer_sk (type: int), ss_hdemo_sk (type: int), ss_addr_sk (type: int), ss_store_sk (type: int), ss_ticket_number (type: int), ss_ext_sales_price (type: decimal(7,2)), ss_ext_list_price (type: decimal(7,2)), ss_ext_tax (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and d_dom BETWEEN 1 AND 2) and (d_year) IN (1998, 1999, 2000)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int), d_dom (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col6, _col7, _col9, _col15, _col17, _col18, _col26, _col32, _col35 + Statistics: Num rows: 1 Data size: 407 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 1 Data size: 407 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: int), _col9 (type: int), _col15 (type: decimal(7,2)), _col17 (type: decimal(7,2)), _col18 (type: decimal(7,2)), _col26 (type: int), _col32 (type: int), _col35 (type: int) + TableScan + alias: store + Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (s_store_sk is not null and (s_city) IN ('Rosedale', 'Bethlehem')) (type: boolean) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + value expressions: s_city (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col6, _col7, _col9, _col15, _col17, _col18, _col26, _col32, _col35, _col57, _col79 + Statistics: Num rows: 1 Data size: 447 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col5 (type: int) + sort order: + + Map-reduce partition columns: _col5 (type: int) + Statistics: Num rows: 1 Data size: 447 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: int), _col15 (type: decimal(7,2)), _col17 (type: decimal(7,2)), _col18 (type: decimal(7,2)), _col26 (type: int), _col32 (type: int), _col35 (type: int), _col57 (type: int), _col79 (type: string) + TableScan + alias: household_demographics + Statistics: Num rows: 2 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and ((hd_dep_count = 4) or (hd_vehicle_count = 2))) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: hd_dep_count (type: int), hd_vehicle_count (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col5 (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col6, _col7, _col9, _col15, _col17, _col18, _col26, _col32, _col35, _col57, _col79, _col89, _col92, _col93 + Statistics: Num rows: 1 Data size: 491 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col6 (type: int) + sort order: + + Map-reduce partition columns: _col6 (type: int) + Statistics: Num rows: 1 Data size: 491 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col5 (type: int), _col7 (type: int), _col9 (type: int), _col15 (type: decimal(7,2)), _col17 (type: decimal(7,2)), _col18 (type: decimal(7,2)), _col26 (type: int), _col32 (type: int), _col35 (type: int), _col57 (type: int), _col79 (type: string), _col89 (type: int), _col92 (type: int), _col93 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ca_address_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_city (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col6 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col6, _col7, _col9, _col15, _col17, _col18, _col26, _col32, _col35, _col57, _col79, _col89, _col92, _col93, _col97, _col103 + Statistics: Num rows: 1 Data size: 540 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((((_col0 = _col26) and (_col7 = _col57)) and (_col5 = _col89)) and (_col6 = _col97)) and _col35 BETWEEN 1 AND 2) and ((_col92 = 4) or (_col93 = 2))) and (_col32) IN (1998, 1999, 2000)) and (_col79) IN ('Rosedale', 'Bethlehem')) (type: boolean) + Statistics: Num rows: 1 Data size: 540 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col9 (type: int), _col3 (type: int), _col6 (type: int), _col103 (type: string), _col15 (type: decimal(7,2)), _col17 (type: decimal(7,2)), _col18 (type: decimal(7,2)) + outputColumnNames: _col9, _col3, _col6, _col103, _col15, _col17, _col18 + Statistics: Num rows: 1 Data size: 540 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col15), sum(_col17), sum(_col18) + keys: _col9 (type: int), _col3 (type: int), _col6 (type: int), _col103 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 540 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string) + sort order: ++++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string) + Statistics: Num rows: 1 Data size: 540 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2) + keys: KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 540 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: int), _col1 (type: int), _col3 (type: string), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 540 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int) + sort order: + + Map-reduce partition columns: _col1 (type: int) + Statistics: Num rows: 1 Data size: 540 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)) + TableScan + alias: customer + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + value expressions: c_current_addr_sk (type: int), c_first_name (type: string), c_last_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col10, _col14, _col15 + Statistics: Num rows: 1 Data size: 594 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col10 (type: int) + sort order: + + Map-reduce partition columns: _col10 (type: int) + Statistics: Num rows: 1 Data size: 594 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: int), _col14 (type: string), _col15 (type: string) + TableScan + alias: current_addr + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ca_address_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_city (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col10 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col10, _col14, _col15, _col27, _col33 + Statistics: Num rows: 1 Data size: 653 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((_col1 = _col6) and (_col10 = _col27)) and (_col33 <> _col2)) (type: boolean) + Statistics: Num rows: 1 Data size: 653 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col15 (type: string), _col14 (type: string), _col33 (type: string), _col2 (type: string), _col0 (type: int), _col3 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col4 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 + Statistics: Num rows: 1 Data size: 653 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col4 (type: int) + sort order: ++ + Statistics: Num rows: 1 Data size: 653 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)), _col7 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), VALUE._col0 (type: string), VALUE._col1 (type: string), VALUE._col2 (type: string), KEY.reducesinkkey1 (type: int), VALUE._col3 (type: decimal(17,2)), VALUE._col4 (type: decimal(17,2)), VALUE._col5 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 + Statistics: Num rows: 1 Data size: 653 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 653 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 653 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query7.q.out b/ql/src/test/results/clientpositive/perf/query7.q.out new file mode 100644 index 0000000..1cf43d8 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query7.q.out @@ -0,0 +1,237 @@ +PREHOOK: query: explain select i_item_id, avg(ss_quantity) agg1, avg(ss_list_price) agg2, avg(ss_coupon_amt) agg3, avg(ss_sales_price) agg4 from store_sales, customer_demographics, date_dim, item, promotion where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and store_sales.ss_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_id, avg(ss_quantity) agg1, avg(ss_list_price) agg2, avg(ss_coupon_amt) agg3, avg(ss_sales_price) agg4 from store_sales, customer_demographics, date_dim, item, promotion where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and store_sales.ss_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 11 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((ss_cdemo_sk is not null and ss_sold_date_sk is not null) and ss_item_sk is not null) and ss_promo_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 370 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_cdemo_sk (type: int) + sort order: + + Map-reduce partition columns: ss_cdemo_sk (type: int) + Statistics: Num rows: 1 Data size: 370 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_item_sk (type: int), ss_promo_sk (type: int), ss_quantity (type: int), ss_list_price (type: decimal(7,2)), ss_sales_price (type: decimal(7,2)), ss_coupon_amt (type: decimal(7,2)) + TableScan + alias: customer_demographics + Statistics: Num rows: 65 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((cd_demo_sk is not null and (cd_gender = 'F')) and (cd_marital_status = 'W')) and (cd_education_status = 'Primary')) (type: boolean) + Statistics: Num rows: 4 Data size: 52 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 4 Data size: 52 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_cdemo_sk (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col0, _col2, _col4, _col8, _col10, _col12, _col13, _col19, _col26 + Statistics: Num rows: 4 Data size: 57 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 4 Data size: 57 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col4 (type: int), _col8 (type: int), _col10 (type: int), _col12 (type: decimal(7,2)), _col13 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col26 (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col4, _col8, _col10, _col12, _col13, _col19, _col26, _col38 + Statistics: Num rows: 4 Data size: 62 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 4 Data size: 62 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col4 (type: int), _col8 (type: int), _col10 (type: int), _col12 (type: decimal(7,2)), _col13 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col26 (type: int), _col38 (type: int) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col2, _col4, _col8, _col10, _col12, _col13, _col19, _col26, _col38, _col69, _col70 + Statistics: Num rows: 4 Data size: 68 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col8 (type: int) + sort order: + + Map-reduce partition columns: _col8 (type: int) + Statistics: Num rows: 4 Data size: 68 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col4 (type: int), _col10 (type: int), _col12 (type: decimal(7,2)), _col13 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col26 (type: int), _col38 (type: int), _col69 (type: int), _col70 (type: string) + TableScan + alias: promotion + Statistics: Num rows: 1 Data size: 117 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (p_promo_sk is not null and ((p_channel_email = 'N') or (p_channel_event = 'N'))) (type: boolean) + Statistics: Num rows: 1 Data size: 117 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: p_promo_sk (type: int) + sort order: + + Map-reduce partition columns: p_promo_sk (type: int) + Statistics: Num rows: 1 Data size: 117 Basic stats: COMPLETE Column stats: NONE + value expressions: p_channel_email (type: string), p_channel_event (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col8 (type: int) + 1 p_promo_sk (type: int) + outputColumnNames: _col0, _col2, _col4, _col8, _col10, _col12, _col13, _col19, _col26, _col38, _col69, _col70, _col94, _col103, _col108 + Statistics: Num rows: 4 Data size: 74 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((_col0 = _col38) and (_col2 = _col69)) and (_col4 = _col26)) and (_col8 = _col94)) and ((_col103 = 'N') or (_col108 = 'N'))) (type: boolean) + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col70 (type: string), _col10 (type: int), _col12 (type: decimal(7,2)), _col19 (type: decimal(7,2)), _col13 (type: decimal(7,2)) + outputColumnNames: _col70, _col10, _col12, _col19, _col13 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: avg(_col10), avg(_col12), avg(_col19), avg(_col13) + keys: _col70 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: struct), _col2 (type: struct), _col3 (type: struct), _col4 (type: struct) + Reduce Operator Tree: + Group By Operator + aggregations: avg(VALUE._col0), avg(VALUE._col1), avg(VALUE._col2), avg(VALUE._col3) + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: double), _col2 (type: decimal(11,6)), _col3 (type: decimal(11,6)), _col4 (type: decimal(11,6)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), VALUE._col0 (type: double), VALUE._col1 (type: decimal(11,6)), VALUE._col2 (type: decimal(11,6)), VALUE._col3 (type: decimal(11,6)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query70.q.out b/ql/src/test/results/clientpositive/perf/query70.q.out new file mode 100644 index 0000000..f6fbb97 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query70.q.out @@ -0,0 +1,415 @@ +PREHOOK: query: explain select sum(ss_net_profit) as total_sum ,s_state ,s_county ,grouping__id as lochierarchy , rank() over(partition by grouping__id, case when grouping__id == 2 then s_state end order by sum(ss_net_profit)) as rank_within_parent from store_sales ss join date_dim d1 on d1.d_date_sk = ss.ss_sold_date_sk join store s on s.s_store_sk = ss.ss_store_sk where d1.d_month_seq between 1193 and 1193+11 and s.s_state in ( select s_state from (select s_state as s_state, sum(ss_net_profit), rank() over ( partition by s_state order by sum(ss_net_profit) desc) as ranking from store_sales, store, date_dim where d_month_seq between 1193 and 1193+11 and date_dim.d_date_sk = store_sales.ss_sold_date_sk and store.s_store_sk = store_sales.ss_store_sk group by s_state ) tmp1 where ranking <= 5 ) group by s_state,s_county with rollup order by lochierarchy desc ,case when lochierarchy = 0 then s_state end ,rank_within_parent limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select sum(ss_net_profit) as total_sum ,s_state ,s_county ,grouping__id as lochierarchy , rank() over(partition by grouping__id, case when grouping__id == 2 then s_state end order by sum(ss_net_profit)) as rank_within_parent from store_sales ss join date_dim d1 on d1.d_date_sk = ss.ss_sold_date_sk join store s on s.s_store_sk = ss.ss_store_sk where d1.d_month_seq between 1193 and 1193+11 and s.s_state in ( select s_state from (select s_state as s_state, sum(ss_net_profit), rank() over ( partition by s_state order by sum(ss_net_profit) desc) as ranking from store_sales, store, date_dim where d_month_seq between 1193 and 1193+11 and date_dim.d_date_sk = store_sales.ss_sold_date_sk and store.s_store_sk = store_sales.ss_store_sk group by s_state ) tmp1 where ranking <= 5 ) group by s_state,s_county with rollup order by lochierarchy desc ,case when lochierarchy = 0 then s_state end ,rank_within_parent limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2, Stage-12 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-9 is a root stage + Stage-10 depends on stages: Stage-9 + Stage-11 depends on stages: Stage-10 + Stage-12 depends on stages: Stage-11 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: ss + Statistics: Num rows: 33 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_sold_date_sk is not null and ss_store_sk is not null) (type: boolean) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_store_sk (type: int), ss_net_profit (type: decimal(7,2)) + TableScan + alias: d1 + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col7, _col22 + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + value expressions: _col22 (type: decimal(7,2)) + TableScan + alias: s + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (s_store_sk is not null and s_state is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 255 Basic stats: COMPLETE Column stats: NONE + value expressions: s_county (type: string), s_state (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col22, _col80, _col81 + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col81 (type: string) + sort order: + + Map-reduce partition columns: _col81 (type: string) + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + value expressions: _col22 (type: decimal(7,2)), _col80 (type: string) + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Left Semi Join 0 to 1 + keys: + 0 _col81 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col22, _col80, _col81 + Statistics: Num rows: 9 Data size: 1477 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col81 (type: string), _col80 (type: string), _col22 (type: decimal(7,2)) + outputColumnNames: _col81, _col80, _col22 + Statistics: Num rows: 9 Data size: 1477 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col22) + keys: _col81 (type: string), _col80 (type: string), '0' (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 27 Data size: 4431 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) + Statistics: Num rows: 27 Data size: 4431 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 13 Data size: 2133 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: string), CASE WHEN ((_col2 = 2)) THEN (_col0) END (type: string), _col3 (type: decimal(17,2)) + sort order: +++ + Map-reduce partition columns: _col2 (type: string), CASE WHEN ((_col2 = 2)) THEN (_col0) END (type: string) + Statistics: Num rows: 13 Data size: 2133 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col1 (type: string), _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: string), VALUE._col1 (type: string), KEY.reducesinkkey0 (type: string), VALUE._col2 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 13 Data size: 2133 Basic stats: COMPLETE Column stats: NONE + PTF Operator + Function definitions: + Input definition + input alias: ptf_0 + output shape: _col0: string, _col1: string, _col2: string, _col3: decimal(17,2) + type: WINDOWING + Windowing table definition + input alias: ptf_1 + name: windowingtablefunction + order by: _col3 + partition by: _col2, CASE WHEN ((_col2 = 2)) THEN (_col0) END + raw input shape: + window functions: + window function definition + alias: rank_window_0 + arguments: _col3 + name: rank + window function: GenericUDAFRankEvaluator + window frame: PRECEDING(MAX)~FOLLOWING(MAX) + isPivotResult: true + Statistics: Num rows: 13 Data size: 2133 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col3 (type: decimal(17,2)), _col0 (type: string), _col1 (type: string), _col2 (type: string), rank_window_0 (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 13 Data size: 2133 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: string), CASE WHEN ((_col3 = 0)) THEN (_col1) END (type: string), _col4 (type: int) + sort order: -++ + Statistics: Num rows: 13 Data size: 2133 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: decimal(17,2)), _col1 (type: string), _col2 (type: string) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: decimal(17,2)), VALUE._col1 (type: string), VALUE._col2 (type: string), KEY.reducesinkkey0 (type: string), KEY.reducesinkkey2 (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 13 Data size: 2133 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 13 Data size: 2133 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 13 Data size: 2133 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-9 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 33 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_store_sk is not null and ss_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_store_sk (type: int) + sort order: + + Map-reduce partition columns: ss_store_sk (type: int) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_net_profit (type: decimal(7,2)) + TableScan + alias: store + Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: s_store_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + value expressions: s_state (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_store_sk (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col7, _col22, _col26, _col50 + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-10 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + value expressions: _col7 (type: int), _col22 (type: decimal(7,2)), _col26 (type: int), _col50 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + value expressions: d_month_seq (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col7, _col22, _col26, _col50, _col58, _col61 + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col61 BETWEEN 1193 AND 1204 and (_col58 = _col0)) and (_col26 = _col7)) (type: boolean) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col50 (type: string), _col22 (type: decimal(7,2)) + outputColumnNames: _col50, _col22 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col22) + keys: _col50 (type: string) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-11 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-12 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: decimal(17,2)) + sort order: +- + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), VALUE._col0 (type: decimal(17,2)) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + PTF Operator + Function definitions: + Input definition + input alias: ptf_0 + output shape: _col0: string, _col1: decimal(17,2) + type: WINDOWING + Windowing table definition + input alias: ptf_1 + name: windowingtablefunction + order by: _col1(DESC) + partition by: _col0 + raw input shape: + window functions: + window function definition + alias: rank_window_0 + arguments: _col1 + name: rank + window function: GenericUDAFRankEvaluator + window frame: PRECEDING(MAX)~FOLLOWING(MAX) + isPivotResult: true + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((rank_window_0 <= 5) and _col0 is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query71.q.out b/ql/src/test/results/clientpositive/perf/query71.q.out new file mode 100644 index 0000000..854e16b --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query71.q.out @@ -0,0 +1,324 @@ +PREHOOK: query: explain select i_brand_id brand_id, i_brand brand,t_hour,t_minute, sum(ext_price) ext_price from item JOIN (select ws_ext_sales_price as ext_price, ws_sold_date_sk as sold_date_sk, ws_item_sk as sold_item_sk, ws_sold_time_sk as time_sk from web_sales,date_dim where date_dim.d_date_sk = web_sales.ws_sold_date_sk and d_moy=12 and d_year=2001 union all select cs_ext_sales_price as ext_price, cs_sold_date_sk as sold_date_sk, cs_item_sk as sold_item_sk, cs_sold_time_sk as time_sk from catalog_sales,date_dim where date_dim.d_date_sk = catalog_sales.cs_sold_date_sk and d_moy=12 and d_year=2001 union all select ss_ext_sales_price as ext_price, ss_sold_date_sk as sold_date_sk, ss_item_sk as sold_item_sk, ss_sold_time_sk as time_sk from store_sales,date_dim where date_dim.d_date_sk = store_sales.ss_sold_date_sk and d_moy=12 and d_year=2001 ) tmp ON tmp.sold_item_sk = item.i_item_sk JOIN time_dim ON tmp.time_sk = time_dim.t_time_sk where i_manager_id=1 and (t_meal_time = 'breakfast' or t_meal_time = 'dinner') group by i_brand, i_brand_id,t_hour,t_minute order by ext_price desc, i_brand_id +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_brand_id brand_id, i_brand brand,t_hour,t_minute, sum(ext_price) ext_price from item JOIN (select ws_ext_sales_price as ext_price, ws_sold_date_sk as sold_date_sk, ws_item_sk as sold_item_sk, ws_sold_time_sk as time_sk from web_sales,date_dim where date_dim.d_date_sk = web_sales.ws_sold_date_sk and d_moy=12 and d_year=2001 union all select cs_ext_sales_price as ext_price, cs_sold_date_sk as sold_date_sk, cs_item_sk as sold_item_sk, cs_sold_time_sk as time_sk from catalog_sales,date_dim where date_dim.d_date_sk = catalog_sales.cs_sold_date_sk and d_moy=12 and d_year=2001 union all select ss_ext_sales_price as ext_price, ss_sold_date_sk as sold_date_sk, ss_item_sk as sold_item_sk, ss_sold_time_sk as time_sk from store_sales,date_dim where date_dim.d_date_sk = store_sales.ss_sold_date_sk and d_moy=12 and d_year=2001 ) tmp ON tmp.sold_item_sk = item.i_item_sk JOIN time_dim ON tmp.time_sk = time_dim.t_time_sk where i_manager_id=1 and (t_meal_time = 'breakfast' or t_meal_time = 'dinner') group by i_brand, i_brand_id,t_hour,t_minute order by ext_price desc, i_brand_id +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1, Stage-7, Stage-9 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-7 is a root stage + Stage-9 is a root stage + Stage-0 depends on stages: Stage-5 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 13 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((ws_sold_date_sk is not null and ws_item_sk is not null) and ws_sold_time_sk is not null) (type: boolean) + Statistics: Num rows: 2 Data size: 252 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ws_sold_date_sk (type: int) + Statistics: Num rows: 2 Data size: 252 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_sold_time_sk (type: int), ws_item_sk (type: int), ws_ext_sales_price (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_moy = 12)) and (d_year = 2001)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col1, _col3, _col23, _col37 + Statistics: Num rows: 2 Data size: 277 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (_col37 = _col0) (type: boolean) + Statistics: Num rows: 1 Data size: 138 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col23 (type: decimal(7,2)), _col3 (type: int), _col1 (type: int) + outputColumnNames: _col0, _col2, _col3 + Statistics: Num rows: 1 Data size: 138 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Union + Statistics: Num rows: 5 Data size: 691 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 5 Data size: 691 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: decimal(7,2)), _col3 (type: int) + TableScan + Union + Statistics: Num rows: 5 Data size: 691 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 5 Data size: 691 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: decimal(7,2)), _col3 (type: int) + TableScan + Union + Statistics: Num rows: 5 Data size: 691 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 5 Data size: 691 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: decimal(7,2)), _col3 (type: int) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and (i_manager_id = 1)) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_brand_id (type: int), i_brand (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 i_item_sk (type: int) + 1 _col2 (type: int) + outputColumnNames: _col7, _col8, _col25, _col28 + Statistics: Num rows: 5 Data size: 760 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col28 (type: int) + sort order: + + Map-reduce partition columns: _col28 (type: int) + Statistics: Num rows: 5 Data size: 760 Basic stats: COMPLETE Column stats: NONE + value expressions: _col7 (type: int), _col8 (type: string), _col25 (type: decimal(7,2)) + TableScan + alias: time_dim + Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (t_time_sk is not null and ((t_meal_time = 'breakfast') or (t_meal_time = 'dinner'))) (type: boolean) + Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: t_time_sk (type: int) + sort order: + + Map-reduce partition columns: t_time_sk (type: int) + Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE + value expressions: t_hour (type: int), t_minute (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col28 (type: int) + 1 t_time_sk (type: int) + outputColumnNames: _col7, _col8, _col25, _col32, _col33 + Statistics: Num rows: 5 Data size: 836 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col8 (type: string), _col7 (type: int), _col32 (type: int), _col33 (type: int), _col25 (type: decimal(7,2)) + outputColumnNames: _col8, _col7, _col32, _col33, _col25 + Statistics: Num rows: 5 Data size: 836 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col25) + keys: _col8 (type: string), _col7 (type: int), _col32 (type: int), _col33 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 5 Data size: 836 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: int), _col3 (type: int) + sort order: ++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: int), _col3 (type: int) + Statistics: Num rows: 5 Data size: 836 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 2 Data size: 334 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: int), _col0 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 2 Data size: 334 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col4 (type: decimal(17,2)), _col0 (type: int) + sort order: -+ + Statistics: Num rows: 2 Data size: 334 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string), _col2 (type: int), _col3 (type: int) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey1 (type: int), VALUE._col0 (type: string), VALUE._col1 (type: int), VALUE._col2 (type: int), KEY.reducesinkkey0 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 2 Data size: 334 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 2 Data size: 334 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 25 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((cs_sold_date_sk is not null and cs_item_sk is not null) and cs_sold_time_sk is not null) (type: boolean) + Statistics: Num rows: 4 Data size: 499 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: cs_sold_date_sk (type: int) + Statistics: Num rows: 4 Data size: 499 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_time_sk (type: int), cs_item_sk (type: int), cs_ext_sales_price (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_moy = 12)) and (d_year = 2001)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col1, _col15, _col23, _col37 + Statistics: Num rows: 4 Data size: 548 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (_col37 = _col0) (type: boolean) + Statistics: Num rows: 2 Data size: 274 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col23 (type: decimal(7,2)), _col15 (type: int), _col1 (type: int) + outputColumnNames: _col0, _col2, _col3 + Statistics: Num rows: 2 Data size: 274 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-9 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 32 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((ss_sold_date_sk is not null and ss_item_sk is not null) and ss_sold_time_sk is not null) (type: boolean) + Statistics: Num rows: 4 Data size: 508 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 4 Data size: 508 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_time_sk (type: int), ss_item_sk (type: int), ss_ext_sales_price (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_moy = 12)) and (d_year = 2001)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col15, _col26 + Statistics: Num rows: 4 Data size: 558 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (_col26 = _col0) (type: boolean) + Statistics: Num rows: 2 Data size: 279 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col15 (type: decimal(7,2)), _col2 (type: int), _col1 (type: int) + outputColumnNames: _col0, _col2, _col3 + Statistics: Num rows: 2 Data size: 279 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query72.q.out b/ql/src/test/results/clientpositive/perf/query72.q.out new file mode 100644 index 0000000..877703f --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query72.q.out @@ -0,0 +1,441 @@ +PREHOOK: query: explain select i_item_desc ,w_warehouse_name ,d1.d_week_seq ,count(case when p_promo_sk is null then 1 else 0 end) no_promo ,count(case when p_promo_sk is not null then 1 else 0 end) promo ,count(*) total_cnt from catalog_sales join inventory on (catalog_sales.cs_item_sk = inventory.inv_item_sk) join warehouse on (warehouse.w_warehouse_sk=inventory.inv_warehouse_sk) join item on (item.i_item_sk = catalog_sales.cs_item_sk) join customer_demographics on (catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk) join household_demographics on (catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk) join date_dim d1 on (catalog_sales.cs_sold_date_sk = d1.d_date_sk) join date_dim d2 on (inventory.inv_date_sk = d2.d_date_sk) join date_dim d3 on (catalog_sales.cs_ship_date_sk = d3.d_date_sk) left outer join promotion on (catalog_sales.cs_promo_sk=promotion.p_promo_sk) left outer join catalog_returns on (catalog_returns.cr_item_sk = catalog_sales.cs_item_sk and catalog_returns.cr_order_number = catalog_sales.cs_order_number) where d1.d_week_seq = d2.d_week_seq and inv_quantity_on_hand < cs_quantity and d3.d_date > d1.d_date + 5 and hd_buy_potential = '1001-5000' and d1.d_year = 2001 and hd_buy_potential = '1001-5000' and cd_marital_status = 'M' and d1.d_year = 2001 group by i_item_desc,w_warehouse_name,d1.d_week_seq order by total_cnt desc, i_item_desc, w_warehouse_name, d_week_seq limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_desc ,w_warehouse_name ,d1.d_week_seq ,count(case when p_promo_sk is null then 1 else 0 end) no_promo ,count(case when p_promo_sk is not null then 1 else 0 end) promo ,count(*) total_cnt from catalog_sales join inventory on (catalog_sales.cs_item_sk = inventory.inv_item_sk) join warehouse on (warehouse.w_warehouse_sk=inventory.inv_warehouse_sk) join item on (item.i_item_sk = catalog_sales.cs_item_sk) join customer_demographics on (catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk) join household_demographics on (catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk) join date_dim d1 on (catalog_sales.cs_sold_date_sk = d1.d_date_sk) join date_dim d2 on (inventory.inv_date_sk = d2.d_date_sk) join date_dim d3 on (catalog_sales.cs_ship_date_sk = d3.d_date_sk) left outer join promotion on (catalog_sales.cs_promo_sk=promotion.p_promo_sk) left outer join catalog_returns on (catalog_returns.cr_item_sk = catalog_sales.cs_item_sk and catalog_returns.cr_order_number = catalog_sales.cs_order_number) where d1.d_week_seq = d2.d_week_seq and inv_quantity_on_hand < cs_quantity and d3.d_date > d1.d_date + 5 and hd_buy_potential = '1001-5000' and d1.d_year = 2001 and hd_buy_potential = '1001-5000' and cd_marital_status = 'M' and d1.d_year = 2001 group by i_item_desc,w_warehouse_name,d1.d_week_seq order by total_cnt desc, i_item_desc, w_warehouse_name, d_week_seq limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-8 depends on stages: Stage-7 + Stage-9 depends on stages: Stage-8 + Stage-10 depends on stages: Stage-9 + Stage-11 depends on stages: Stage-10 + Stage-0 depends on stages: Stage-11 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 97 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((cs_item_sk is not null and cs_bill_cdemo_sk is not null) and cs_bill_hdemo_sk is not null) and cs_sold_date_sk is not null) and cs_ship_date_sk is not null) (type: boolean) + Statistics: Num rows: 4 Data size: 128 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_item_sk (type: int) + sort order: + + Map-reduce partition columns: cs_item_sk (type: int) + Statistics: Num rows: 4 Data size: 128 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_date_sk (type: int), cs_ship_date_sk (type: int), cs_bill_cdemo_sk (type: int), cs_bill_hdemo_sk (type: int), cs_promo_sk (type: int), cs_order_number (type: int), cs_quantity (type: int) + TableScan + alias: inventory + Statistics: Num rows: 147 Data size: 2364 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((inv_item_sk is not null and inv_warehouse_sk is not null) and inv_date_sk is not null) (type: boolean) + Statistics: Num rows: 19 Data size: 305 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: inv_item_sk (type: int) + sort order: + + Map-reduce partition columns: inv_item_sk (type: int) + Statistics: Num rows: 19 Data size: 305 Basic stats: COMPLETE Column stats: NONE + value expressions: inv_date_sk (type: int), inv_warehouse_sk (type: int), inv_quantity_on_hand (type: int) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_desc (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + Inner Join 0 to 2 + keys: + 0 cs_item_sk (type: int) + 1 inv_item_sk (type: int) + 2 i_item_sk (type: int) + outputColumnNames: _col0, _col2, _col4, _col5, _col15, _col16, _col17, _col18, _col37, _col39, _col40, _col48 + Statistics: Num rows: 41 Data size: 671 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col39 (type: int) + sort order: + + Map-reduce partition columns: _col39 (type: int) + Statistics: Num rows: 41 Data size: 671 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col4 (type: int), _col5 (type: int), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col18 (type: int), _col37 (type: int), _col40 (type: int), _col48 (type: string) + TableScan + alias: warehouse + Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: w_warehouse_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: w_warehouse_sk (type: int) + sort order: + + Map-reduce partition columns: w_warehouse_sk (type: int) + Statistics: Num rows: 1 Data size: 119 Basic stats: COMPLETE Column stats: NONE + value expressions: w_warehouse_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col39 (type: int) + 1 w_warehouse_sk (type: int) + outputColumnNames: _col0, _col2, _col4, _col5, _col15, _col16, _col17, _col18, _col37, _col40, _col48, _col71 + Statistics: Num rows: 45 Data size: 738 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col4 (type: int) + sort order: + + Map-reduce partition columns: _col4 (type: int) + Statistics: Num rows: 45 Data size: 738 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col5 (type: int), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col18 (type: int), _col37 (type: int), _col40 (type: int), _col48 (type: string), _col71 (type: string) + TableScan + alias: customer_demographics + Statistics: Num rows: 170 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (cd_demo_sk is not null and (cd_marital_status = 'M')) (type: boolean) + Statistics: Num rows: 42 Data size: 210 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 42 Data size: 210 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col4 (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col0, _col2, _col5, _col15, _col16, _col17, _col18, _col37, _col40, _col48, _col71 + Statistics: Num rows: 49 Data size: 811 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col5 (type: int) + sort order: + + Map-reduce partition columns: _col5 (type: int) + Statistics: Num rows: 49 Data size: 811 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col18 (type: int), _col37 (type: int), _col40 (type: int), _col48 (type: string), _col71 (type: string) + TableScan + alias: household_demographics + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and (hd_buy_potential = '1001-5000')) (type: boolean) + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col5 (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col0, _col2, _col15, _col16, _col17, _col18, _col37, _col40, _col48, _col71 + Statistics: Num rows: 53 Data size: 892 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 53 Data size: 892 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col18 (type: int), _col37 (type: int), _col40 (type: int), _col48 (type: string), _col71 (type: string) + TableScan + alias: d1 + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 2001)) (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string), d_week_seq (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col2, _col15, _col16, _col17, _col18, _col37, _col40, _col48, _col71, _col108, _col110 + Statistics: Num rows: 58 Data size: 981 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col37 (type: int) + sort order: + + Map-reduce partition columns: _col37 (type: int) + Statistics: Num rows: 58 Data size: 981 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col18 (type: int), _col40 (type: int), _col48 (type: string), _col71 (type: string), _col108 (type: string), _col110 (type: int) + TableScan + alias: d2 + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: d_date_sk is not null (type: boolean) + Statistics: Num rows: 9 Data size: 74 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 9 Data size: 74 Basic stats: COMPLETE Column stats: NONE + value expressions: d_week_seq (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col37 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col2, _col15, _col16, _col17, _col18, _col40, _col48, _col71, _col108, _col110, _col141 + Statistics: Num rows: 63 Data size: 1079 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 63 Data size: 1079 Basic stats: COMPLETE Column stats: NONE + value expressions: _col15 (type: int), _col16 (type: int), _col17 (type: int), _col18 (type: int), _col40 (type: int), _col48 (type: string), _col71 (type: string), 'M' (type: string), '1001-5000' (type: string), _col108 (type: string), _col110 (type: int), 2001 (type: int), _col141 (type: int) + TableScan + alias: d3 + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: d_date_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col15, _col16, _col17, _col18, _col40, _col48, _col71, _col88, _col100, _col108, _col110, _col112, _col141, _col170 + Statistics: Num rows: 69 Data size: 1186 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col16 (type: int) + sort order: + + Map-reduce partition columns: _col16 (type: int) + Statistics: Num rows: 69 Data size: 1186 Basic stats: COMPLETE Column stats: NONE + value expressions: _col15 (type: int), _col17 (type: int), _col18 (type: int), _col40 (type: int), _col48 (type: string), _col71 (type: string), _col88 (type: string), _col100 (type: string), _col108 (type: string), _col110 (type: int), _col112 (type: int), _col141 (type: int), _col170 (type: string) + TableScan + alias: promotion + Statistics: Num rows: 29 Data size: 117 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: p_promo_sk (type: int) + sort order: + + Map-reduce partition columns: p_promo_sk (type: int) + Statistics: Num rows: 29 Data size: 117 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + keys: + 0 _col16 (type: int) + 1 p_promo_sk (type: int) + outputColumnNames: _col15, _col17, _col18, _col40, _col48, _col71, _col88, _col100, _col108, _col110, _col112, _col141, _col170, _col199 + Statistics: Num rows: 75 Data size: 1304 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-9 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col15 (type: int), _col17 (type: int) + sort order: ++ + Map-reduce partition columns: _col15 (type: int), _col17 (type: int) + Statistics: Num rows: 75 Data size: 1304 Basic stats: COMPLETE Column stats: NONE + value expressions: _col18 (type: int), _col40 (type: int), _col48 (type: string), _col71 (type: string), _col88 (type: string), _col100 (type: string), _col108 (type: string), _col110 (type: int), _col112 (type: int), _col141 (type: int), _col170 (type: string), _col199 (type: int) + TableScan + alias: catalog_returns + Statistics: Num rows: 36 Data size: 288 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cr_item_sk (type: int), cr_order_number (type: int) + sort order: ++ + Map-reduce partition columns: cr_item_sk (type: int), cr_order_number (type: int) + Statistics: Num rows: 36 Data size: 288 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + filter predicates: + 0 {(VALUE._col108 = VALUE._col139)} + 1 + keys: + 0 _col15 (type: int), _col17 (type: int) + 1 cr_item_sk (type: int), cr_order_number (type: int) + outputColumnNames: _col18, _col40, _col48, _col71, _col88, _col100, _col108, _col110, _col112, _col141, _col170, _col199 + Statistics: Num rows: 82 Data size: 1434 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((((_col110 = _col141) and (_col40 < _col18)) and (_col170 > (_col108 + 5))) and (_col100 = '1001-5000')) and (_col112 = 2001)) and (_col100 = '1001-5000')) and (_col88 = 'M')) and (_col112 = 2001)) (type: boolean) + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col48 (type: string), _col71 (type: string), _col110 (type: int), _col199 (type: int) + outputColumnNames: _col48, _col71, _col110, _col199 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count(CASE WHEN (_col199 is null) THEN (1) ELSE (0) END), count(CASE WHEN (_col199 is not null) THEN (1) ELSE (0) END), count() + keys: _col48 (type: string), _col71 (type: string), _col110 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-10 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: int) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: int) + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: bigint), _col4 (type: bigint), _col5 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0), count(VALUE._col1), count(VALUE._col2) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-11 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col5 (type: bigint), _col0 (type: string), _col1 (type: string), _col2 (type: int) + sort order: -+++ + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: bigint), _col4 (type: bigint) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: int), VALUE._col0 (type: bigint), VALUE._col1 (type: bigint), KEY.reducesinkkey0 (type: bigint) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query73.q.out b/ql/src/test/results/clientpositive/perf/query73.q.out new file mode 100644 index 0000000..f515b2e --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query73.q.out @@ -0,0 +1,246 @@ +PREHOOK: query: explain select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '5001-10000') and household_demographics.hd_vehicle_count > 0 and case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end > 1 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_county in ('Kittitas County','Adams County','Richland County','Furnas County') group by ss_ticket_number,ss_customer_sk) dj,customer where dj.ss_customer_sk = customer.c_customer_sk and cnt between 1 and 5 order by cnt desc +PREHOOK: type: QUERY +POSTHOOK: query: explain select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '5001-10000') and household_demographics.hd_vehicle_count > 0 and case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end > 1 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_county in ('Kittitas County','Adams County','Richland County','Furnas County') group by ss_ticket_number,ss_customer_sk) dj,customer where dj.ss_customer_sk = customer.c_customer_sk and cnt between 1 and 5 order by cnt desc +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 203 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_customer_sk is not null) (type: boolean) + Statistics: Num rows: 13 Data size: 260 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 13 Data size: 260 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_customer_sk (type: int), ss_hdemo_sk (type: int), ss_store_sk (type: int), ss_ticket_number (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and d_dom BETWEEN 1 AND 2) and (d_year) IN (1998, 1999, 2000)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int), d_dom (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col7, _col9, _col26, _col32, _col35 + Statistics: Num rows: 14 Data size: 286 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 14 Data size: 286 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col5 (type: int), _col9 (type: int), _col26 (type: int), _col32 (type: int), _col35 (type: int) + TableScan + alias: store + Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (s_store_sk is not null and (s_county) IN ('Kittitas County', 'Adams County', 'Richland County', 'Furnas County')) (type: boolean) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + value expressions: s_county (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col7, _col9, _col26, _col32, _col35, _col57, _col80 + Statistics: Num rows: 15 Data size: 314 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col5 (type: int) + sort order: + + Map-reduce partition columns: _col5 (type: int) + Statistics: Num rows: 15 Data size: 314 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col7 (type: int), _col9 (type: int), _col26 (type: int), _col32 (type: int), _col35 (type: int), _col57 (type: int), _col80 (type: string) + TableScan + alias: household_demographics + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((hd_demo_sk is not null and ((hd_buy_potential = '1001-5000') or (hd_buy_potential = '5001-10000'))) and (hd_vehicle_count > 0)) and (CASE WHEN ((hd_vehicle_count > 0)) THEN ((hd_dep_count / hd_vehicle_count)) ELSE (null) END > 1)) (type: boolean) + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + value expressions: hd_buy_potential (type: string), hd_dep_count (type: int), hd_vehicle_count (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col5 (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col7, _col9, _col26, _col32, _col35, _col57, _col80, _col89, _col91, _col92, _col93 + Statistics: Num rows: 16 Data size: 345 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((((((_col0 = _col26) and (_col7 = _col57)) and (_col5 = _col89)) and _col35 BETWEEN 1 AND 2) and ((_col91 = '1001-5000') or (_col91 = '5001-10000'))) and (_col93 > 0)) and (CASE WHEN ((_col93 > 0)) THEN ((_col92 / _col93)) ELSE (null) END > 1)) and (_col32) IN (1998, 1999, 2000)) and (_col80) IN ('Kittitas County', 'Adams County', 'Richland County', 'Furnas County')) (type: boolean) + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col9 (type: int), _col3 (type: int) + outputColumnNames: _col9, _col3 + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count() + keys: _col9 (type: int), _col3 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0) + keys: KEY._col0 (type: int), KEY._col1 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: _col2 BETWEEN 1 AND 5 (type: boolean) + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int) + sort order: + + Map-reduce partition columns: _col1 (type: int) + Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: bigint) + TableScan + alias: customer + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: c_customer_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + value expressions: c_salutation (type: string), c_first_name (type: string), c_last_name (type: string), c_preferred_cust_flag (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col10, _col11, _col12, _col13 + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col1 = _col3) and _col2 BETWEEN 1 AND 5) (type: boolean) + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col12 (type: string), _col11 (type: string), _col10 (type: string), _col13 (type: string), _col0 (type: int), _col2 (type: bigint) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col5 (type: bigint) + sort order: - + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: string), VALUE._col1 (type: string), VALUE._col2 (type: string), VALUE._col3 (type: string), VALUE._col4 (type: int), KEY.reducesinkkey0 (type: bigint) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 23 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query75.q.out b/ql/src/test/results/clientpositive/perf/query75.q.out new file mode 100644 index 0000000..2bfa331 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query75.q.out @@ -0,0 +1,945 @@ +PREHOOK: query: explain WITH all_sales AS ( SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,SUM(sales_cnt) AS sales_cnt ,SUM(sales_amt) AS sales_amt FROM (SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,cs_quantity - COALESCE(cr_return_quantity,0) AS sales_cnt ,cs_ext_sales_price - COALESCE(cr_return_amount,0.0) AS sales_amt FROM catalog_sales JOIN item ON i_item_sk=cs_item_sk JOIN date_dim ON d_date_sk=cs_sold_date_sk LEFT JOIN catalog_returns ON (cs_order_number=cr_order_number AND cs_item_sk=cr_item_sk) WHERE i_category='Sports' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ss_quantity - COALESCE(sr_return_quantity,0) AS sales_cnt ,ss_ext_sales_price - COALESCE(sr_return_amt,0.0) AS sales_amt FROM store_sales JOIN item ON i_item_sk=ss_item_sk JOIN date_dim ON d_date_sk=ss_sold_date_sk LEFT JOIN store_returns ON (ss_ticket_number=sr_ticket_number AND ss_item_sk=sr_item_sk) WHERE i_category='Sports' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ws_quantity - COALESCE(wr_return_quantity,0) AS sales_cnt ,ws_ext_sales_price - COALESCE(wr_return_amt,0.0) AS sales_amt FROM web_sales JOIN item ON i_item_sk=ws_item_sk JOIN date_dim ON d_date_sk=ws_sold_date_sk LEFT JOIN web_returns ON (ws_order_number=wr_order_number AND ws_item_sk=wr_item_sk) WHERE i_category='Sports') sales_detail GROUP BY d_year, i_brand_id, i_class_id, i_category_id, i_manufact_id) SELECT prev_yr.d_year AS prev_year ,curr_yr.d_year AS year ,curr_yr.i_brand_id ,curr_yr.i_class_id ,curr_yr.i_category_id ,curr_yr.i_manufact_id ,prev_yr.sales_cnt AS prev_yr_cnt ,curr_yr.sales_cnt AS curr_yr_cnt ,curr_yr.sales_cnt-prev_yr.sales_cnt AS sales_cnt_diff ,curr_yr.sales_amt-prev_yr.sales_amt AS sales_amt_diff FROM all_sales curr_yr, all_sales prev_yr WHERE curr_yr.i_brand_id=prev_yr.i_brand_id AND curr_yr.i_class_id=prev_yr.i_class_id AND curr_yr.i_category_id=prev_yr.i_category_id AND curr_yr.i_manufact_id=prev_yr.i_manufact_id AND curr_yr.d_year=2002 AND prev_yr.d_year=2002-1 AND CAST(curr_yr.sales_cnt AS DECIMAL(17,2))/CAST(prev_yr.sales_cnt AS DECIMAL(17,2))<0.9 ORDER BY sales_cnt_diff limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain WITH all_sales AS ( SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,SUM(sales_cnt) AS sales_cnt ,SUM(sales_amt) AS sales_amt FROM (SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,cs_quantity - COALESCE(cr_return_quantity,0) AS sales_cnt ,cs_ext_sales_price - COALESCE(cr_return_amount,0.0) AS sales_amt FROM catalog_sales JOIN item ON i_item_sk=cs_item_sk JOIN date_dim ON d_date_sk=cs_sold_date_sk LEFT JOIN catalog_returns ON (cs_order_number=cr_order_number AND cs_item_sk=cr_item_sk) WHERE i_category='Sports' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ss_quantity - COALESCE(sr_return_quantity,0) AS sales_cnt ,ss_ext_sales_price - COALESCE(sr_return_amt,0.0) AS sales_amt FROM store_sales JOIN item ON i_item_sk=ss_item_sk JOIN date_dim ON d_date_sk=ss_sold_date_sk LEFT JOIN store_returns ON (ss_ticket_number=sr_ticket_number AND ss_item_sk=sr_item_sk) WHERE i_category='Sports' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ws_quantity - COALESCE(wr_return_quantity,0) AS sales_cnt ,ws_ext_sales_price - COALESCE(wr_return_amt,0.0) AS sales_amt FROM web_sales JOIN item ON i_item_sk=ws_item_sk JOIN date_dim ON d_date_sk=ws_sold_date_sk LEFT JOIN web_returns ON (ws_order_number=wr_order_number AND ws_item_sk=wr_item_sk) WHERE i_category='Sports') sales_detail GROUP BY d_year, i_brand_id, i_class_id, i_category_id, i_manufact_id) SELECT prev_yr.d_year AS prev_year ,curr_yr.d_year AS year ,curr_yr.i_brand_id ,curr_yr.i_class_id ,curr_yr.i_category_id ,curr_yr.i_manufact_id ,prev_yr.sales_cnt AS prev_yr_cnt ,curr_yr.sales_cnt AS curr_yr_cnt ,curr_yr.sales_cnt-prev_yr.sales_cnt AS sales_cnt_diff ,curr_yr.sales_amt-prev_yr.sales_amt AS sales_amt_diff FROM all_sales curr_yr, all_sales prev_yr WHERE curr_yr.i_brand_id=prev_yr.i_brand_id AND curr_yr.i_class_id=prev_yr.i_class_id AND curr_yr.i_category_id=prev_yr.i_category_id AND curr_yr.i_manufact_id=prev_yr.i_manufact_id AND curr_yr.d_year=2002 AND prev_yr.d_year=2002-1 AND CAST(curr_yr.sales_cnt AS DECIMAL(17,2))/CAST(prev_yr.sales_cnt AS DECIMAL(17,2))<0.9 ORDER BY sales_cnt_diff limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3, Stage-12, Stage-18 + Stage-5 depends on stages: Stage-4, Stage-25 + Stage-6 depends on stages: Stage-5 + Stage-10 is a root stage + Stage-11 depends on stages: Stage-10 + Stage-12 depends on stages: Stage-11 + Stage-16 is a root stage + Stage-17 depends on stages: Stage-16 + Stage-18 depends on stages: Stage-17 + Stage-22 is a root stage + Stage-23 depends on stages: Stage-22 + Stage-24 depends on stages: Stage-23 + Stage-25 depends on stages: Stage-24, Stage-31, Stage-37 + Stage-29 is a root stage + Stage-30 depends on stages: Stage-29 + Stage-31 depends on stages: Stage-30 + Stage-35 is a root stage + Stage-36 depends on stages: Stage-35 + Stage-37 depends on stages: Stage-36 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 24 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (cs_item_sk is not null and cs_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 6 Data size: 780 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_item_sk (type: int) + sort order: + + Map-reduce partition columns: cs_item_sk (type: int) + Statistics: Num rows: 6 Data size: 780 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_date_sk (type: int), cs_order_number (type: int), cs_quantity (type: int), cs_ext_sales_price (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 7 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((i_item_sk is not null and (i_category = 'Sports')) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE + value expressions: i_brand_id (type: int), i_class_id (type: int), i_category_id (type: int), i_manufact_id (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col15, _col17, _col18, _col23, _col44, _col46, _col48, _col50 + Statistics: Num rows: 6 Data size: 858 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 6 Data size: 858 Basic stats: COMPLETE Column stats: NONE + value expressions: _col15 (type: int), _col17 (type: int), _col18 (type: int), _col23 (type: decimal(7,2)), _col44 (type: int), _col46 (type: int), _col48 (type: int), _col50 (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 2002)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + value expressions: 2002 (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col15, _col17, _col18, _col23, _col44, _col46, _col48, _col50, _col68 + Statistics: Num rows: 6 Data size: 943 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col17 (type: int), _col15 (type: int) + sort order: ++ + Map-reduce partition columns: _col17 (type: int), _col15 (type: int) + Statistics: Num rows: 6 Data size: 943 Basic stats: COMPLETE Column stats: NONE + value expressions: _col18 (type: int), _col23 (type: decimal(7,2)), _col44 (type: int), _col46 (type: int), _col48 (type: int), _col50 (type: int), _col68 (type: int) + TableScan + alias: catalog_returns + Statistics: Num rows: 2 Data size: 288 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cr_order_number (type: int), cr_item_sk (type: int) + sort order: ++ + Map-reduce partition columns: cr_order_number (type: int), cr_item_sk (type: int) + Statistics: Num rows: 2 Data size: 288 Basic stats: COMPLETE Column stats: NONE + value expressions: cr_return_quantity (type: int), cr_return_amount (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + keys: + 0 _col17 (type: int), _col15 (type: int) + 1 cr_order_number (type: int), cr_item_sk (type: int) + outputColumnNames: _col18, _col23, _col44, _col46, _col48, _col50, _col68, _col110, _col111 + Statistics: Num rows: 6 Data size: 1037 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col68 (type: int), _col44 (type: int), _col46 (type: int), _col48 (type: int), _col50 (type: int), (_col18 - COALESCE(_col110,0)) (type: int), (_col23 - COALESCE(_col111,0.0)) (type: double) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 6 Data size: 1037 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Union + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col5), sum(_col6) + keys: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + sort order: +++++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: bigint), _col6 (type: double) + TableScan + Union + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col5), sum(_col6) + keys: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + sort order: +++++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: bigint), _col6 (type: double) + TableScan + Union + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col5), sum(_col6) + keys: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + sort order: +++++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: bigint), _col6 (type: double) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1) + keys: KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: int), KEY._col4 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 9 Data size: 1236 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + sort order: ++++ + Map-reduce partition columns: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + Statistics: Num rows: 9 Data size: 1236 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col5 (type: bigint), _col6 (type: double) + TableScan + Reduce Output Operator + key expressions: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + sort order: ++++ + Map-reduce partition columns: _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + Statistics: Num rows: 9 Data size: 1236 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col5 (type: bigint), _col6 (type: double) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + 1 _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13 + Statistics: Num rows: 9 Data size: 1359 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((((_col1 = _col8) and (_col2 = _col9)) and (_col3 = _col10)) and (_col4 = _col11)) and (_col0 = 2002)) and (_col7 = 2001)) and ((CAST( _col5 AS decimal(17,2)) / CAST( _col12 AS decimal(17,2))) < 0.9)) (type: boolean) + Statistics: Num rows: 1 Data size: 151 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: 2001 (type: int), 2002 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col12 (type: bigint), _col5 (type: bigint), (_col5 - _col12) (type: bigint), (_col6 - _col13) (type: double) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 + Statistics: Num rows: 1 Data size: 151 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col8 (type: bigint) + sort order: + + Statistics: Num rows: 1 Data size: 151 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: bigint), _col7 (type: bigint), _col9 (type: double) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: int), VALUE._col1 (type: int), VALUE._col2 (type: int), VALUE._col3 (type: int), VALUE._col4 (type: int), VALUE._col5 (type: int), VALUE._col6 (type: bigint), VALUE._col7 (type: bigint), KEY.reducesinkkey0 (type: bigint), VALUE._col8 (type: double) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 + Statistics: Num rows: 1 Data size: 151 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 151 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 151 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-10 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 31 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_item_sk is not null and ss_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 8 Data size: 1050 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_item_sk (type: int) + sort order: + + Map-reduce partition columns: ss_item_sk (type: int) + Statistics: Num rows: 8 Data size: 1050 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_ticket_number (type: int), ss_quantity (type: int), ss_ext_sales_price (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 7 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((i_item_sk is not null and (i_category = 'Sports')) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE + value expressions: i_brand_id (type: int), i_class_id (type: int), i_category_id (type: int), i_manufact_id (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col2, _col9, _col10, _col15, _col33, _col35, _col37, _col39 + Statistics: Num rows: 8 Data size: 1155 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-11 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 8 Data size: 1155 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col9 (type: int), _col10 (type: int), _col15 (type: decimal(7,2)), _col33 (type: int), _col35 (type: int), _col37 (type: int), _col39 (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 2002)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + value expressions: 2002 (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col2, _col9, _col10, _col15, _col33, _col35, _col37, _col39, _col57 + Statistics: Num rows: 8 Data size: 1270 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-12 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col9 (type: int), _col2 (type: int) + sort order: ++ + Map-reduce partition columns: _col9 (type: int), _col2 (type: int) + Statistics: Num rows: 8 Data size: 1270 Basic stats: COMPLETE Column stats: NONE + value expressions: _col10 (type: int), _col15 (type: decimal(7,2)), _col33 (type: int), _col35 (type: int), _col37 (type: int), _col39 (type: int), _col57 (type: int) + TableScan + alias: store_returns + Statistics: Num rows: 2 Data size: 338 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: sr_ticket_number (type: int), sr_item_sk (type: int) + sort order: ++ + Map-reduce partition columns: sr_ticket_number (type: int), sr_item_sk (type: int) + Statistics: Num rows: 2 Data size: 338 Basic stats: COMPLETE Column stats: NONE + value expressions: sr_return_quantity (type: int), sr_return_amt (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + keys: + 0 _col9 (type: int), _col2 (type: int) + 1 sr_ticket_number (type: int), sr_item_sk (type: int) + outputColumnNames: _col10, _col15, _col33, _col35, _col37, _col39, _col57, _col92, _col93 + Statistics: Num rows: 8 Data size: 1397 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col57 (type: int), _col33 (type: int), _col35 (type: int), _col37 (type: int), _col39 (type: int), (_col10 - COALESCE(_col92,0)) (type: int), (_col15 - COALESCE(_col93,0.0)) (type: double) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 8 Data size: 1397 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-16 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 12 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ws_item_sk is not null and ws_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 3 Data size: 409 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_item_sk (type: int) + sort order: + + Map-reduce partition columns: ws_item_sk (type: int) + Statistics: Num rows: 3 Data size: 409 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_sold_date_sk (type: int), ws_order_number (type: int), ws_quantity (type: int), ws_ext_sales_price (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 7 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((i_item_sk is not null and (i_category = 'Sports')) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE + value expressions: i_brand_id (type: int), i_class_id (type: int), i_category_id (type: int), i_manufact_id (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col3, _col17, _col18, _col23, _col44, _col46, _col48, _col50 + Statistics: Num rows: 3 Data size: 449 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-17 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 3 Data size: 449 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: int), _col17 (type: int), _col18 (type: int), _col23 (type: decimal(7,2)), _col44 (type: int), _col46 (type: int), _col48 (type: int), _col50 (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 2002)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + value expressions: 2002 (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col3, _col17, _col18, _col23, _col44, _col46, _col48, _col50, _col68 + Statistics: Num rows: 4 Data size: 35 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-18 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col17 (type: int), _col3 (type: int) + sort order: ++ + Map-reduce partition columns: _col17 (type: int), _col3 (type: int) + Statistics: Num rows: 4 Data size: 35 Basic stats: COMPLETE Column stats: NONE + value expressions: _col18 (type: int), _col23 (type: decimal(7,2)), _col44 (type: int), _col46 (type: int), _col48 (type: int), _col50 (type: int), _col68 (type: int) + TableScan + alias: web_returns + Statistics: Num rows: 1 Data size: 137 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: wr_order_number (type: int), wr_item_sk (type: int) + sort order: ++ + Map-reduce partition columns: wr_order_number (type: int), wr_item_sk (type: int) + Statistics: Num rows: 1 Data size: 137 Basic stats: COMPLETE Column stats: NONE + value expressions: wr_return_quantity (type: int), wr_return_amt (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + keys: + 0 _col17 (type: int), _col3 (type: int) + 1 wr_order_number (type: int), wr_item_sk (type: int) + outputColumnNames: _col18, _col23, _col44, _col46, _col48, _col50, _col68, _col107, _col108 + Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col68 (type: int), _col44 (type: int), _col46 (type: int), _col48 (type: int), _col50 (type: int), (_col18 - COALESCE(_col107,0)) (type: int), (_col23 - COALESCE(_col108,0.0)) (type: double) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-22 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 24 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (cs_item_sk is not null and cs_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 6 Data size: 780 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_item_sk (type: int) + sort order: + + Map-reduce partition columns: cs_item_sk (type: int) + Statistics: Num rows: 6 Data size: 780 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_date_sk (type: int), cs_order_number (type: int), cs_quantity (type: int), cs_ext_sales_price (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 7 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((i_item_sk is not null and (i_category = 'Sports')) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE + value expressions: i_brand_id (type: int), i_class_id (type: int), i_category_id (type: int), i_manufact_id (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col15, _col17, _col18, _col23, _col44, _col46, _col48, _col50 + Statistics: Num rows: 6 Data size: 858 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-23 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 6 Data size: 858 Basic stats: COMPLETE Column stats: NONE + value expressions: _col15 (type: int), _col17 (type: int), _col18 (type: int), _col23 (type: decimal(7,2)), _col44 (type: int), _col46 (type: int), _col48 (type: int), _col50 (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 2001)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + value expressions: 2001 (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col15, _col17, _col18, _col23, _col44, _col46, _col48, _col50, _col68 + Statistics: Num rows: 6 Data size: 943 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-24 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col17 (type: int), _col15 (type: int) + sort order: ++ + Map-reduce partition columns: _col17 (type: int), _col15 (type: int) + Statistics: Num rows: 6 Data size: 943 Basic stats: COMPLETE Column stats: NONE + value expressions: _col18 (type: int), _col23 (type: decimal(7,2)), _col44 (type: int), _col46 (type: int), _col48 (type: int), _col50 (type: int), _col68 (type: int) + TableScan + alias: catalog_returns + Statistics: Num rows: 2 Data size: 288 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cr_order_number (type: int), cr_item_sk (type: int) + sort order: ++ + Map-reduce partition columns: cr_order_number (type: int), cr_item_sk (type: int) + Statistics: Num rows: 2 Data size: 288 Basic stats: COMPLETE Column stats: NONE + value expressions: cr_return_quantity (type: int), cr_return_amount (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + keys: + 0 _col17 (type: int), _col15 (type: int) + 1 cr_order_number (type: int), cr_item_sk (type: int) + outputColumnNames: _col18, _col23, _col44, _col46, _col48, _col50, _col68, _col110, _col111 + Statistics: Num rows: 6 Data size: 1037 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col68 (type: int), _col44 (type: int), _col46 (type: int), _col48 (type: int), _col50 (type: int), (_col18 - COALESCE(_col110,0)) (type: int), (_col23 - COALESCE(_col111,0.0)) (type: double) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 6 Data size: 1037 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-25 + Map Reduce + Map Operator Tree: + TableScan + Union + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col5), sum(_col6) + keys: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + sort order: +++++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: bigint), _col6 (type: double) + TableScan + Union + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col5), sum(_col6) + keys: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + sort order: +++++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: bigint), _col6 (type: double) + TableScan + Union + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col5), sum(_col6) + keys: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + sort order: +++++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int) + Statistics: Num rows: 18 Data size: 2472 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: bigint), _col6 (type: double) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1) + keys: KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: int), KEY._col4 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 9 Data size: 1236 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-29 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 31 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_item_sk is not null and ss_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 8 Data size: 1050 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_item_sk (type: int) + sort order: + + Map-reduce partition columns: ss_item_sk (type: int) + Statistics: Num rows: 8 Data size: 1050 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_ticket_number (type: int), ss_quantity (type: int), ss_ext_sales_price (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 7 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((i_item_sk is not null and (i_category = 'Sports')) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE + value expressions: i_brand_id (type: int), i_class_id (type: int), i_category_id (type: int), i_manufact_id (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col2, _col9, _col10, _col15, _col33, _col35, _col37, _col39 + Statistics: Num rows: 8 Data size: 1155 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-30 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 8 Data size: 1155 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col9 (type: int), _col10 (type: int), _col15 (type: decimal(7,2)), _col33 (type: int), _col35 (type: int), _col37 (type: int), _col39 (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 2001)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + value expressions: 2001 (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col2, _col9, _col10, _col15, _col33, _col35, _col37, _col39, _col57 + Statistics: Num rows: 8 Data size: 1270 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-31 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col9 (type: int), _col2 (type: int) + sort order: ++ + Map-reduce partition columns: _col9 (type: int), _col2 (type: int) + Statistics: Num rows: 8 Data size: 1270 Basic stats: COMPLETE Column stats: NONE + value expressions: _col10 (type: int), _col15 (type: decimal(7,2)), _col33 (type: int), _col35 (type: int), _col37 (type: int), _col39 (type: int), _col57 (type: int) + TableScan + alias: store_returns + Statistics: Num rows: 2 Data size: 338 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: sr_ticket_number (type: int), sr_item_sk (type: int) + sort order: ++ + Map-reduce partition columns: sr_ticket_number (type: int), sr_item_sk (type: int) + Statistics: Num rows: 2 Data size: 338 Basic stats: COMPLETE Column stats: NONE + value expressions: sr_return_quantity (type: int), sr_return_amt (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + keys: + 0 _col9 (type: int), _col2 (type: int) + 1 sr_ticket_number (type: int), sr_item_sk (type: int) + outputColumnNames: _col10, _col15, _col33, _col35, _col37, _col39, _col57, _col92, _col93 + Statistics: Num rows: 8 Data size: 1397 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col57 (type: int), _col33 (type: int), _col35 (type: int), _col37 (type: int), _col39 (type: int), (_col10 - COALESCE(_col92,0)) (type: int), (_col15 - COALESCE(_col93,0.0)) (type: double) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 8 Data size: 1397 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-35 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 12 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ws_item_sk is not null and ws_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 3 Data size: 409 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_item_sk (type: int) + sort order: + + Map-reduce partition columns: ws_item_sk (type: int) + Statistics: Num rows: 3 Data size: 409 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_sold_date_sk (type: int), ws_order_number (type: int), ws_quantity (type: int), ws_ext_sales_price (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 7 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((i_item_sk is not null and (i_category = 'Sports')) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: NONE + value expressions: i_brand_id (type: int), i_class_id (type: int), i_category_id (type: int), i_manufact_id (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col3, _col17, _col18, _col23, _col44, _col46, _col48, _col50 + Statistics: Num rows: 3 Data size: 449 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-36 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 3 Data size: 449 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: int), _col17 (type: int), _col18 (type: int), _col23 (type: decimal(7,2)), _col44 (type: int), _col46 (type: int), _col48 (type: int), _col50 (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 2001)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + value expressions: 2001 (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col3, _col17, _col18, _col23, _col44, _col46, _col48, _col50, _col68 + Statistics: Num rows: 4 Data size: 35 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-37 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col17 (type: int), _col3 (type: int) + sort order: ++ + Map-reduce partition columns: _col17 (type: int), _col3 (type: int) + Statistics: Num rows: 4 Data size: 35 Basic stats: COMPLETE Column stats: NONE + value expressions: _col18 (type: int), _col23 (type: decimal(7,2)), _col44 (type: int), _col46 (type: int), _col48 (type: int), _col50 (type: int), _col68 (type: int) + TableScan + alias: web_returns + Statistics: Num rows: 1 Data size: 137 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: wr_order_number (type: int), wr_item_sk (type: int) + sort order: ++ + Map-reduce partition columns: wr_order_number (type: int), wr_item_sk (type: int) + Statistics: Num rows: 1 Data size: 137 Basic stats: COMPLETE Column stats: NONE + value expressions: wr_return_quantity (type: int), wr_return_amt (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + keys: + 0 _col17 (type: int), _col3 (type: int) + 1 wr_order_number (type: int), wr_item_sk (type: int) + outputColumnNames: _col18, _col23, _col44, _col46, _col48, _col50, _col68, _col107, _col108 + Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col68 (type: int), _col44 (type: int), _col46 (type: int), _col48 (type: int), _col50 (type: int), (_col18 - COALESCE(_col107,0)) (type: int), (_col23 - COALESCE(_col108,0.0)) (type: double) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 4 Data size: 38 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query76.q.out b/ql/src/test/results/clientpositive/perf/query76.q.out new file mode 100644 index 0000000..3cbf360 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query76.q.out @@ -0,0 +1,373 @@ +PREHOOK: query: explain select channel, col_name, d_year, d_qoy, i_category, COUNT(*) sales_cnt, SUM(ext_sales_price) sales_amt FROM ( SELECT 'store' as channel, 'ss_addr_sk' col_name, d_year, d_qoy, i_category, ss_ext_sales_price ext_sales_price FROM store_sales, item, date_dim WHERE ss_addr_sk IS NULL AND store_sales.ss_sold_date_sk=date_dim.d_date_sk AND store_sales.ss_item_sk=item.i_item_sk UNION ALL SELECT 'web' as channel, 'ws_web_page_sk' col_name, d_year, d_qoy, i_category, ws_ext_sales_price ext_sales_price FROM web_sales, item, date_dim WHERE ws_web_page_sk IS NULL AND web_sales.ws_sold_date_sk=date_dim.d_date_sk AND web_sales.ws_item_sk=item.i_item_sk UNION ALL SELECT 'catalog' as channel, 'cs_warehouse_sk' col_name, d_year, d_qoy, i_category, cs_ext_sales_price ext_sales_price FROM catalog_sales, item, date_dim WHERE cs_warehouse_sk IS NULL AND catalog_sales.cs_sold_date_sk=date_dim.d_date_sk AND catalog_sales.cs_item_sk=item.i_item_sk) foo GROUP BY channel, col_name, d_year, d_qoy, i_category ORDER BY channel, col_name, d_year, d_qoy, i_category limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select channel, col_name, d_year, d_qoy, i_category, COUNT(*) sales_cnt, SUM(ext_sales_price) sales_amt FROM ( SELECT 'store' as channel, 'ss_addr_sk' col_name, d_year, d_qoy, i_category, ss_ext_sales_price ext_sales_price FROM store_sales, item, date_dim WHERE ss_addr_sk IS NULL AND store_sales.ss_sold_date_sk=date_dim.d_date_sk AND store_sales.ss_item_sk=item.i_item_sk UNION ALL SELECT 'web' as channel, 'ws_web_page_sk' col_name, d_year, d_qoy, i_category, ws_ext_sales_price ext_sales_price FROM web_sales, item, date_dim WHERE ws_web_page_sk IS NULL AND web_sales.ws_sold_date_sk=date_dim.d_date_sk AND web_sales.ws_item_sk=item.i_item_sk UNION ALL SELECT 'catalog' as channel, 'cs_warehouse_sk' col_name, d_year, d_qoy, i_category, cs_ext_sales_price ext_sales_price FROM catalog_sales, item, date_dim WHERE cs_warehouse_sk IS NULL AND catalog_sales.cs_sold_date_sk=date_dim.d_date_sk AND catalog_sales.cs_item_sk=item.i_item_sk) foo GROUP BY channel, col_name, d_year, d_qoy, i_category ORDER BY channel, col_name, d_year, d_qoy, i_category limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2, Stage-8, Stage-12 + Stage-4 depends on stages: Stage-3 + Stage-7 is a root stage + Stage-8 depends on stages: Stage-7 + Stage-11 is a root stage + Stage-12 depends on stages: Stage-11 + Stage-0 depends on stages: Stage-4 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 32 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((ss_item_sk is not null and ss_sold_date_sk is not null) and ss_addr_sk is null) (type: boolean) + Statistics: Num rows: 4 Data size: 508 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_item_sk (type: int) + sort order: + + Map-reduce partition columns: ss_item_sk (type: int) + Statistics: Num rows: 4 Data size: 508 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_ext_sales_price (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_category (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col2, _col15, _col26, _col38 + Statistics: Num rows: 4 Data size: 558 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 4 Data size: 558 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col15 (type: decimal(7,2)), _col26 (type: int), _col38 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: d_date_sk is not null (type: boolean) + Statistics: Num rows: 6 Data size: 76 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 6 Data size: 76 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int), d_qoy (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col15, _col26, _col38, _col51, _col57, _col61 + Statistics: Num rows: 6 Data size: 83 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col51) and (_col2 = _col26)) (type: boolean) + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: 'store' (type: string), 'ss_addr_sk' (type: string), _col57 (type: int), _col61 (type: int), _col38 (type: string), _col15 (type: decimal(7,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Union + Statistics: Num rows: 3 Data size: 39 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count(), sum(_col5) + keys: _col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 3 Data size: 39 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string) + sort order: +++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string) + Statistics: Num rows: 3 Data size: 39 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: bigint), _col6 (type: decimal(17,2)) + TableScan + Union + Statistics: Num rows: 3 Data size: 39 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count(), sum(_col5) + keys: _col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 3 Data size: 39 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string) + sort order: +++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string) + Statistics: Num rows: 3 Data size: 39 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: bigint), _col6 (type: decimal(17,2)) + TableScan + Union + Statistics: Num rows: 3 Data size: 39 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count(), sum(_col5) + keys: _col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 3 Data size: 39 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string) + sort order: +++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string) + Statistics: Num rows: 3 Data size: 39 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: bigint), _col6 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0), sum(VALUE._col1) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: int), KEY._col3 (type: int), KEY._col4 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string) + sort order: +++++ + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: bigint), _col6 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: int), KEY.reducesinkkey3 (type: int), KEY.reducesinkkey4 (type: string), VALUE._col0 (type: bigint), VALUE._col1 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 13 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((ws_item_sk is not null and ws_sold_date_sk is not null) and ws_web_page_sk is null) (type: boolean) + Statistics: Num rows: 2 Data size: 252 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_item_sk (type: int) + sort order: + + Map-reduce partition columns: ws_item_sk (type: int) + Statistics: Num rows: 2 Data size: 252 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_sold_date_sk (type: int), ws_ext_sales_price (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_category (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col3, _col23, _col37, _col49 + Statistics: Num rows: 2 Data size: 277 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 2 Data size: 277 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: int), _col23 (type: decimal(7,2)), _col37 (type: int), _col49 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: d_date_sk is not null (type: boolean) + Statistics: Num rows: 6 Data size: 76 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 6 Data size: 76 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int), d_qoy (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col3, _col23, _col37, _col49, _col62, _col68, _col72 + Statistics: Num rows: 6 Data size: 83 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col62) and (_col3 = _col37)) (type: boolean) + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: 'web' (type: string), 'ws_web_page_sk' (type: string), _col68 (type: int), _col72 (type: int), _col49 (type: string), _col23 (type: decimal(7,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-11 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 25 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((cs_item_sk is not null and cs_sold_date_sk is not null) and cs_warehouse_sk is null) (type: boolean) + Statistics: Num rows: 3 Data size: 374 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_item_sk (type: int) + sort order: + + Map-reduce partition columns: cs_item_sk (type: int) + Statistics: Num rows: 3 Data size: 374 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_date_sk (type: int), cs_ext_sales_price (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: i_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_category (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col15, _col23, _col37, _col49 + Statistics: Num rows: 3 Data size: 411 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-12 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 3 Data size: 411 Basic stats: COMPLETE Column stats: NONE + value expressions: _col15 (type: int), _col23 (type: decimal(7,2)), _col37 (type: int), _col49 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: d_date_sk is not null (type: boolean) + Statistics: Num rows: 6 Data size: 76 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 6 Data size: 76 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int), d_qoy (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col15, _col23, _col37, _col49, _col62, _col68, _col72 + Statistics: Num rows: 6 Data size: 83 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((_col0 = _col62) and (_col15 = _col37)) (type: boolean) + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: 'catalog' (type: string), 'cs_warehouse_sk' (type: string), _col68 (type: int), _col72 (type: int), _col49 (type: string), _col23 (type: decimal(7,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query79.q.out b/ql/src/test/results/clientpositive/perf/query79.q.out new file mode 100644 index 0000000..9c1036f --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query79.q.out @@ -0,0 +1,250 @@ +PREHOOK: query: explain select c_last_name,c_first_name,substr(s_city,1,30) sub,ss_ticket_number,amt,profit from (select ss_ticket_number ,ss_customer_sk ,store.s_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (household_demographics.hd_dep_count = 8 or household_demographics.hd_vehicle_count > 0) and date_dim.d_dow = 1 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_number_employees between 200 and 295 group by ss_ticket_number,ss_customer_sk,ss_addr_sk,store.s_city) ms,customer where ms.ss_customer_sk = customer.c_customer_sk order by c_last_name,c_first_name,sub, profit limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select c_last_name,c_first_name,substr(s_city,1,30) sub,ss_ticket_number,amt,profit from (select ss_ticket_number ,ss_customer_sk ,store.s_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (household_demographics.hd_dep_count = 8 or household_demographics.hd_vehicle_count > 0) and date_dim.d_dow = 1 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_number_employees between 200 and 295 group by ss_ticket_number,ss_customer_sk,ss_addr_sk,store.s_city) ms,customer where ms.ss_customer_sk = customer.c_customer_sk order by c_last_name,c_first_name,sub, profit limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 16 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_customer_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 254 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 1 Data size: 254 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_customer_sk (type: int), ss_hdemo_sk (type: int), ss_addr_sk (type: int), ss_store_sk (type: int), ss_ticket_number (type: int), ss_coupon_amt (type: decimal(7,2)), ss_net_profit (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_dow = 1)) and (d_year) IN (1998, 1999, 2000)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: d_year (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col6, _col7, _col9, _col19, _col22, _col26, _col32 + Statistics: Num rows: 1 Data size: 279 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 1 Data size: 279 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: int), _col9 (type: int), _col19 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col26 (type: int), _col32 (type: int) + TableScan + alias: store + Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (s_store_sk is not null and s_number_employees BETWEEN 200 AND 295) (type: boolean) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + value expressions: s_number_employees (type: int), s_city (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col6, _col7, _col9, _col19, _col22, _col26, _col32, _col57, _col63, _col79 + Statistics: Num rows: 1 Data size: 306 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col5 (type: int) + sort order: + + Map-reduce partition columns: _col5 (type: int) + Statistics: Num rows: 1 Data size: 306 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: int), _col19 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col26 (type: int), _col32 (type: int), _col57 (type: int), _col63 (type: int), _col79 (type: string) + TableScan + alias: household_demographics + Statistics: Num rows: 2 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and ((hd_dep_count = 8) or (hd_vehicle_count > 0))) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: hd_dep_count (type: int), hd_vehicle_count (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col5 (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col0, _col3, _col5, _col6, _col7, _col9, _col19, _col22, _col26, _col32, _col57, _col63, _col79, _col89, _col92, _col93 + Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((_col0 = _col26) and (_col7 = _col57)) and (_col5 = _col89)) and ((_col92 = 8) or (_col93 > 0))) and (_col32) IN (1998, 1999, 2000)) and _col63 BETWEEN 200 AND 295) (type: boolean) + Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col9 (type: int), _col3 (type: int), _col6 (type: int), _col79 (type: string), _col19 (type: decimal(7,2)), _col22 (type: decimal(7,2)) + outputColumnNames: _col9, _col3, _col6, _col79, _col19, _col22 + Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col19), sum(_col22) + keys: _col9 (type: int), _col3 (type: int), _col6 (type: int), _col79 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string) + sort order: ++++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string) + Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE Column stats: NONE + value expressions: _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1) + keys: KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: int), _col1 (type: int), _col3 (type: string), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int) + sort order: + + Map-reduce partition columns: _col1 (type: int) + Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) + TableScan + alias: customer + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: c_customer_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + value expressions: c_first_name (type: string), c_last_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col13, _col14 + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (_col1 = _col5) (type: boolean) + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col14 (type: string), _col13 (type: string), substr(_col2, 1, 30) (type: string), _col0 (type: int), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col5 (type: decimal(17,2)) + sort order: ++++ + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: int), _col4 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), VALUE._col0 (type: int), VALUE._col1 (type: decimal(17,2)), KEY.reducesinkkey3 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query80.q.out b/ql/src/test/results/clientpositive/perf/query80.q.out new file mode 100644 index 0000000..effb0d3 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query80.q.out @@ -0,0 +1,831 @@ +PREHOOK: query: explain with ssr as (select s_store_id as store_id, sum(ss_ext_sales_price) as sales, sum(coalesce(sr_return_amt, 0)) as returns, sum(ss_net_profit - coalesce(sr_net_loss, 0)) as profit from store_sales left outer join store_returns on (ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number), date_dim, store, item, promotion where ss_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and ss_store_sk = s_store_sk and ss_item_sk = i_item_sk and i_current_price > 50 and ss_promo_sk = p_promo_sk and p_channel_tv = 'N' group by s_store_id) , csr as (select cp_catalog_page_id as catalog_page_id, sum(cs_ext_sales_price) as sales, sum(coalesce(cr_return_amount, 0)) as returns, sum(cs_net_profit - coalesce(cr_net_loss, 0)) as profit from catalog_sales left outer join catalog_returns on (cs_item_sk = cr_item_sk and cs_order_number = cr_order_number), date_dim, catalog_page, item, promotion where cs_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and cs_catalog_page_sk = cp_catalog_page_sk and cs_item_sk = i_item_sk and i_current_price > 50 and cs_promo_sk = p_promo_sk and p_channel_tv = 'N' group by cp_catalog_page_id) , wsr as (select web_site_id, sum(ws_ext_sales_price) as sales, sum(coalesce(wr_return_amt, 0)) as returns, sum(ws_net_profit - coalesce(wr_net_loss, 0)) as profit from web_sales left outer join web_returns on (ws_item_sk = wr_item_sk and ws_order_number = wr_order_number), date_dim, web_site, item, promotion where ws_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and ws_web_site_sk = web_site_sk and ws_item_sk = i_item_sk and i_current_price > 50 and ws_promo_sk = p_promo_sk and p_channel_tv = 'N' group by web_site_id) select channel , id , sum(sales) as sales , sum(returns) as returns , sum(profit) as profit from (select 'store channel' as channel , concat('store', store_id) as id , sales , returns , profit from ssr union all select 'catalog channel' as channel , concat('catalog_page', catalog_page_id) as id , sales , returns , profit from csr union all select 'web channel' as channel , concat('web_site', web_site_id) as id , sales , returns , profit from wsr ) x group by channel, id with rollup order by channel ,id limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain with ssr as (select s_store_id as store_id, sum(ss_ext_sales_price) as sales, sum(coalesce(sr_return_amt, 0)) as returns, sum(ss_net_profit - coalesce(sr_net_loss, 0)) as profit from store_sales left outer join store_returns on (ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number), date_dim, store, item, promotion where ss_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and ss_store_sk = s_store_sk and ss_item_sk = i_item_sk and i_current_price > 50 and ss_promo_sk = p_promo_sk and p_channel_tv = 'N' group by s_store_id) , csr as (select cp_catalog_page_id as catalog_page_id, sum(cs_ext_sales_price) as sales, sum(coalesce(cr_return_amount, 0)) as returns, sum(cs_net_profit - coalesce(cr_net_loss, 0)) as profit from catalog_sales left outer join catalog_returns on (cs_item_sk = cr_item_sk and cs_order_number = cr_order_number), date_dim, catalog_page, item, promotion where cs_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and cs_catalog_page_sk = cp_catalog_page_sk and cs_item_sk = i_item_sk and i_current_price > 50 and cs_promo_sk = p_promo_sk and p_channel_tv = 'N' group by cp_catalog_page_id) , wsr as (select web_site_id, sum(ws_ext_sales_price) as sales, sum(coalesce(wr_return_amt, 0)) as returns, sum(ws_net_profit - coalesce(wr_net_loss, 0)) as profit from web_sales left outer join web_returns on (ws_item_sk = wr_item_sk and ws_order_number = wr_order_number), date_dim, web_site, item, promotion where ws_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and ws_web_site_sk = web_site_sk and ws_item_sk = i_item_sk and i_current_price > 50 and ws_promo_sk = p_promo_sk and p_channel_tv = 'N' group by web_site_id) select channel , id , sum(sales) as sales , sum(returns) as returns , sum(profit) as profit from (select 'store channel' as channel , concat('store', store_id) as id , sales , returns , profit from ssr union all select 'catalog channel' as channel , concat('catalog_page', catalog_page_id) as id , sales , returns , profit from csr union all select 'web channel' as channel , concat('web_site', web_site_id) as id , sales , returns , profit from wsr ) x group by channel, id with rollup order by channel ,id limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6, Stage-19, Stage-30 + Stage-8 depends on stages: Stage-7 + Stage-14 is a root stage + Stage-15 depends on stages: Stage-14 + Stage-16 depends on stages: Stage-15 + Stage-17 depends on stages: Stage-16 + Stage-18 depends on stages: Stage-17 + Stage-19 depends on stages: Stage-18 + Stage-25 is a root stage + Stage-26 depends on stages: Stage-25 + Stage-27 depends on stages: Stage-26 + Stage-28 depends on stages: Stage-27 + Stage-29 depends on stages: Stage-28 + Stage-30 depends on stages: Stage-29 + Stage-0 depends on stages: Stage-8 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 16 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_item_sk is not null) and ss_promo_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 254 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_item_sk (type: int), ss_ticket_number (type: int) + sort order: ++ + Map-reduce partition columns: ss_item_sk (type: int), ss_ticket_number (type: int) + Statistics: Num rows: 1 Data size: 254 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_store_sk (type: int), ss_promo_sk (type: int), ss_ext_sales_price (type: decimal(7,2)), ss_net_profit (type: decimal(7,2)) + TableScan + alias: store_returns + Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: sr_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: sr_item_sk (type: int), sr_ticket_number (type: int) + sort order: ++ + Map-reduce partition columns: sr_item_sk (type: int), sr_ticket_number (type: int) + Statistics: Num rows: 1 Data size: 338 Basic stats: COMPLETE Column stats: NONE + value expressions: sr_return_amt (type: decimal(7,2)), sr_net_loss (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + keys: + 0 ss_item_sk (type: int), ss_ticket_number (type: int) + 1 sr_item_sk (type: int), sr_ticket_number (type: int) + outputColumnNames: _col0, _col2, _col7, _col8, _col15, _col22, _col37, _col45 + Statistics: Num rows: 1 Data size: 279 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 1 Data size: 279 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col7 (type: int), _col8 (type: int), _col15 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col37 (type: decimal(7,2)), _col45 (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_date BETWEEN 1998-08-04 AND 1998-09-04) (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col7, _col8, _col15, _col22, _col37, _col45, _col49, _col51 + Statistics: Num rows: 1 Data size: 306 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 1 Data size: 306 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col8 (type: int), _col15 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col37 (type: decimal(7,2)), _col45 (type: decimal(7,2)), _col49 (type: int), _col51 (type: string) + TableScan + alias: store + Statistics: Num rows: 2 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: s_store_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 1 Data size: 127 Basic stats: COMPLETE Column stats: NONE + value expressions: s_store_id (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col0, _col2, _col7, _col8, _col15, _col22, _col37, _col45, _col49, _col51, _col80, _col81 + Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 1 Data size: 336 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col7 (type: int), _col8 (type: int), _col15 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col37 (type: decimal(7,2)), _col45 (type: decimal(7,2)), _col49 (type: int), _col51 (type: string), _col80 (type: int), _col81 (type: string) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and (i_current_price > 50)) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_current_price (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col2, _col7, _col8, _col15, _col22, _col37, _col45, _col49, _col51, _col80, _col81, _col112, _col117 + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col8 (type: int) + sort order: + + Map-reduce partition columns: _col8 (type: int) + Statistics: Num rows: 1 Data size: 369 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: int), _col7 (type: int), _col15 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col37 (type: decimal(7,2)), _col45 (type: decimal(7,2)), _col49 (type: int), _col51 (type: string), _col80 (type: int), _col81 (type: string), _col112 (type: int), _col117 (type: decimal(7,2)) + TableScan + alias: promotion + Statistics: Num rows: 23 Data size: 117 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (p_promo_sk is not null and (p_channel_tv = 'N')) (type: boolean) + Statistics: Num rows: 6 Data size: 30 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: p_promo_sk (type: int) + sort order: + + Map-reduce partition columns: p_promo_sk (type: int) + Statistics: Num rows: 6 Data size: 30 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col8 (type: int) + 1 p_promo_sk (type: int) + outputColumnNames: _col0, _col2, _col7, _col8, _col15, _col22, _col37, _col45, _col49, _col51, _col80, _col81, _col112, _col117, _col137 + Statistics: Num rows: 6 Data size: 33 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((_col0 = _col49) and _col51 BETWEEN 1998-08-04 AND 1998-09-04) and (_col7 = _col80)) and (_col2 = _col112)) and (_col117 > 50)) and (_col8 = _col137)) (type: boolean) + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col81 (type: string), _col15 (type: decimal(7,2)), _col37 (type: decimal(7,2)), _col22 (type: decimal(7,2)), _col45 (type: decimal(7,2)) + outputColumnNames: _col81, _col15, _col37, _col22, _col45 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col15), sum(COALESCE(_col37,0)), sum((_col22 - COALESCE(_col45,0))) + keys: _col81 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2) + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: 'store channel' (type: string), concat('store', _col0) (type: string), _col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Union + Statistics: Num rows: 3 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col2), sum(_col3), sum(_col4) + keys: _col0 (type: string), _col1 (type: string), '0' (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 9 Data size: 45 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) + Statistics: Num rows: 9 Data size: 45 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(27,2)), _col4 (type: decimal(32,2)), _col5 (type: decimal(33,2)) + TableScan + Union + Statistics: Num rows: 3 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col2), sum(_col3), sum(_col4) + keys: _col0 (type: string), _col1 (type: string), '0' (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 9 Data size: 45 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) + Statistics: Num rows: 9 Data size: 45 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(27,2)), _col4 (type: decimal(32,2)), _col5 (type: decimal(33,2)) + TableScan + Union + Statistics: Num rows: 3 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col2), sum(_col3), sum(_col4) + keys: _col0 (type: string), _col1 (type: string), '0' (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 9 Data size: 45 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) + Statistics: Num rows: 9 Data size: 45 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(27,2)), _col4 (type: decimal(32,2)), _col5 (type: decimal(33,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col3, _col4, _col5 + Statistics: Num rows: 4 Data size: 20 Basic stats: COMPLETE Column stats: NONE + pruneGroupingSetId: true + Select Operator + expressions: _col0 (type: string), _col1 (type: string), _col3 (type: decimal(27,2)), _col4 (type: decimal(32,2)), _col5 (type: decimal(33,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 4 Data size: 20 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Statistics: Num rows: 4 Data size: 20 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: decimal(27,2)), _col3 (type: decimal(32,2)), _col4 (type: decimal(33,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: decimal(27,2)), VALUE._col1 (type: decimal(32,2)), VALUE._col2 (type: decimal(33,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 4 Data size: 20 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 4 Data size: 20 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 4 Data size: 20 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-14 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 12 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((cs_sold_date_sk is not null and cs_catalog_page_sk is not null) and cs_item_sk is not null) and cs_promo_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 260 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_item_sk (type: int), cs_order_number (type: int) + sort order: ++ + Map-reduce partition columns: cs_item_sk (type: int), cs_order_number (type: int) + Statistics: Num rows: 1 Data size: 260 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_sold_date_sk (type: int), cs_catalog_page_sk (type: int), cs_promo_sk (type: int), cs_ext_sales_price (type: decimal(7,2)), cs_net_profit (type: decimal(7,2)) + TableScan + alias: catalog_returns + Statistics: Num rows: 1 Data size: 288 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cr_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 288 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cr_item_sk (type: int), cr_order_number (type: int) + sort order: ++ + Map-reduce partition columns: cr_item_sk (type: int), cr_order_number (type: int) + Statistics: Num rows: 1 Data size: 288 Basic stats: COMPLETE Column stats: NONE + value expressions: cr_return_amount (type: decimal(7,2)), cr_net_loss (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + keys: + 0 cs_item_sk (type: int), cs_order_number (type: int) + 1 cr_item_sk (type: int), cr_order_number (type: int) + outputColumnNames: _col0, _col12, _col15, _col16, _col23, _col33, _col55, _col63 + Statistics: Num rows: 1 Data size: 286 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-15 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 1 Data size: 286 Basic stats: COMPLETE Column stats: NONE + value expressions: _col12 (type: int), _col15 (type: int), _col16 (type: int), _col23 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col55 (type: decimal(7,2)), _col63 (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_date BETWEEN 1998-08-04 AND 1998-09-04) (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col12, _col15, _col16, _col23, _col33, _col55, _col63, _col67, _col69 + Statistics: Num rows: 1 Data size: 314 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-16 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col12 (type: int) + sort order: + + Map-reduce partition columns: _col12 (type: int) + Statistics: Num rows: 1 Data size: 314 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col15 (type: int), _col16 (type: int), _col23 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col55 (type: decimal(7,2)), _col63 (type: decimal(7,2)), _col67 (type: int), _col69 (type: string) + TableScan + alias: catalog_page + Statistics: Num rows: 1 Data size: 146 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cp_catalog_page_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 146 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cp_catalog_page_sk (type: int) + sort order: + + Map-reduce partition columns: cp_catalog_page_sk (type: int) + Statistics: Num rows: 1 Data size: 146 Basic stats: COMPLETE Column stats: NONE + value expressions: cp_catalog_page_id (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col12 (type: int) + 1 cp_catalog_page_sk (type: int) + outputColumnNames: _col0, _col12, _col15, _col16, _col23, _col33, _col55, _col63, _col67, _col69, _col98, _col99 + Statistics: Num rows: 1 Data size: 345 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-17 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col15 (type: int) + sort order: + + Map-reduce partition columns: _col15 (type: int) + Statistics: Num rows: 1 Data size: 345 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col12 (type: int), _col16 (type: int), _col23 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col55 (type: decimal(7,2)), _col63 (type: decimal(7,2)), _col67 (type: int), _col69 (type: string), _col98 (type: int), _col99 (type: string) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and (i_current_price > 50)) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_current_price (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col15 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col12, _col15, _col16, _col23, _col33, _col55, _col63, _col67, _col69, _col98, _col99, _col110, _col115 + Statistics: Num rows: 1 Data size: 379 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-18 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col16 (type: int) + sort order: + + Map-reduce partition columns: _col16 (type: int) + Statistics: Num rows: 1 Data size: 379 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col12 (type: int), _col15 (type: int), _col23 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col55 (type: decimal(7,2)), _col63 (type: decimal(7,2)), _col67 (type: int), _col69 (type: string), _col98 (type: int), _col99 (type: string), _col110 (type: int), _col115 (type: decimal(7,2)) + TableScan + alias: promotion + Statistics: Num rows: 23 Data size: 117 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (p_promo_sk is not null and (p_channel_tv = 'N')) (type: boolean) + Statistics: Num rows: 6 Data size: 30 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: p_promo_sk (type: int) + sort order: + + Map-reduce partition columns: p_promo_sk (type: int) + Statistics: Num rows: 6 Data size: 30 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col16 (type: int) + 1 p_promo_sk (type: int) + outputColumnNames: _col0, _col12, _col15, _col16, _col23, _col33, _col55, _col63, _col67, _col69, _col98, _col99, _col110, _col115, _col135 + Statistics: Num rows: 6 Data size: 33 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((_col0 = _col67) and _col69 BETWEEN 1998-08-04 AND 1998-09-04) and (_col12 = _col98)) and (_col15 = _col110)) and (_col115 > 50)) and (_col16 = _col135)) (type: boolean) + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col99 (type: string), _col23 (type: decimal(7,2)), _col55 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col63 (type: decimal(7,2)) + outputColumnNames: _col99, _col23, _col55, _col33, _col63 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col23), sum(COALESCE(_col55,0)), sum((_col33 - COALESCE(_col63,0))) + keys: _col99 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-19 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2) + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: 'catalog channel' (type: string), concat('catalog_page', _col0) (type: string), _col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-25 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 6 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((ws_sold_date_sk is not null and ws_web_site_sk is not null) and ws_item_sk is not null) and ws_promo_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 273 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_item_sk (type: int), ws_order_number (type: int) + sort order: ++ + Map-reduce partition columns: ws_item_sk (type: int), ws_order_number (type: int) + Statistics: Num rows: 1 Data size: 273 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_sold_date_sk (type: int), ws_web_site_sk (type: int), ws_promo_sk (type: int), ws_ext_sales_price (type: decimal(7,2)), ws_net_profit (type: decimal(7,2)) + TableScan + alias: web_returns + Statistics: Num rows: 1 Data size: 137 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: wr_item_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 137 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: wr_item_sk (type: int), wr_order_number (type: int) + sort order: ++ + Map-reduce partition columns: wr_item_sk (type: int), wr_order_number (type: int) + Statistics: Num rows: 1 Data size: 137 Basic stats: COMPLETE Column stats: NONE + value expressions: wr_return_amt (type: decimal(7,2)), wr_net_loss (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + keys: + 0 ws_item_sk (type: int), ws_order_number (type: int) + 1 wr_item_sk (type: int), wr_order_number (type: int) + outputColumnNames: _col0, _col3, _col13, _col16, _col23, _col33, _col52, _col60 + Statistics: Num rows: 1 Data size: 300 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-26 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 1 Data size: 300 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: int), _col13 (type: int), _col16 (type: int), _col23 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col52 (type: decimal(7,2)), _col60 (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_date BETWEEN 1998-08-04 AND 1998-09-04) (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col3, _col13, _col16, _col23, _col33, _col52, _col60, _col64, _col66 + Statistics: Num rows: 1 Data size: 330 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-27 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col13 (type: int) + sort order: + + Map-reduce partition columns: _col13 (type: int) + Statistics: Num rows: 1 Data size: 330 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col16 (type: int), _col23 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col52 (type: decimal(7,2)), _col60 (type: decimal(7,2)), _col64 (type: int), _col66 (type: string) + TableScan + alias: web_site + Statistics: Num rows: 3 Data size: 326 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: web_site_sk is not null (type: boolean) + Statistics: Num rows: 2 Data size: 217 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: web_site_sk (type: int) + sort order: + + Map-reduce partition columns: web_site_sk (type: int) + Statistics: Num rows: 2 Data size: 217 Basic stats: COMPLETE Column stats: NONE + value expressions: web_site_id (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col13 (type: int) + 1 web_site_sk (type: int) + outputColumnNames: _col0, _col3, _col13, _col16, _col23, _col33, _col52, _col60, _col64, _col66, _col95, _col96 + Statistics: Num rows: 2 Data size: 238 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-28 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: int) + sort order: + + Map-reduce partition columns: _col3 (type: int) + Statistics: Num rows: 2 Data size: 238 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col13 (type: int), _col16 (type: int), _col23 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col52 (type: decimal(7,2)), _col60 (type: decimal(7,2)), _col64 (type: int), _col66 (type: string), _col95 (type: int), _col96 (type: string) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and (i_current_price > 50)) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_current_price (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col3 (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col3, _col13, _col16, _col23, _col33, _col52, _col60, _col64, _col66, _col95, _col96, _col124, _col129 + Statistics: Num rows: 2 Data size: 261 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-29 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col16 (type: int) + sort order: + + Map-reduce partition columns: _col16 (type: int) + Statistics: Num rows: 2 Data size: 261 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col13 (type: int), _col23 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col52 (type: decimal(7,2)), _col60 (type: decimal(7,2)), _col64 (type: int), _col66 (type: string), _col95 (type: int), _col96 (type: string), _col124 (type: int), _col129 (type: decimal(7,2)) + TableScan + alias: promotion + Statistics: Num rows: 23 Data size: 117 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (p_promo_sk is not null and (p_channel_tv = 'N')) (type: boolean) + Statistics: Num rows: 6 Data size: 30 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: p_promo_sk (type: int) + sort order: + + Map-reduce partition columns: p_promo_sk (type: int) + Statistics: Num rows: 6 Data size: 30 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col16 (type: int) + 1 p_promo_sk (type: int) + outputColumnNames: _col0, _col3, _col13, _col16, _col23, _col33, _col52, _col60, _col64, _col66, _col95, _col96, _col124, _col129, _col149 + Statistics: Num rows: 6 Data size: 33 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((_col0 = _col64) and _col66 BETWEEN 1998-08-04 AND 1998-09-04) and (_col13 = _col95)) and (_col3 = _col124)) and (_col129 > 50)) and (_col16 = _col149)) (type: boolean) + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col96 (type: string), _col23 (type: decimal(7,2)), _col52 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col60 (type: decimal(7,2)) + outputColumnNames: _col96, _col23, _col52, _col33, _col60 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col23), sum(COALESCE(_col52,0)), sum((_col33 - COALESCE(_col60,0))) + keys: _col96 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-30 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2) + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: 'web channel' (type: string), concat('web_site', _col0) (type: string), _col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query82.q.out b/ql/src/test/results/clientpositive/perf/query82.q.out new file mode 100644 index 0000000..6432284 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query82.q.out @@ -0,0 +1,171 @@ +PREHOOK: query: explain select i_item_id ,i_item_desc ,i_current_price from item, inventory, date_dim, store_sales where i_current_price between 30 and 30+30 and inv_item_sk = i_item_sk and d_date_sk=inv_date_sk and d_date between '2002-05-30' and '2002-07-30' and i_manufact_id in (437,129,727,663) and inv_quantity_on_hand between 100 and 500 and ss_item_sk = i_item_sk group by i_item_id,i_item_desc,i_current_price order by i_item_id limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_id ,i_item_desc ,i_current_price from item, inventory, date_dim, store_sales where i_current_price between 30 and 30+30 and inv_item_sk = i_item_sk and d_date_sk=inv_date_sk and d_date between '2002-05-30' and '2002-07-30' and i_manufact_id in (437,129,727,663) and inv_quantity_on_hand between 100 and 500 and ss_item_sk = i_item_sk group by i_item_id,i_item_desc,i_current_price order by i_item_id limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-0 depends on stages: Stage-4 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((i_item_sk is not null and i_current_price BETWEEN 30 AND 60) and (i_manufact_id) IN (437, 129, 727, 663)) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string), i_item_desc (type: string), i_current_price (type: decimal(7,2)), i_manufact_id (type: int) + TableScan + alias: inventory + Statistics: Num rows: 197 Data size: 2364 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((inv_item_sk is not null and inv_date_sk is not null) and inv_quantity_on_hand BETWEEN 100 AND 500) (type: boolean) + Statistics: Num rows: 25 Data size: 300 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: inv_item_sk (type: int) + sort order: + + Map-reduce partition columns: inv_item_sk (type: int) + Statistics: Num rows: 25 Data size: 300 Basic stats: COMPLETE Column stats: NONE + value expressions: inv_date_sk (type: int), inv_quantity_on_hand (type: int) + TableScan + alias: store_sales + Statistics: Num rows: 1017 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ss_item_sk is not null (type: boolean) + Statistics: Num rows: 509 Data size: 2037 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_item_sk (type: int) + sort order: + + Map-reduce partition columns: ss_item_sk (type: int) + Statistics: Num rows: 509 Data size: 2037 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + Inner Join 0 to 2 + keys: + 0 i_item_sk (type: int) + 1 inv_item_sk (type: int) + 2 ss_item_sk (type: int) + outputColumnNames: _col0, _col1, _col4, _col5, _col13, _col25, _col26, _col28, _col34 + Statistics: Num rows: 1119 Data size: 4481 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col25 (type: int) + sort order: + + Map-reduce partition columns: _col25 (type: int) + Statistics: Num rows: 1119 Data size: 4481 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: string), _col4 (type: string), _col5 (type: decimal(7,2)), _col13 (type: int), _col26 (type: int), _col28 (type: int), _col34 (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_date BETWEEN '2002-05-30' AND '2002-07-30') (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col25 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col1, _col4, _col5, _col13, _col25, _col26, _col28, _col34, _col58, _col60 + Statistics: Num rows: 1230 Data size: 4929 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((_col5 BETWEEN 30 AND 60 and (_col26 = _col0)) and (_col58 = _col25)) and _col60 BETWEEN '2002-05-30' AND '2002-07-30') and (_col13) IN (437, 129, 727, 663)) and _col28 BETWEEN 100 AND 500) and (_col34 = _col0)) (type: boolean) + Statistics: Num rows: 9 Data size: 36 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: string), _col4 (type: string), _col5 (type: decimal(7,2)) + outputColumnNames: _col1, _col4, _col5 + Statistics: Num rows: 9 Data size: 36 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col1 (type: string), _col4 (type: string), _col5 (type: decimal(7,2)) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 9 Data size: 36 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: decimal(7,2)) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: decimal(7,2)) + Statistics: Num rows: 9 Data size: 36 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: decimal(7,2)) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string), _col2 (type: decimal(7,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), VALUE._col0 (type: string), VALUE._col1 (type: decimal(7,2)) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query84.q.out b/ql/src/test/results/clientpositive/perf/query84.q.out new file mode 100644 index 0000000..97ccd81 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query84.q.out @@ -0,0 +1,219 @@ +PREHOOK: query: explain select c_customer_id as customer_id ,concat(c_last_name, ', ', c_first_name) as customername from customer ,customer_address ,customer_demographics ,household_demographics ,income_band ,store_returns where ca_city = 'Hopewell' and customer.c_current_addr_sk = customer_address.ca_address_sk and ib_lower_bound >= 32287 and ib_upper_bound <= 32287 + 50000 and income_band.ib_income_band_sk = household_demographics.hd_income_band_sk and customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk and household_demographics.hd_demo_sk = customer.c_current_hdemo_sk and store_returns.sr_cdemo_sk = customer_demographics.cd_demo_sk order by customer_id limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select c_customer_id as customer_id ,concat(c_last_name, ', ', c_first_name) as customername from customer ,customer_address ,customer_demographics ,household_demographics ,income_band ,store_returns where ca_city = 'Hopewell' and customer.c_current_addr_sk = customer_address.ca_address_sk and ib_lower_bound >= 32287 and ib_upper_bound <= 32287 + 50000 and income_band.ib_income_band_sk = household_demographics.hd_income_band_sk and customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk and household_demographics.hd_demo_sk = customer.c_current_hdemo_sk and store_returns.sr_cdemo_sk = customer_demographics.cd_demo_sk order by customer_id limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-0 depends on stages: Stage-5 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: customer + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((c_current_addr_sk is not null and c_current_cdemo_sk is not null) and c_current_hdemo_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_current_addr_sk (type: int) + sort order: + + Map-reduce partition columns: c_current_addr_sk (type: int) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + value expressions: c_customer_id (type: string), c_current_cdemo_sk (type: int), c_current_hdemo_sk (type: int), c_first_name (type: string), c_last_name (type: string) + TableScan + alias: customer_address + Statistics: Num rows: 9 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ca_address_sk is not null and (ca_city = 'Hopewell')) (type: boolean) + Statistics: Num rows: 2 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 2 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 c_current_addr_sk (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col1, _col2, _col3, _col4, _col8, _col9, _col21 + Statistics: Num rows: 2 Data size: 26 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 2 Data size: 26 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string), _col3 (type: int), _col4 (type: int), _col8 (type: string), _col9 (type: string), _col21 (type: int) + TableScan + alias: customer_demographics + Statistics: Num rows: 212 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cd_demo_sk is not null (type: boolean) + Statistics: Num rows: 106 Data size: 425 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 106 Data size: 425 Basic stats: COMPLETE Column stats: NONE + TableScan + alias: store_returns + Statistics: Num rows: 84 Data size: 338 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: sr_cdemo_sk is not null (type: boolean) + Statistics: Num rows: 42 Data size: 169 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: sr_cdemo_sk (type: int) + sort order: + + Map-reduce partition columns: sr_cdemo_sk (type: int) + Statistics: Num rows: 42 Data size: 169 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + Inner Join 1 to 2 + keys: + 0 _col2 (type: int) + 1 cd_demo_sk (type: int) + 2 sr_cdemo_sk (type: int) + outputColumnNames: _col1, _col2, _col3, _col4, _col8, _col9, _col21, _col37, _col53 + Statistics: Num rows: 233 Data size: 935 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: int) + sort order: + + Map-reduce partition columns: _col3 (type: int) + Statistics: Num rows: 233 Data size: 935 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string), _col2 (type: int), _col4 (type: int), _col8 (type: string), _col9 (type: string), _col21 (type: int), _col37 (type: int), _col53 (type: int) + TableScan + alias: household_demographics + Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and hd_income_band_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: hd_income_band_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col3 (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col1, _col2, _col3, _col4, _col8, _col9, _col21, _col37, _col53, _col72, _col73 + Statistics: Num rows: 256 Data size: 1028 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col73 (type: int) + sort order: + + Map-reduce partition columns: _col73 (type: int) + Statistics: Num rows: 256 Data size: 1028 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col8 (type: string), _col9 (type: string), _col21 (type: int), _col37 (type: int), _col53 (type: int), _col72 (type: int) + TableScan + alias: income_band + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((ib_income_band_sk is not null and (ib_lower_bound >= 32287)) and (ib_upper_bound <= 82287)) (type: boolean) + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ib_income_band_sk (type: int) + sort order: + + Map-reduce partition columns: ib_income_band_sk (type: int) + Statistics: Num rows: 1 Data size: 18 Basic stats: COMPLETE Column stats: NONE + value expressions: ib_lower_bound (type: int), ib_upper_bound (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col73 (type: int) + 1 ib_income_band_sk (type: int) + outputColumnNames: _col1, _col2, _col3, _col4, _col8, _col9, _col21, _col37, _col53, _col72, _col73, _col80, _col81, _col82 + Statistics: Num rows: 281 Data size: 1130 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((((_col4 = _col21) and (_col81 >= 32287)) and (_col82 <= 82287)) and (_col80 = _col73)) and (_col37 = _col2)) and (_col72 = _col3)) and (_col53 = _col37)) (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: string), concat(_col9, ', ', _col8) (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), VALUE._col0 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query85.q.out b/ql/src/test/results/clientpositive/perf/query85.q.out new file mode 100644 index 0000000..f652e1b --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query85.q.out @@ -0,0 +1,357 @@ +PREHOOK: query: explain select substr(r_reason_desc,1,20) as r ,avg(ws_quantity) wq ,avg(wr_refunded_cash) ref ,avg(wr_fee) fee from web_sales, web_returns, web_page, customer_demographics cd1, customer_demographics cd2, customer_address, date_dim, reason where web_sales.ws_web_page_sk = web_page.wp_web_page_sk and web_sales.ws_item_sk = web_returns.wr_item_sk and web_sales.ws_order_number = web_returns.wr_order_number and web_sales.ws_sold_date_sk = date_dim.d_date_sk and d_year = 1998 and cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk and cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk and customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk and reason.r_reason_sk = web_returns.wr_reason_sk and ( ( cd1.cd_marital_status = 'M' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = '4 yr Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 100.00 and 150.00 ) or ( cd1.cd_marital_status = 'D' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Primary' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 50.00 and 100.00 ) or ( cd1.cd_marital_status = 'U' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Advanced Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 150.00 and 200.00 ) ) and ( ( ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ws_net_profit between 100 and 200 ) or ( ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN') and ws_net_profit between 150 and 300 ) or ( ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV') and ws_net_profit between 50 and 250 ) ) group by r_reason_desc order by r, wq, ref, fee limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select substr(r_reason_desc,1,20) as r ,avg(ws_quantity) wq ,avg(wr_refunded_cash) ref ,avg(wr_fee) fee from web_sales, web_returns, web_page, customer_demographics cd1, customer_demographics cd2, customer_address, date_dim, reason where web_sales.ws_web_page_sk = web_page.wp_web_page_sk and web_sales.ws_item_sk = web_returns.wr_item_sk and web_sales.ws_order_number = web_returns.wr_order_number and web_sales.ws_sold_date_sk = date_dim.d_date_sk and d_year = 1998 and cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk and cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk and customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk and reason.r_reason_sk = web_returns.wr_reason_sk and ( ( cd1.cd_marital_status = 'M' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = '4 yr Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 100.00 and 150.00 ) or ( cd1.cd_marital_status = 'D' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Primary' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 50.00 and 100.00 ) or ( cd1.cd_marital_status = 'U' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Advanced Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 150.00 and 200.00 ) ) and ( ( ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ws_net_profit between 100 and 200 ) or ( ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN') and ws_net_profit between 150 and 300 ) or ( ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV') and ws_net_profit between 50 and 250 ) ) group by r_reason_desc order by r, wq, ref, fee limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-8 depends on stages: Stage-7 + Stage-9 depends on stages: Stage-8 + Stage-0 depends on stages: Stage-9 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 6 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((ws_item_sk is not null and ws_order_number is not null) and ws_web_page_sk is not null) and ws_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 273 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_item_sk (type: int), ws_order_number (type: int) + sort order: ++ + Map-reduce partition columns: ws_item_sk (type: int), ws_order_number (type: int) + Statistics: Num rows: 1 Data size: 273 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_sold_date_sk (type: int), ws_web_page_sk (type: int), ws_quantity (type: int), ws_sales_price (type: decimal(7,2)), ws_net_profit (type: decimal(7,2)) + TableScan + alias: web_returns + Statistics: Num rows: 1 Data size: 137 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((wr_item_sk is not null and wr_order_number is not null) and wr_refunded_cdemo_sk is not null) and wr_returning_cdemo_sk is not null) and wr_refunded_addr_sk is not null) and wr_reason_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 137 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: wr_item_sk (type: int), wr_order_number (type: int) + sort order: ++ + Map-reduce partition columns: wr_item_sk (type: int), wr_order_number (type: int) + Statistics: Num rows: 1 Data size: 137 Basic stats: COMPLETE Column stats: NONE + value expressions: wr_refunded_cdemo_sk (type: int), wr_refunded_addr_sk (type: int), wr_returning_cdemo_sk (type: int), wr_reason_sk (type: int), wr_fee (type: decimal(7,2)), wr_refunded_cash (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_item_sk (type: int), ws_order_number (type: int) + 1 wr_item_sk (type: int), wr_order_number (type: int) + outputColumnNames: _col0, _col3, _col12, _col17, _col18, _col21, _col33, _col39, _col41, _col43, _col45, _col49, _col50, _col55, _col57 + Statistics: Num rows: 1 Data size: 300 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col12 (type: int) + sort order: + + Map-reduce partition columns: _col12 (type: int) + Statistics: Num rows: 1 Data size: 300 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col17 (type: int), _col18 (type: int), _col21 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col39 (type: int), _col41 (type: int), _col43 (type: int), _col45 (type: int), _col49 (type: int), _col50 (type: int), _col55 (type: decimal(7,2)), _col57 (type: decimal(7,2)) + TableScan + alias: web_page + Statistics: Num rows: 21 Data size: 86 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: wp_web_page_sk is not null (type: boolean) + Statistics: Num rows: 11 Data size: 45 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: wp_web_page_sk (type: int) + sort order: + + Map-reduce partition columns: wp_web_page_sk (type: int) + Statistics: Num rows: 11 Data size: 45 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col12 (type: int) + 1 wp_web_page_sk (type: int) + outputColumnNames: _col0, _col3, _col12, _col17, _col18, _col21, _col33, _col39, _col41, _col43, _col45, _col49, _col50, _col55, _col57, _col64 + Statistics: Num rows: 12 Data size: 49 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col41 (type: int) + sort order: + + Map-reduce partition columns: _col41 (type: int) + Statistics: Num rows: 12 Data size: 49 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col12 (type: int), _col17 (type: int), _col18 (type: int), _col21 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col39 (type: int), _col43 (type: int), _col45 (type: int), _col49 (type: int), _col50 (type: int), _col55 (type: decimal(7,2)), _col57 (type: decimal(7,2)), _col64 (type: int) + TableScan + alias: cd1 + Statistics: Num rows: 4 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cd_demo_sk is not null (type: boolean) + Statistics: Num rows: 2 Data size: 425 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 2 Data size: 425 Basic stats: COMPLETE Column stats: NONE + value expressions: cd_marital_status (type: string), cd_education_status (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col41 (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col0, _col3, _col12, _col17, _col18, _col21, _col33, _col39, _col41, _col43, _col45, _col49, _col50, _col55, _col57, _col64, _col81, _col83, _col84 + Statistics: Num rows: 13 Data size: 53 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col45 (type: int) + sort order: + + Map-reduce partition columns: _col45 (type: int) + Statistics: Num rows: 13 Data size: 53 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col12 (type: int), _col17 (type: int), _col18 (type: int), _col21 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col39 (type: int), _col41 (type: int), _col43 (type: int), _col49 (type: int), _col50 (type: int), _col55 (type: decimal(7,2)), _col57 (type: decimal(7,2)), _col64 (type: int), _col81 (type: int), _col83 (type: string), _col84 (type: string) + TableScan + alias: cd2 + Statistics: Num rows: 4 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cd_demo_sk is not null (type: boolean) + Statistics: Num rows: 2 Data size: 425 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 2 Data size: 425 Basic stats: COMPLETE Column stats: NONE + value expressions: cd_marital_status (type: string), cd_education_status (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col45 (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col0, _col3, _col12, _col17, _col18, _col21, _col33, _col39, _col41, _col43, _col45, _col49, _col50, _col55, _col57, _col64, _col81, _col83, _col84, _col93, _col95, _col96 + Statistics: Num rows: 14 Data size: 58 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col43 (type: int) + sort order: + + Map-reduce partition columns: _col43 (type: int) + Statistics: Num rows: 14 Data size: 58 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col12 (type: int), _col17 (type: int), _col18 (type: int), _col21 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col39 (type: int), _col41 (type: int), _col45 (type: int), _col49 (type: int), _col50 (type: int), _col55 (type: decimal(7,2)), _col57 (type: decimal(7,2)), _col64 (type: int), _col81 (type: int), _col83 (type: string), _col84 (type: string), _col93 (type: int), _col95 (type: string), _col96 (type: string) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ca_address_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_state (type: string), ca_country (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col43 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col3, _col12, _col17, _col18, _col21, _col33, _col39, _col41, _col43, _col45, _col49, _col50, _col55, _col57, _col64, _col81, _col83, _col84, _col93, _col95, _col96, _col105, _col113, _col115 + Statistics: Num rows: 15 Data size: 63 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 15 Data size: 63 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: int), _col12 (type: int), _col17 (type: int), _col18 (type: int), _col21 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col39 (type: int), _col41 (type: int), _col43 (type: int), _col45 (type: int), _col49 (type: int), _col50 (type: int), _col55 (type: decimal(7,2)), _col57 (type: decimal(7,2)), _col64 (type: int), _col81 (type: int), _col83 (type: string), _col84 (type: string), _col93 (type: int), _col95 (type: string), _col96 (type: string), _col105 (type: int), _col113 (type: string), _col115 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and (d_year = 1998)) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col3, _col12, _col17, _col18, _col21, _col33, _col39, _col41, _col43, _col45, _col49, _col50, _col55, _col57, _col64, _col81, _col83, _col84, _col93, _col95, _col96, _col105, _col113, _col115, _col121 + Statistics: Num rows: 16 Data size: 69 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col49 (type: int) + sort order: + + Map-reduce partition columns: _col49 (type: int) + Statistics: Num rows: 16 Data size: 69 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col3 (type: int), _col12 (type: int), _col17 (type: int), _col18 (type: int), _col21 (type: decimal(7,2)), _col33 (type: decimal(7,2)), _col39 (type: int), _col41 (type: int), _col43 (type: int), _col45 (type: int), _col50 (type: int), _col55 (type: decimal(7,2)), _col57 (type: decimal(7,2)), _col64 (type: int), _col81 (type: int), _col83 (type: string), _col84 (type: string), _col93 (type: int), _col95 (type: string), _col96 (type: string), _col105 (type: int), _col113 (type: string), _col115 (type: string), _col121 (type: int) + TableScan + alias: reason + Statistics: Num rows: 1 Data size: 36 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: r_reason_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 36 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: r_reason_sk (type: int) + sort order: + + Map-reduce partition columns: r_reason_sk (type: int) + Statistics: Num rows: 1 Data size: 36 Basic stats: COMPLETE Column stats: NONE + value expressions: r_reason_desc (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col49 (type: int) + 1 r_reason_sk (type: int) + outputColumnNames: _col0, _col3, _col12, _col17, _col18, _col21, _col33, _col39, _col41, _col43, _col45, _col49, _col50, _col55, _col57, _col64, _col81, _col83, _col84, _col93, _col95, _col96, _col105, _col113, _col115, _col121, _col152, _col154 + Statistics: Num rows: 17 Data size: 75 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((((((((_col12 = _col64) and (_col3 = _col39)) and (_col17 = _col50)) and (_col0 = _col121)) and (_col81 = _col41)) and (_col93 = _col45)) and (_col105 = _col43)) and (_col152 = _col49)) and (((((((_col83 = 'M') and (_col83 = _col95)) and (_col84 = '4 yr Degree')) and (_col84 = _col96)) and _col21 BETWEEN 100.0 AND 150.0) or (((((_col83 = 'D') and (_col83 = _col95)) and (_col84 = 'Primary')) and (_col84 = _col96)) and _col21 BETWEEN 50.0 AND 100.0)) or (((((_col83 = 'U') and (_col83 = _col95)) and (_col84 = 'Advanced Degree')) and (_col84 = _col96)) and _col21 BETWEEN 150.0 AND 200.0))) and (((((_col115 = 'United States') and (_col113) IN ('KY', 'GA', 'NM')) and _col33 BETWEEN 100 AND 200) or (((_col115 = 'United States') and (_col113) IN ('MT', 'OR', 'IN')) and _col33 BETWEEN 150 AND 300)) or (((_col115 = 'United States') and (_col113) IN ('WI', 'MO', 'WV')) and _col33 BETWEEN 50 AND 250))) (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col154 (type: string), _col18 (type: int), _col57 (type: decimal(7,2)), _col55 (type: decimal(7,2)) + outputColumnNames: _col154, _col18, _col57, _col55 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: avg(_col18), avg(_col57), avg(_col55) + keys: _col154 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: struct), _col2 (type: struct), _col3 (type: struct) + Reduce Operator Tree: + Group By Operator + aggregations: avg(VALUE._col0), avg(VALUE._col1), avg(VALUE._col2) + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: substr(_col0, 1, 20) (type: string), _col1 (type: double), _col2 (type: decimal(11,6)), _col3 (type: decimal(11,6)) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-9 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: double), _col2 (type: decimal(11,6)), _col3 (type: decimal(11,6)) + sort order: ++++ + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: double), KEY.reducesinkkey2 (type: decimal(11,6)), KEY.reducesinkkey3 (type: decimal(11,6)) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query87.q.out b/ql/src/test/results/clientpositive/perf/query87.q.out new file mode 100644 index 0000000..3247ea6 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query87.q.out @@ -0,0 +1,432 @@ +PREHOOK: query: explain select count(*) from (select distinct c_last_name as l1, c_first_name as f1, d_date as d1 from store_sales JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t1 LEFT OUTER JOIN ( select distinct c_last_name as l2, c_first_name as f2, d_date as d2 from catalog_sales JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk JOIN customer ON catalog_sales.cs_bill_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t2 ON t1.l1 = t2.l2 and t1.f1 = t2.f2 and t1.d1 = t2.d2 LEFT OUTER JOIN (select distinct c_last_name as l3, c_first_name as f3, d_date as d3 from web_sales JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk JOIN customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t3 ON t1.l1 = t3.l3 and t1.f1 = t3.f3 and t1.d1 = t3.d3 WHERE l2 is null and l3 is null +PREHOOK: type: QUERY +POSTHOOK: query: explain select count(*) from (select distinct c_last_name as l1, c_first_name as f1, d_date as d1 from store_sales JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t1 LEFT OUTER JOIN ( select distinct c_last_name as l2, c_first_name as f2, d_date as d2 from catalog_sales JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk JOIN customer ON catalog_sales.cs_bill_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t2 ON t1.l1 = t2.l2 and t1.f1 = t2.f2 and t1.d1 = t2.d2 LEFT OUTER JOIN (select distinct c_last_name as l3, c_first_name as f3, d_date as d3 from web_sales JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk JOIN customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t3 ON t1.l1 = t3.l3 and t1.f1 = t3.f3 and t1.d1 = t3.d3 WHERE l2 is null and l3 is null +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3, Stage-10, Stage-15 + Stage-5 depends on stages: Stage-4 + Stage-8 is a root stage + Stage-9 depends on stages: Stage-8 + Stage-10 depends on stages: Stage-9 + Stage-13 is a root stage + Stage-14 depends on stages: Stage-13 + Stage-15 depends on stages: Stage-14 + Stage-0 depends on stages: Stage-5 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 508 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_sold_date_sk is not null and ss_customer_sk is not null) (type: boolean) + Statistics: Num rows: 127 Data size: 1017 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 127 Data size: 1017 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_customer_sk (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col3, _col28 + Statistics: Num rows: 139 Data size: 1118 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: int) + sort order: + + Map-reduce partition columns: _col3 (type: int) + Statistics: Num rows: 139 Data size: 1118 Basic stats: COMPLETE Column stats: NONE + value expressions: _col28 (type: string) + TableScan + alias: customer + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: c_customer_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + value expressions: c_first_name (type: string), c_last_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col3 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col28, _col65, _col66 + Statistics: Num rows: 152 Data size: 1229 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col66 (type: string), _col65 (type: string), _col28 (type: string) + outputColumnNames: _col66, _col65, _col28 + Statistics: Num rows: 152 Data size: 1229 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col66 (type: string), _col65 (type: string), _col28 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 152 Data size: 1229 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) + Statistics: Num rows: 152 Data size: 1229 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 76 Data size: 614 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) + Statistics: Num rows: 76 Data size: 614 Basic stats: COMPLETE Column stats: NONE + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) + Statistics: Num rows: 58 Data size: 469 Basic stats: COMPLETE Column stats: NONE + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) + Statistics: Num rows: 30 Data size: 242 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + Left Outer Join0 to 2 + keys: + 0 _col0 (type: string), _col1 (type: string), _col2 (type: string) + 1 _col0 (type: string), _col1 (type: string), _col2 (type: string) + 2 _col0 (type: string), _col1 (type: string), _col2 (type: string) + outputColumnNames: _col3, _col6 + Statistics: Num rows: 167 Data size: 1350 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (_col6 is null and _col3 is null) (type: boolean) + Statistics: Num rows: 41 Data size: 331 Basic stats: COMPLETE Column stats: NONE + Select Operator + Statistics: Num rows: 41 Data size: 331 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count() + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 390 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (cs_sold_date_sk is not null and cs_bill_customer_sk is not null) (type: boolean) + Statistics: Num rows: 98 Data size: 784 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: cs_sold_date_sk (type: int) + Statistics: Num rows: 98 Data size: 784 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_bill_customer_sk (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col3, _col39 + Statistics: Num rows: 107 Data size: 862 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-9 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: int) + sort order: + + Map-reduce partition columns: _col3 (type: int) + Statistics: Num rows: 107 Data size: 862 Basic stats: COMPLETE Column stats: NONE + value expressions: _col39 (type: string) + TableScan + alias: customer + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: c_customer_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + value expressions: c_first_name (type: string), c_last_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col3 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col39, _col76, _col77 + Statistics: Num rows: 117 Data size: 948 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col77 (type: string), _col76 (type: string), _col39 (type: string) + outputColumnNames: _col77, _col76, _col39 + Statistics: Num rows: 117 Data size: 948 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col77 (type: string), _col76 (type: string), _col39 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 117 Data size: 948 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-10 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) + Statistics: Num rows: 117 Data size: 948 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 58 Data size: 469 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-13 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 204 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ws_sold_date_sk is not null and ws_bill_customer_sk is not null) (type: boolean) + Statistics: Num rows: 51 Data size: 409 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ws_sold_date_sk (type: int) + Statistics: Num rows: 51 Data size: 409 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_bill_customer_sk (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col4, _col39 + Statistics: Num rows: 56 Data size: 449 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-14 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col4 (type: int) + sort order: + + Map-reduce partition columns: _col4 (type: int) + Statistics: Num rows: 56 Data size: 449 Basic stats: COMPLETE Column stats: NONE + value expressions: _col39 (type: string) + TableScan + alias: customer + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: c_customer_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 1 Data size: 139 Basic stats: COMPLETE Column stats: NONE + value expressions: c_first_name (type: string), c_last_name (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col4 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col39, _col76, _col77 + Statistics: Num rows: 61 Data size: 493 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col77 (type: string), _col76 (type: string), _col39 (type: string) + outputColumnNames: _col77, _col76, _col39 + Statistics: Num rows: 61 Data size: 493 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col77 (type: string), _col76 (type: string), _col39 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 61 Data size: 493 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-15 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + sort order: +++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) + Statistics: Num rows: 61 Data size: 493 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 30 Data size: 242 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query90.q.out b/ql/src/test/results/clientpositive/perf/query90.q.out new file mode 100644 index 0000000..a9188b6 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query90.q.out @@ -0,0 +1,380 @@ +Warning: Shuffle Join JOIN[52][tables = [at, pt]] in Stage 'Stage-5:MAPRED' is a cross product +PREHOOK: query: explain select cast(amc as decimal(15,4))/cast(pmc as decimal(15,4)) am_pm_ratio from ( select count(*) amc from web_sales, household_demographics , time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 6 and 6+1 and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 and 5200) at, ( select count(*) pmc from web_sales, household_demographics , time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 14 and 14+1 and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 and 5200) pt order by am_pm_ratio limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select cast(amc as decimal(15,4))/cast(pmc as decimal(15,4)) am_pm_ratio from ( select count(*) amc from web_sales, household_demographics , time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 6 and 6+1 and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 and 5200) at, ( select count(*) pmc from web_sales, household_demographics , time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 14 and 14+1 and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 and 5200) pt order by am_pm_ratio limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4, Stage-13 + Stage-6 depends on stages: Stage-5 + Stage-10 is a root stage + Stage-11 depends on stages: Stage-10 + Stage-12 depends on stages: Stage-11 + Stage-13 depends on stages: Stage-12 + Stage-0 depends on stages: Stage-6 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 136 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((ws_ship_hdemo_sk is not null and ws_sold_time_sk is not null) and ws_web_page_sk is not null) (type: boolean) + Statistics: Num rows: 17 Data size: 204 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_ship_hdemo_sk (type: int) + sort order: + + Map-reduce partition columns: ws_ship_hdemo_sk (type: int) + Statistics: Num rows: 17 Data size: 204 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_sold_time_sk (type: int), ws_web_page_sk (type: int) + TableScan + alias: household_demographics + Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and (hd_dep_count = 8)) (type: boolean) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_ship_hdemo_sk (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col1, _col10, _col12, _col37 + Statistics: Num rows: 18 Data size: 224 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int) + sort order: + + Map-reduce partition columns: _col1 (type: int) + Statistics: Num rows: 18 Data size: 224 Basic stats: COMPLETE Column stats: NONE + value expressions: _col10 (type: int), _col12 (type: int), _col37 (type: int) + TableScan + alias: time_dim + Statistics: Num rows: 8 Data size: 64 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (t_time_sk is not null and t_hour BETWEEN 6 AND 7) (type: boolean) + Statistics: Num rows: 2 Data size: 16 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: t_time_sk (type: int) + sort order: + + Map-reduce partition columns: t_time_sk (type: int) + Statistics: Num rows: 2 Data size: 16 Basic stats: COMPLETE Column stats: NONE + value expressions: t_hour (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int) + 1 t_time_sk (type: int) + outputColumnNames: _col1, _col10, _col12, _col37, _col45, _col48 + Statistics: Num rows: 19 Data size: 246 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col12 (type: int) + sort order: + + Map-reduce partition columns: _col12 (type: int) + Statistics: Num rows: 19 Data size: 246 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int), _col10 (type: int), _col37 (type: int), _col45 (type: int), _col48 (type: int) + TableScan + alias: web_page + Statistics: Num rows: 10 Data size: 86 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (wp_web_page_sk is not null and wp_char_count BETWEEN 5000 AND 5200) (type: boolean) + Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: wp_web_page_sk (type: int) + sort order: + + Map-reduce partition columns: wp_web_page_sk (type: int) + Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE Column stats: NONE + value expressions: wp_char_count (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col12 (type: int) + 1 wp_web_page_sk (type: int) + outputColumnNames: _col1, _col10, _col12, _col37, _col45, _col48, _col58, _col68 + Statistics: Num rows: 20 Data size: 270 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((_col1 = _col45) and (_col10 = _col37)) and (_col12 = _col58)) and _col48 BETWEEN 6 AND 7) and _col68 BETWEEN 5000 AND 5200) (type: boolean) + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + Select Operator + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count() + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint) + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 + 1 + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: (CAST( _col0 AS decimal(15,4)) / CAST( _col1 AS decimal(15,4))) (type: decimal(35,20)) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: decimal(35,20)) + sort order: + + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: decimal(35,20)) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-10 + Map Reduce + Map Operator Tree: + TableScan + alias: web_sales + Statistics: Num rows: 136 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((ws_ship_hdemo_sk is not null and ws_sold_time_sk is not null) and ws_web_page_sk is not null) (type: boolean) + Statistics: Num rows: 17 Data size: 204 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_ship_hdemo_sk (type: int) + sort order: + + Map-reduce partition columns: ws_ship_hdemo_sk (type: int) + Statistics: Num rows: 17 Data size: 204 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_sold_time_sk (type: int), ws_web_page_sk (type: int) + TableScan + alias: household_demographics + Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and (hd_dep_count = 8)) (type: boolean) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_ship_hdemo_sk (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col1, _col10, _col12, _col37 + Statistics: Num rows: 18 Data size: 224 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-11 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int) + sort order: + + Map-reduce partition columns: _col1 (type: int) + Statistics: Num rows: 18 Data size: 224 Basic stats: COMPLETE Column stats: NONE + value expressions: _col10 (type: int), _col12 (type: int), _col37 (type: int) + TableScan + alias: time_dim + Statistics: Num rows: 8 Data size: 64 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (t_time_sk is not null and t_hour BETWEEN 14 AND 15) (type: boolean) + Statistics: Num rows: 2 Data size: 16 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: t_time_sk (type: int) + sort order: + + Map-reduce partition columns: t_time_sk (type: int) + Statistics: Num rows: 2 Data size: 16 Basic stats: COMPLETE Column stats: NONE + value expressions: t_hour (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int) + 1 t_time_sk (type: int) + outputColumnNames: _col1, _col10, _col12, _col37, _col45, _col48 + Statistics: Num rows: 19 Data size: 246 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-12 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col12 (type: int) + sort order: + + Map-reduce partition columns: _col12 (type: int) + Statistics: Num rows: 19 Data size: 246 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int), _col10 (type: int), _col37 (type: int), _col45 (type: int), _col48 (type: int) + TableScan + alias: web_page + Statistics: Num rows: 10 Data size: 86 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (wp_web_page_sk is not null and wp_char_count BETWEEN 5000 AND 5200) (type: boolean) + Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: wp_web_page_sk (type: int) + sort order: + + Map-reduce partition columns: wp_web_page_sk (type: int) + Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE Column stats: NONE + value expressions: wp_char_count (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col12 (type: int) + 1 wp_web_page_sk (type: int) + outputColumnNames: _col1, _col10, _col12, _col37, _col45, _col48, _col58, _col68 + Statistics: Num rows: 20 Data size: 270 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((_col1 = _col45) and (_col10 = _col37)) and (_col12 = _col58)) and _col48 BETWEEN 14 AND 15) and _col68 BETWEEN 5000 AND 5200) (type: boolean) + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + Select Operator + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count() + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-13 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query91.q.out b/ql/src/test/results/clientpositive/perf/query91.q.out new file mode 100644 index 0000000..9d6a521 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query91.q.out @@ -0,0 +1,317 @@ +PREHOOK: query: explain select cc_call_center_id Call_Center, cc_name Call_Center_Name, cc_manager Manager, sum(cr_net_loss) Returns_Loss from call_center, catalog_returns, date_dim, customer, customer_address, customer_demographics, household_demographics where catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk and catalog_returns.cr_returned_date_sk = date_dim.d_date_sk and catalog_returns.cr_returning_customer_sk= customer.c_customer_sk and customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk and household_demographics.hd_demo_sk = customer.c_current_hdemo_sk and customer_address.ca_address_sk = customer.c_current_addr_sk and d_year = 1999 and d_moy = 11 and ( (cd_marital_status = 'M' and cd_education_status = 'Unknown') or(cd_marital_status = 'W' and cd_education_status = 'Advanced Degree')) and hd_buy_potential like '0-500%' and ca_gmt_offset = -7 group by cc_call_center_id,cc_name,cc_manager,cd_marital_status,cd_education_status order by Returns_Loss desc +PREHOOK: type: QUERY +POSTHOOK: query: explain select cc_call_center_id Call_Center, cc_name Call_Center_Name, cc_manager Manager, sum(cr_net_loss) Returns_Loss from call_center, catalog_returns, date_dim, customer, customer_address, customer_demographics, household_demographics where catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk and catalog_returns.cr_returned_date_sk = date_dim.d_date_sk and catalog_returns.cr_returning_customer_sk= customer.c_customer_sk and customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk and household_demographics.hd_demo_sk = customer.c_current_hdemo_sk and customer_address.ca_address_sk = customer.c_current_addr_sk and d_year = 1999 and d_moy = 11 and ( (cd_marital_status = 'M' and cd_education_status = 'Unknown') or(cd_marital_status = 'W' and cd_education_status = 'Advanced Degree')) and hd_buy_potential like '0-500%' and ca_gmt_offset = -7 group by cc_call_center_id,cc_name,cc_manager,cd_marital_status,cd_education_status order by Returns_Loss desc +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-8 depends on stages: Stage-7 + Stage-0 depends on stages: Stage-8 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: call_center + Statistics: Num rows: 1 Data size: 316 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cc_call_center_sk is not null (type: boolean) + Statistics: Num rows: 1 Data size: 316 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cc_call_center_sk (type: int) + sort order: + + Map-reduce partition columns: cc_call_center_sk (type: int) + Statistics: Num rows: 1 Data size: 316 Basic stats: COMPLETE Column stats: NONE + value expressions: cc_call_center_id (type: string), cc_name (type: string), cc_manager (type: string) + TableScan + alias: catalog_returns + Statistics: Num rows: 2 Data size: 288 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((cr_call_center_sk is not null and cr_returned_date_sk is not null) and cr_returning_customer_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 144 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cr_call_center_sk (type: int) + sort order: + + Map-reduce partition columns: cr_call_center_sk (type: int) + Statistics: Num rows: 1 Data size: 144 Basic stats: COMPLETE Column stats: NONE + value expressions: cr_returned_date_sk (type: int), cr_returning_customer_sk (type: int), cr_net_loss (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cc_call_center_sk (type: int) + 1 cr_call_center_sk (type: int) + outputColumnNames: _col0, _col1, _col6, _col11, _col34, _col41, _col45, _col60 + Statistics: Num rows: 1 Data size: 347 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col34 (type: int) + sort order: + + Map-reduce partition columns: _col34 (type: int) + Statistics: Num rows: 1 Data size: 347 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: string), _col6 (type: string), _col11 (type: string), _col41 (type: int), _col45 (type: int), _col60 (type: decimal(7,2)) + TableScan + alias: date_dim + Statistics: Num rows: 11 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_year = 1999)) and (d_moy = 11)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col34 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col1, _col6, _col11, _col34, _col41, _col45, _col60, _col64 + Statistics: Num rows: 1 Data size: 381 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col41 (type: int) + sort order: + + Map-reduce partition columns: _col41 (type: int) + Statistics: Num rows: 1 Data size: 381 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: string), _col6 (type: string), _col11 (type: string), _col34 (type: int), _col45 (type: int), _col60 (type: decimal(7,2)), _col64 (type: int) + TableScan + alias: customer + Statistics: Num rows: 8 Data size: 139 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((c_customer_sk is not null and c_current_addr_sk is not null) and c_current_cdemo_sk is not null) and c_current_hdemo_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: c_customer_sk (type: int) + sort order: + + Map-reduce partition columns: c_customer_sk (type: int) + Statistics: Num rows: 1 Data size: 17 Basic stats: COMPLETE Column stats: NONE + value expressions: c_current_cdemo_sk (type: int), c_current_hdemo_sk (type: int), c_current_addr_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col41 (type: int) + 1 c_customer_sk (type: int) + outputColumnNames: _col0, _col1, _col6, _col11, _col34, _col41, _col45, _col60, _col64, _col95, _col97, _col98, _col99 + Statistics: Num rows: 1 Data size: 419 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col99 (type: int) + sort order: + + Map-reduce partition columns: _col99 (type: int) + Statistics: Num rows: 1 Data size: 419 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: string), _col6 (type: string), _col11 (type: string), _col34 (type: int), _col41 (type: int), _col45 (type: int), _col60 (type: decimal(7,2)), _col64 (type: int), _col95 (type: int), _col97 (type: int), _col98 (type: int) + TableScan + alias: customer_address + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ca_address_sk is not null and (ca_gmt_offset = -7)) (type: boolean) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 1 Data size: 108 Basic stats: COMPLETE Column stats: NONE + value expressions: ca_gmt_offset (type: decimal(5,2)) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col99 (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col0, _col1, _col6, _col11, _col34, _col41, _col45, _col60, _col64, _col95, _col97, _col98, _col99, _col116, _col127 + Statistics: Num rows: 1 Data size: 460 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col97 (type: int) + sort order: + + Map-reduce partition columns: _col97 (type: int) + Statistics: Num rows: 1 Data size: 460 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: string), _col6 (type: string), _col11 (type: string), _col34 (type: int), _col41 (type: int), _col45 (type: int), _col60 (type: decimal(7,2)), _col64 (type: int), _col95 (type: int), _col98 (type: int), _col99 (type: int), _col116 (type: int), _col127 (type: decimal(5,2)) + TableScan + alias: customer_demographics + Statistics: Num rows: 4 Data size: 850 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (cd_demo_sk is not null and (((cd_marital_status = 'M') and (cd_education_status = 'Unknown')) or ((cd_marital_status = 'W') and (cd_education_status = 'Advanced Degree')))) (type: boolean) + Statistics: Num rows: 1 Data size: 212 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: cd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 212 Basic stats: COMPLETE Column stats: NONE + value expressions: cd_marital_status (type: string), cd_education_status (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col97 (type: int) + 1 cd_demo_sk (type: int) + outputColumnNames: _col0, _col1, _col6, _col11, _col34, _col41, _col45, _col60, _col64, _col95, _col97, _col98, _col99, _col116, _col127, _col132, _col134, _col135 + Statistics: Num rows: 1 Data size: 506 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col98 (type: int) + sort order: + + Map-reduce partition columns: _col98 (type: int) + Statistics: Num rows: 1 Data size: 506 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: string), _col6 (type: string), _col11 (type: string), _col34 (type: int), _col41 (type: int), _col45 (type: int), _col60 (type: decimal(7,2)), _col64 (type: int), _col95 (type: int), _col97 (type: int), _col99 (type: int), _col116 (type: int), _col127 (type: decimal(5,2)), _col132 (type: int), _col134 (type: string), _col135 (type: string) + TableScan + alias: household_demographics + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and (hd_buy_potential like '0-500%')) (type: boolean) + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + value expressions: hd_buy_potential (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col98 (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col0, _col1, _col6, _col11, _col34, _col41, _col45, _col60, _col64, _col95, _col97, _col98, _col99, _col116, _col127, _col132, _col134, _col135, _col144, _col146 + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((((((_col45 = _col0) and (_col34 = _col64)) and (_col41 = _col95)) and (_col132 = _col97)) and (_col144 = _col98)) and (_col116 = _col99)) and (((_col134 = 'M') and (_col135 = 'Unknown')) or ((_col134 = 'W') and (_col135 = 'Advanced Degree')))) and (_col146 like '0-500%')) and (_col127 = -7)) (type: boolean) + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: string), _col6 (type: string), _col11 (type: string), _col134 (type: string), _col135 (type: string), _col60 (type: decimal(7,2)) + outputColumnNames: _col1, _col6, _col11, _col134, _col135, _col60 + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col60) + keys: _col1 (type: string), _col6 (type: string), _col11 (type: string), _col134 (type: string), _col135 (type: string) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string) + sort order: +++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string) + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col5 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-8 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: decimal(17,2)) + sort order: - + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: string), VALUE._col1 (type: string), VALUE._col2 (type: string), KEY.reducesinkkey0 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query92.q.out b/ql/src/test/results/clientpositive/perf/query92.q.out new file mode 100644 index 0000000..65644c3 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query92.q.out @@ -0,0 +1,220 @@ +PREHOOK: query: explain SELECT sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) as store_only, sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) as catalog_only, sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) as store_and_catalog FROM (SELECT ss.ss_customer_sk as customer_sk, ss.ss_item_sk as item_sk FROM store_sales ss JOIN date_dim d1 ON (ss.ss_sold_date_sk = d1.d_date_sk) WHERE d1.d_month_seq >= 1206 and d1.d_month_seq <= 1217 GROUP BY ss.ss_customer_sk, ss.ss_item_sk) ssci FULL OUTER JOIN (SELECT cs.cs_bill_customer_sk as customer_sk, cs.cs_item_sk as item_sk FROM catalog_sales cs JOIN date_dim d2 ON (cs.cs_sold_date_sk = d2.d_date_sk) WHERE d2.d_month_seq >= 1206 and d2.d_month_seq <= 1217 GROUP BY cs.cs_bill_customer_sk, cs.cs_item_sk) csci ON (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk) +PREHOOK: type: QUERY +POSTHOOK: query: explain SELECT sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) as store_only, sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) as catalog_only, sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) as store_and_catalog FROM (SELECT ss.ss_customer_sk as customer_sk, ss.ss_item_sk as item_sk FROM store_sales ss JOIN date_dim d1 ON (ss.ss_sold_date_sk = d1.d_date_sk) WHERE d1.d_month_seq >= 1206 and d1.d_month_seq <= 1217 GROUP BY ss.ss_customer_sk, ss.ss_item_sk) ssci FULL OUTER JOIN (SELECT cs.cs_bill_customer_sk as customer_sk, cs.cs_item_sk as item_sk FROM catalog_sales cs JOIN date_dim d2 ON (cs.cs_sold_date_sk = d2.d_date_sk) WHERE d2.d_month_seq >= 1206 and d2.d_month_seq <= 1217 GROUP BY cs.cs_bill_customer_sk, cs.cs_item_sk) csci ON (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk) +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2, Stage-7 + Stage-4 depends on stages: Stage-3 + Stage-6 is a root stage + Stage-7 depends on stages: Stage-6 + Stage-0 depends on stages: Stage-4 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: ss + Statistics: Num rows: 339 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ss_sold_date_sk is not null (type: boolean) + Statistics: Num rows: 170 Data size: 2041 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 170 Data size: 2041 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_item_sk (type: int), ss_customer_sk (type: int) + TableScan + alias: d1 + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_month_seq >= 1206)) and (d_month_seq <= 1217)) (type: boolean) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col2, _col3 + Statistics: Num rows: 187 Data size: 2245 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col3 (type: int), _col2 (type: int) + outputColumnNames: _col3, _col2 + Statistics: Num rows: 187 Data size: 2245 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col3 (type: int), _col2 (type: int) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 187 Data size: 2245 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 187 Data size: 2245 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: int), KEY._col1 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1 + Statistics: Num rows: 93 Data size: 1116 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 93 Data size: 1116 Basic stats: COMPLETE Column stats: NONE + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 71 Data size: 852 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Outer Join 0 to 1 + keys: + 0 _col0 (type: int), _col1 (type: int) + 1 _col0 (type: int), _col1 (type: int) + outputColumnNames: _col0, _col2 + Statistics: Num rows: 102 Data size: 1227 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(CASE WHEN ((_col0 is not null and _col2 is null)) THEN (1) ELSE (0) END), sum(CASE WHEN ((_col0 is null and _col2 is not null)) THEN (1) ELSE (0) END), sum(CASE WHEN ((_col0 is not null and _col2 is not null)) THEN (1) ELSE (0) END) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint), _col1 (type: bigint), _col2 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + alias: cs + Statistics: Num rows: 260 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cs_sold_date_sk is not null (type: boolean) + Statistics: Num rows: 130 Data size: 1561 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: cs_sold_date_sk (type: int) + Statistics: Num rows: 130 Data size: 1561 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_bill_customer_sk (type: int), cs_item_sk (type: int) + TableScan + alias: d2 + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_date_sk is not null and (d_month_seq >= 1206)) and (d_month_seq <= 1217)) (type: boolean) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col3, _col15 + Statistics: Num rows: 143 Data size: 1717 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col3 (type: int), _col15 (type: int) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 143 Data size: 1717 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 143 Data size: 1717 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: int), KEY._col1 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1 + Statistics: Num rows: 71 Data size: 852 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query93.q.out b/ql/src/test/results/clientpositive/perf/query93.q.out new file mode 100644 index 0000000..26874aa --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query93.q.out @@ -0,0 +1,156 @@ +PREHOOK: query: explain select ss_customer_sk ,sum(act_sales) sumsales from (select ss_item_sk ,ss_ticket_number ,ss_customer_sk ,case when sr_return_quantity is not null then (ss_quantity-sr_return_quantity)*ss_sales_price else (ss_quantity*ss_sales_price) end act_sales from store_sales left outer join store_returns on (store_returns.sr_item_sk = store_sales.ss_item_sk and store_returns.sr_ticket_number = store_sales.ss_ticket_number) ,reason where store_returns.sr_reason_sk = reason.r_reason_sk and r_reason_desc = 'Did not like the warranty') t group by ss_customer_sk order by sumsales, ss_customer_sk limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select ss_customer_sk ,sum(act_sales) sumsales from (select ss_item_sk ,ss_ticket_number ,ss_customer_sk ,case when sr_return_quantity is not null then (ss_quantity-sr_return_quantity)*ss_sales_price else (ss_quantity*ss_sales_price) end act_sales from store_sales left outer join store_returns on (store_returns.sr_item_sk = store_sales.ss_item_sk and store_returns.sr_ticket_number = store_sales.ss_ticket_number) ,reason where store_returns.sr_reason_sk = reason.r_reason_sk and r_reason_desc = 'Did not like the warranty') t group by ss_customer_sk order by sumsales, ss_customer_sk limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-0 depends on stages: Stage-4 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 31 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_item_sk (type: int), ss_ticket_number (type: int) + sort order: ++ + Map-reduce partition columns: ss_item_sk (type: int), ss_ticket_number (type: int) + Statistics: Num rows: 31 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_customer_sk (type: int), ss_quantity (type: int), ss_sales_price (type: decimal(7,2)) + TableScan + alias: store_returns + Statistics: Num rows: 21 Data size: 338 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: sr_item_sk (type: int), sr_ticket_number (type: int) + sort order: ++ + Map-reduce partition columns: sr_item_sk (type: int), sr_ticket_number (type: int) + Statistics: Num rows: 21 Data size: 338 Basic stats: COMPLETE Column stats: NONE + value expressions: sr_reason_sk (type: int), sr_return_quantity (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Left Outer Join0 to 1 + keys: + 0 ss_item_sk (type: int), ss_ticket_number (type: int) + 1 sr_item_sk (type: int), sr_ticket_number (type: int) + outputColumnNames: _col3, _col10, _col13, _col34, _col36 + Statistics: Num rows: 34 Data size: 4478 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: _col34 is not null (type: boolean) + Statistics: Num rows: 17 Data size: 2239 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col34 (type: int) + sort order: + + Map-reduce partition columns: _col34 (type: int) + Statistics: Num rows: 17 Data size: 2239 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: int), _col10 (type: int), _col13 (type: decimal(7,2)), _col36 (type: int) + TableScan + alias: reason + Statistics: Num rows: 1 Data size: 36 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (r_reason_sk is not null and (r_reason_desc = 'Did not like the warranty')) (type: boolean) + Statistics: Num rows: 1 Data size: 36 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: r_reason_sk (type: int) + sort order: + + Map-reduce partition columns: r_reason_sk (type: int) + Statistics: Num rows: 1 Data size: 36 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col34 (type: int) + 1 r_reason_sk (type: int) + outputColumnNames: _col3, _col10, _col13, _col34, _col36, _col49 + Statistics: Num rows: 18 Data size: 2462 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (_col34 = _col49) (type: boolean) + Statistics: Num rows: 9 Data size: 1231 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col3 (type: int), CASE WHEN (_col36 is not null) THEN (((_col10 - _col36) * _col13)) ELSE ((_col10 * _col13)) END (type: decimal(18,2)) + outputColumnNames: _col2, _col3 + Statistics: Num rows: 9 Data size: 1231 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col3) + keys: _col2 (type: int) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 9 Data size: 1231 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 9 Data size: 1231 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: decimal(28,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1 + Statistics: Num rows: 4 Data size: 547 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: decimal(28,2)), _col0 (type: int) + sort order: ++ + Statistics: Num rows: 4 Data size: 547 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey1 (type: int), KEY.reducesinkkey0 (type: decimal(28,2)) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 4 Data size: 547 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 4 Data size: 547 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 4 Data size: 547 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query94.q.out b/ql/src/test/results/clientpositive/perf/query94.q.out new file mode 100644 index 0000000..2201994 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query94.q.out @@ -0,0 +1,272 @@ +PREHOOK: query: explain SELECT count(distinct ws_order_number) as order_count, sum(ws_ext_ship_cost) as total_shipping_cost, sum(ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk) JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk) LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number FROM web_sales ws2 JOIN web_sales ws3 ON (ws2.ws_order_number = ws3.ws_order_number) WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk ) ws_wh1 ON (ws1.ws_order_number = ws_wh1.ws_order_number) LEFT OUTER JOIN web_returns wr1 ON (ws1.ws_order_number = wr1.wr_order_number) WHERE d.d_date between '1999-05-01' and '1999-07-01' and ca.ca_state = 'TX' and s.web_company_name = 'pri' and wr1.wr_order_number is null limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain SELECT count(distinct ws_order_number) as order_count, sum(ws_ext_ship_cost) as total_shipping_cost, sum(ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk) JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk) LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number FROM web_sales ws2 JOIN web_sales ws3 ON (ws2.ws_order_number = ws3.ws_order_number) WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk ) ws_wh1 ON (ws1.ws_order_number = ws_wh1.ws_order_number) LEFT OUTER JOIN web_returns wr1 ON (ws1.ws_order_number = wr1.wr_order_number) WHERE d.d_date between '1999-05-01' and '1999-07-01' and ca.ca_state = 'TX' and s.web_company_name = 'pri' and wr1.wr_order_number is null limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1, Stage-7 + Stage-3 depends on stages: Stage-2 + Stage-5 is a root stage + Stage-6 depends on stages: Stage-5 + Stage-7 depends on stages: Stage-6 + Stage-0 depends on stages: Stage-3 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: ws2 + Statistics: Num rows: 204 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ws_order_number is not null (type: boolean) + Statistics: Num rows: 102 Data size: 819 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_order_number (type: int) + sort order: + + Map-reduce partition columns: ws_order_number (type: int) + Statistics: Num rows: 102 Data size: 819 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_warehouse_sk (type: int) + TableScan + alias: ws3 + Statistics: Num rows: 204 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ws_order_number is not null (type: boolean) + Statistics: Num rows: 102 Data size: 819 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_order_number (type: int) + sort order: + + Map-reduce partition columns: ws_order_number (type: int) + Statistics: Num rows: 102 Data size: 819 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_warehouse_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_order_number (type: int) + 1 ws_order_number (type: int) + outputColumnNames: _col15, _col17, _col52 + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (_col15 <> _col52) (type: boolean) + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col17 (type: int) + outputColumnNames: _col0 + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: int) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + TableScan + Reduce Output Operator + key expressions: _col17 (type: int) + sort order: + + Map-reduce partition columns: _col17 (type: int) + Statistics: Num rows: 13 Data size: 92 Basic stats: COMPLETE Column stats: NONE + value expressions: _col28 (type: decimal(7,2)), _col33 (type: decimal(7,2)) + TableScan + alias: wr1 + Statistics: Num rows: 34 Data size: 137 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: wr_order_number (type: int) + sort order: + + Map-reduce partition columns: wr_order_number (type: int) + Statistics: Num rows: 34 Data size: 137 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Left Semi Join 0 to 1 + Left Outer Join0 to 2 + keys: + 0 _col17 (type: int) + 1 _col0 (type: int) + 2 wr_order_number (type: int) + outputColumnNames: _col17, _col28, _col33, _col126 + Statistics: Num rows: 246 Data size: 1980 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: _col126 is null (type: boolean) + Statistics: Num rows: 123 Data size: 990 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col17 (type: int), _col28 (type: decimal(7,2)), _col33 (type: decimal(7,2)) + outputColumnNames: _col17, _col28, _col33 + Statistics: Num rows: 123 Data size: 990 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count(DISTINCT _col17), sum(_col28), sum(_col33) + keys: _col17 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 123 Data size: 990 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Statistics: Num rows: 123 Data size: 990 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: decimal(17,2)), _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: count(DISTINCT KEY._col0:0._col0), sum(VALUE._col1), sum(VALUE._col2) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + alias: ws1 + Statistics: Num rows: 6 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((ws_ship_addr_sk is not null and ws_web_site_sk is not null) and ws_ship_date_sk is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 273 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_ship_addr_sk (type: int) + sort order: + + Map-reduce partition columns: ws_ship_addr_sk (type: int) + Statistics: Num rows: 1 Data size: 273 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_ship_date_sk (type: int), ws_web_site_sk (type: int), ws_order_number (type: int), ws_ext_ship_cost (type: decimal(7,2)), ws_net_profit (type: decimal(7,2)) + TableScan + alias: ca + Statistics: Num rows: 18 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ca_address_sk is not null and (ca_state = 'TX')) (type: boolean) + Statistics: Num rows: 4 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 4 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_ship_addr_sk (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col2, _col13, _col17, _col28, _col33 + Statistics: Num rows: 4 Data size: 26 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col13 (type: int) + sort order: + + Map-reduce partition columns: _col13 (type: int) + Statistics: Num rows: 4 Data size: 26 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col17 (type: int), _col28 (type: decimal(7,2)), _col33 (type: decimal(7,2)) + TableScan + alias: s + Statistics: Num rows: 46 Data size: 326 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (web_site_sk is not null and (web_company_name = 'pri')) (type: boolean) + Statistics: Num rows: 11 Data size: 77 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: web_site_sk (type: int) + sort order: + + Map-reduce partition columns: web_site_sk (type: int) + Statistics: Num rows: 11 Data size: 77 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col13 (type: int) + 1 web_site_sk (type: int) + outputColumnNames: _col2, _col17, _col28, _col33 + Statistics: Num rows: 12 Data size: 84 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 12 Data size: 84 Basic stats: COMPLETE Column stats: NONE + value expressions: _col17 (type: int), _col28 (type: decimal(7,2)), _col33 (type: decimal(7,2)) + TableScan + alias: d + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_date BETWEEN '1999-05-01' AND '1999-07-01') (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col17, _col28, _col33 + Statistics: Num rows: 13 Data size: 92 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query95.q.out b/ql/src/test/results/clientpositive/perf/query95.q.out new file mode 100644 index 0000000..47c909d --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query95.q.out @@ -0,0 +1,357 @@ +PREHOOK: query: explain SELECT count(distinct ws1.ws_order_number) as order_count, sum(ws1.ws_ext_ship_cost) as total_shipping_cost, sum(ws1.ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk) JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk) LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number FROM web_sales ws2 JOIN web_sales ws3 ON (ws2.ws_order_number = ws3.ws_order_number) WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk ) ws_wh1 ON (ws1.ws_order_number = ws_wh1.ws_order_number) LEFT SEMI JOIN (SELECT wr_order_number FROM web_returns wr JOIN (SELECT ws4.ws_order_number as ws_order_number FROM web_sales ws4 JOIN web_sales ws5 ON (ws4.ws_order_number = ws5.ws_order_number) WHERE ws4.ws_warehouse_sk <> ws5.ws_warehouse_sk ) ws_wh2 ON (wr.wr_order_number = ws_wh2.ws_order_number)) tmp1 ON (ws1.ws_order_number = tmp1.wr_order_number) WHERE d.d_date between '2002-05-01' and '2002-06-30' and ca.ca_state = 'GA' and s.web_company_name = 'pri' +PREHOOK: type: QUERY +POSTHOOK: query: explain SELECT count(distinct ws1.ws_order_number) as order_count, sum(ws1.ws_ext_ship_cost) as total_shipping_cost, sum(ws1.ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk) JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk) LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number FROM web_sales ws2 JOIN web_sales ws3 ON (ws2.ws_order_number = ws3.ws_order_number) WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk ) ws_wh1 ON (ws1.ws_order_number = ws_wh1.ws_order_number) LEFT SEMI JOIN (SELECT wr_order_number FROM web_returns wr JOIN (SELECT ws4.ws_order_number as ws_order_number FROM web_sales ws4 JOIN web_sales ws5 ON (ws4.ws_order_number = ws5.ws_order_number) WHERE ws4.ws_warehouse_sk <> ws5.ws_warehouse_sk ) ws_wh2 ON (wr.wr_order_number = ws_wh2.ws_order_number)) tmp1 ON (ws1.ws_order_number = tmp1.wr_order_number) WHERE d.d_date between '2002-05-01' and '2002-06-30' and ca.ca_state = 'GA' and s.web_company_name = 'pri' +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1, Stage-6, Stage-11 + Stage-3 depends on stages: Stage-2 + Stage-5 is a root stage + Stage-6 depends on stages: Stage-5 + Stage-9 is a root stage + Stage-10 depends on stages: Stage-9 + Stage-11 depends on stages: Stage-10 + Stage-0 depends on stages: Stage-3 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: ws2 + Statistics: Num rows: 204 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ws_order_number is not null (type: boolean) + Statistics: Num rows: 102 Data size: 819 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_order_number (type: int) + sort order: + + Map-reduce partition columns: ws_order_number (type: int) + Statistics: Num rows: 102 Data size: 819 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_warehouse_sk (type: int) + TableScan + alias: ws3 + Statistics: Num rows: 204 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ws_order_number is not null (type: boolean) + Statistics: Num rows: 102 Data size: 819 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_order_number (type: int) + sort order: + + Map-reduce partition columns: ws_order_number (type: int) + Statistics: Num rows: 102 Data size: 819 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_warehouse_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_order_number (type: int) + 1 ws_order_number (type: int) + outputColumnNames: _col15, _col17, _col52 + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (_col15 <> _col52) (type: boolean) + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col17 (type: int) + outputColumnNames: _col0 + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: int) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 123 Data size: 990 Basic stats: COMPLETE Column stats: NONE + TableScan + Reduce Output Operator + key expressions: _col17 (type: int) + sort order: + + Map-reduce partition columns: _col17 (type: int) + Statistics: Num rows: 13 Data size: 92 Basic stats: COMPLETE Column stats: NONE + value expressions: _col28 (type: decimal(7,2)), _col33 (type: decimal(7,2)) + Reduce Operator Tree: + Join Operator + condition map: + Left Semi Join 0 to 1 + Left Semi Join 0 to 2 + keys: + 0 _col17 (type: int) + 1 _col0 (type: int) + 2 _col0 (type: int) + outputColumnNames: _col17, _col28, _col33 + Statistics: Num rows: 270 Data size: 2178 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count(DISTINCT _col17), sum(_col28), sum(_col33) + keys: _col17 (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 270 Data size: 2178 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Statistics: Num rows: 270 Data size: 2178 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: decimal(17,2)), _col3 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: count(DISTINCT KEY._col0:0._col0), sum(VALUE._col1), sum(VALUE._col2) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + alias: ws4 + Statistics: Num rows: 204 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ws_order_number is not null (type: boolean) + Statistics: Num rows: 102 Data size: 819 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_order_number (type: int) + sort order: + + Map-reduce partition columns: ws_order_number (type: int) + Statistics: Num rows: 102 Data size: 819 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_warehouse_sk (type: int) + TableScan + alias: ws5 + Statistics: Num rows: 204 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ws_order_number is not null (type: boolean) + Statistics: Num rows: 102 Data size: 819 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_order_number (type: int) + sort order: + + Map-reduce partition columns: ws_order_number (type: int) + Statistics: Num rows: 102 Data size: 819 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_warehouse_sk (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_order_number (type: int) + 1 ws_order_number (type: int) + outputColumnNames: _col15, _col17, _col52 + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (_col15 <> _col52) (type: boolean) + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col17 (type: int) + outputColumnNames: _col0 + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 112 Data size: 900 Basic stats: COMPLETE Column stats: NONE + TableScan + alias: wr + Statistics: Num rows: 34 Data size: 137 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: wr_order_number is not null (type: boolean) + Statistics: Num rows: 17 Data size: 68 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: wr_order_number (type: int) + sort order: + + Map-reduce partition columns: wr_order_number (type: int) + Statistics: Num rows: 17 Data size: 68 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 wr_order_number (type: int) + 1 _col0 (type: int) + outputColumnNames: _col13 + Statistics: Num rows: 123 Data size: 990 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col13 (type: int) + outputColumnNames: _col0 + Statistics: Num rows: 123 Data size: 990 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: int) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 123 Data size: 990 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-9 + Map Reduce + Map Operator Tree: + TableScan + alias: ws1 + Statistics: Num rows: 6 Data size: 1638 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((ws_ship_addr_sk is not null and ws_web_site_sk is not null) and ws_ship_date_sk is not null) and ws_order_number is not null) (type: boolean) + Statistics: Num rows: 1 Data size: 273 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ws_ship_addr_sk (type: int) + sort order: + + Map-reduce partition columns: ws_ship_addr_sk (type: int) + Statistics: Num rows: 1 Data size: 273 Basic stats: COMPLETE Column stats: NONE + value expressions: ws_ship_date_sk (type: int), ws_web_site_sk (type: int), ws_order_number (type: int), ws_ext_ship_cost (type: decimal(7,2)), ws_net_profit (type: decimal(7,2)) + TableScan + alias: ca + Statistics: Num rows: 18 Data size: 108 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ca_address_sk is not null and (ca_state = 'GA')) (type: boolean) + Statistics: Num rows: 4 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ca_address_sk (type: int) + sort order: + + Map-reduce partition columns: ca_address_sk (type: int) + Statistics: Num rows: 4 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ws_ship_addr_sk (type: int) + 1 ca_address_sk (type: int) + outputColumnNames: _col2, _col13, _col17, _col28, _col33 + Statistics: Num rows: 4 Data size: 26 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-10 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col13 (type: int) + sort order: + + Map-reduce partition columns: _col13 (type: int) + Statistics: Num rows: 4 Data size: 26 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col17 (type: int), _col28 (type: decimal(7,2)), _col33 (type: decimal(7,2)) + TableScan + alias: s + Statistics: Num rows: 46 Data size: 326 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (web_site_sk is not null and (web_company_name = 'pri')) (type: boolean) + Statistics: Num rows: 11 Data size: 77 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: web_site_sk (type: int) + sort order: + + Map-reduce partition columns: web_site_sk (type: int) + Statistics: Num rows: 11 Data size: 77 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col13 (type: int) + 1 web_site_sk (type: int) + outputColumnNames: _col2, _col17, _col28, _col33 + Statistics: Num rows: 12 Data size: 84 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-11 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col2 (type: int) + sort order: + + Map-reduce partition columns: _col2 (type: int) + Statistics: Num rows: 12 Data size: 84 Basic stats: COMPLETE Column stats: NONE + value expressions: _col17 (type: int), _col28 (type: decimal(7,2)), _col33 (type: decimal(7,2)) + TableScan + alias: d + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_date BETWEEN '2002-05-01' AND '2002-06-30') (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col2 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col17, _col28, _col33 + Statistics: Num rows: 13 Data size: 92 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query96.q.out b/ql/src/test/results/clientpositive/perf/query96.q.out new file mode 100644 index 0000000..363606a --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query96.q.out @@ -0,0 +1,191 @@ +PREHOOK: query: explain select count(*) as c from store_sales ,household_demographics ,time_dim, store where store_sales.ss_sold_time_sk = time_dim.t_time_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_store_sk = store.s_store_sk and time_dim.t_hour = 8 and time_dim.t_minute >= 30 and household_demographics.hd_dep_count = 5 and store.s_store_name = 'ese' order by c limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select count(*) as c from store_sales ,household_demographics ,time_dim, store where store_sales.ss_sold_time_sk = time_dim.t_time_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_store_sk = store.s_store_sk and time_dim.t_hour = 8 and time_dim.t_minute >= 30 and household_demographics.hd_dep_count = 5 and store.s_store_name = 'ese' order by c limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-0 depends on stages: Stage-5 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 339 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((ss_hdemo_sk is not null and ss_sold_time_sk is not null) and ss_store_sk is not null) (type: boolean) + Statistics: Num rows: 43 Data size: 516 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_hdemo_sk (type: int) + sort order: + + Map-reduce partition columns: ss_hdemo_sk (type: int) + Statistics: Num rows: 43 Data size: 516 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_time_sk (type: int), ss_store_sk (type: int) + TableScan + alias: household_demographics + Statistics: Num rows: 3 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (hd_demo_sk is not null and (hd_dep_count = 5)) (type: boolean) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: hd_demo_sk (type: int) + sort order: + + Map-reduce partition columns: hd_demo_sk (type: int) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_hdemo_sk (type: int) + 1 hd_demo_sk (type: int) + outputColumnNames: _col1, _col5, _col7, _col26 + Statistics: Num rows: 47 Data size: 567 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: int) + sort order: + + Map-reduce partition columns: _col1 (type: int) + Statistics: Num rows: 47 Data size: 567 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: int), _col7 (type: int), _col26 (type: int) + TableScan + alias: time_dim + Statistics: Num rows: 5 Data size: 64 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((t_time_sk is not null and (t_hour = 8)) and (t_minute >= 30)) (type: boolean) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: t_time_sk (type: int) + sort order: + + Map-reduce partition columns: t_time_sk (type: int) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: t_minute (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: int) + 1 t_time_sk (type: int) + outputColumnNames: _col1, _col5, _col7, _col26, _col34, _col38 + Statistics: Num rows: 51 Data size: 623 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col7 (type: int) + sort order: + + Map-reduce partition columns: _col7 (type: int) + Statistics: Num rows: 51 Data size: 623 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: int), _col5 (type: int), _col26 (type: int), _col34 (type: int), _col38 (type: int) + TableScan + alias: store + Statistics: Num rows: 36 Data size: 255 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (s_store_sk is not null and (s_store_name = 'ese')) (type: boolean) + Statistics: Num rows: 9 Data size: 63 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: s_store_sk (type: int) + sort order: + + Map-reduce partition columns: s_store_sk (type: int) + Statistics: Num rows: 9 Data size: 63 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col7 (type: int) + 1 s_store_sk (type: int) + outputColumnNames: _col1, _col5, _col7, _col26, _col34, _col38, _col47 + Statistics: Num rows: 56 Data size: 685 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((_col1 = _col34) and (_col5 = _col26)) and (_col7 = _col47)) and (_col38 >= 30)) (type: boolean) + Statistics: Num rows: 2 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Select Operator + Statistics: Num rows: 2 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count() + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: bigint) + sort order: + + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: bigint) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query97.q.out b/ql/src/test/results/clientpositive/perf/query97.q.out new file mode 100644 index 0000000..9e79ee7 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query97.q.out @@ -0,0 +1,223 @@ +PREHOOK: query: explain select sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) store_only ,sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) catalog_only ,sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) store_and_catalog from ( select ss_customer_sk customer_sk ,ss_item_sk item_sk from store_sales JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk where d_month_seq between 1193 and 1193 + 11 group by ss_customer_sk ,ss_item_sk) ssci full outer join ( select cs_bill_customer_sk customer_sk ,cs_item_sk item_sk from catalog_sales JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk where d_month_seq between 1193 and 1193 + 11 group by cs_bill_customer_sk ,cs_item_sk) csci on (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk) limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) store_only ,sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) catalog_only ,sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) store_and_catalog from ( select ss_customer_sk customer_sk ,ss_item_sk item_sk from store_sales JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk where d_month_seq between 1193 and 1193 + 11 group by ss_customer_sk ,ss_item_sk) ssci full outer join ( select cs_bill_customer_sk customer_sk ,cs_item_sk item_sk from catalog_sales JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk where d_month_seq between 1193 and 1193 + 11 group by cs_bill_customer_sk ,cs_item_sk) csci on (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk) limit 100 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2, Stage-7 + Stage-4 depends on stages: Stage-3 + Stage-6 is a root stage + Stage-7 depends on stages: Stage-6 + Stage-0 depends on stages: Stage-4 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 339 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ss_sold_date_sk is not null (type: boolean) + Statistics: Num rows: 170 Data size: 2041 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: ss_sold_date_sk (type: int) + Statistics: Num rows: 170 Data size: 2041 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_item_sk (type: int), ss_customer_sk (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col2, _col3 + Statistics: Num rows: 187 Data size: 2245 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col3 (type: int), _col2 (type: int) + outputColumnNames: _col3, _col2 + Statistics: Num rows: 187 Data size: 2245 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col3 (type: int), _col2 (type: int) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 187 Data size: 2245 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 187 Data size: 2245 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: int), KEY._col1 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1 + Statistics: Num rows: 93 Data size: 1116 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 93 Data size: 1116 Basic stats: COMPLETE Column stats: NONE + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 71 Data size: 852 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Outer Join 0 to 1 + keys: + 0 _col0 (type: int), _col1 (type: int) + 1 _col0 (type: int), _col1 (type: int) + outputColumnNames: _col0, _col2 + Statistics: Num rows: 102 Data size: 1227 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(CASE WHEN ((_col0 is not null and _col2 is null)) THEN (1) ELSE (0) END), sum(CASE WHEN ((_col0 is null and _col2 is not null)) THEN (1) ELSE (0) END), sum(CASE WHEN ((_col0 is not null and _col2 is not null)) THEN (1) ELSE (0) END) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint), _col1 (type: bigint), _col2 (type: bigint) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0), sum(VALUE._col1), sum(VALUE._col2) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 100 + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-6 + Map Reduce + Map Operator Tree: + TableScan + alias: catalog_sales + Statistics: Num rows: 260 Data size: 3122 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: cs_sold_date_sk is not null (type: boolean) + Statistics: Num rows: 130 Data size: 1561 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: cs_sold_date_sk (type: int) + sort order: + + Map-reduce partition columns: cs_sold_date_sk (type: int) + Statistics: Num rows: 130 Data size: 1561 Basic stats: COMPLETE Column stats: NONE + value expressions: cs_bill_customer_sk (type: int), cs_item_sk (type: int) + TableScan + alias: date_dim + Statistics: Num rows: 17 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) (type: boolean) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 cs_sold_date_sk (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col3, _col15 + Statistics: Num rows: 143 Data size: 1717 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col3 (type: int), _col15 (type: int) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 143 Data size: 1717 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-7 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 143 Data size: 1717 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: int), KEY._col1 (type: int) + mode: mergepartial + outputColumnNames: _col0, _col1 + Statistics: Num rows: 71 Data size: 852 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-0 + Fetch Operator + limit: 100 + Processor Tree: + ListSink + diff --git a/ql/src/test/results/clientpositive/perf/query98.q.out b/ql/src/test/results/clientpositive/perf/query98.q.out new file mode 100644 index 0000000..7fc12a6 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query98.q.out @@ -0,0 +1,205 @@ +PREHOOK: query: explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(ss_ext_sales_price) as itemrevenue ,sum(ss_ext_sales_price)*100/sum(sum(ss_ext_sales_price)) over (partition by i_class) as revenueratio from store_sales ,item ,date_dim where store_sales.ss_item_sk = item.i_item_sk and i_category in ('Jewelry', 'Sports', 'Books') and store_sales.ss_sold_date_sk = date_dim.d_date_sk and d_date between cast('2001-01-12' as date) and (cast('2001-02-11' as date)) group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(ss_ext_sales_price) as itemrevenue ,sum(ss_ext_sales_price)*100/sum(sum(ss_ext_sales_price)) over (partition by i_class) as revenueratio from store_sales ,item ,date_dim where store_sales.ss_item_sk = item.i_item_sk and i_category in ('Jewelry', 'Sports', 'Books') and store_sales.ss_sold_date_sk = date_dim.d_date_sk and d_date between cast('2001-01-12' as date) and (cast('2001-02-11' as date)) group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-3 depends on stages: Stage-2 + Stage-4 depends on stages: Stage-3 + Stage-5 depends on stages: Stage-4 + Stage-0 depends on stages: Stage-5 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: store_sales + Statistics: Num rows: 33 Data size: 4071 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (ss_item_sk is not null and ss_sold_date_sk is not null) (type: boolean) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: ss_item_sk (type: int) + sort order: + + Map-reduce partition columns: ss_item_sk (type: int) + Statistics: Num rows: 9 Data size: 1110 Basic stats: COMPLETE Column stats: NONE + value expressions: ss_sold_date_sk (type: int), ss_ext_sales_price (type: decimal(7,2)) + TableScan + alias: item + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (i_item_sk is not null and (i_category) IN ('Jewelry', 'Sports', 'Books')) (type: boolean) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: i_item_sk (type: int) + sort order: + + Map-reduce partition columns: i_item_sk (type: int) + Statistics: Num rows: 1 Data size: 198 Basic stats: COMPLETE Column stats: NONE + value expressions: i_item_id (type: string), i_item_desc (type: string), i_current_price (type: decimal(7,2)), i_class (type: string), i_category (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 ss_item_sk (type: int) + 1 i_item_sk (type: int) + outputColumnNames: _col0, _col2, _col15, _col26, _col27, _col30, _col31, _col36, _col38 + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 9 Data size: 1221 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col15 (type: decimal(7,2)), _col26 (type: int), _col27 (type: string), _col30 (type: string), _col31 (type: decimal(7,2)), _col36 (type: string), _col38 (type: string) + TableScan + alias: date_dim + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (d_date_sk is not null and d_date BETWEEN 2001-01-12 AND 2001-02-11) (type: boolean) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: d_date_sk (type: int) + sort order: + + Map-reduce partition columns: d_date_sk (type: int) + Statistics: Num rows: 1 Data size: 140 Basic stats: COMPLETE Column stats: NONE + value expressions: d_date (type: string) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: int) + 1 d_date_sk (type: int) + outputColumnNames: _col0, _col2, _col15, _col26, _col27, _col30, _col31, _col36, _col38, _col51, _col53 + Statistics: Num rows: 9 Data size: 1343 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((((_col2 = _col26) and (_col38) IN ('Jewelry', 'Sports', 'Books')) and (_col0 = _col51)) and _col53 BETWEEN 2001-01-12 AND 2001-02-11) (type: boolean) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col27 (type: string), _col30 (type: string), _col38 (type: string), _col36 (type: string), _col31 (type: decimal(7,2)), _col15 (type: decimal(7,2)) + outputColumnNames: _col27, _col30, _col38, _col36, _col31, _col15 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col15) + keys: _col27 (type: string), _col30 (type: string), _col38 (type: string), _col36 (type: string), _col31 (type: decimal(7,2)) + mode: hash + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-3 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: decimal(7,2)) + sort order: +++++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: decimal(7,2)) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + value expressions: _col5 (type: decimal(17,2)) + Reduce Operator Tree: + Group By Operator + aggregations: sum(VALUE._col0) + keys: KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: decimal(7,2)) + mode: mergepartial + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-4 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col3 (type: string) + sort order: + + Map-reduce partition columns: _col3 (type: string) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col4 (type: decimal(7,2)), _col5 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: string), VALUE._col1 (type: string), VALUE._col2 (type: string), KEY.reducesinkkey0 (type: string), VALUE._col3 (type: decimal(7,2)), VALUE._col4 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + PTF Operator + Function definitions: + Input definition + input alias: ptf_0 + output shape: _col0: string, _col1: string, _col2: string, _col3: string, _col4: decimal(7,2), _col5: decimal(17,2) + type: WINDOWING + Windowing table definition + input alias: ptf_1 + name: windowingtablefunction + order by: _col3 + partition by: _col3 + raw input shape: + window functions: + window function definition + alias: sum_window_0 + arguments: _col5 + name: sum + window function: GenericUDAFSumHiveDecimal + window frame: PRECEDING(MAX)~FOLLOWING(MAX) + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: decimal(7,2)), _col0 (type: string), _col5 (type: decimal(17,2)), ((_col5 * 100) / sum_window_0) (type: decimal(38,23)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-5 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + key expressions: _col1 (type: string), _col2 (type: string), _col4 (type: string), _col0 (type: string), _col6 (type: decimal(38,23)) + sort order: +++++ + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + value expressions: _col3 (type: decimal(7,2)), _col5 (type: decimal(17,2)) + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey3 (type: string), KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: decimal(7,2)), KEY.reducesinkkey2 (type: string), VALUE._col1 (type: decimal(17,2)), KEY.reducesinkkey4 (type: decimal(38,23)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + diff --git a/ql/src/test/templates/TestPerfCliDriver.vm b/ql/src/test/templates/TestPerfCliDriver.vm new file mode 100644 index 0000000..b83d316 --- /dev/null +++ b/ql/src/test/templates/TestPerfCliDriver.vm @@ -0,0 +1,169 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.cli; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +import java.io.*; +import java.util.*; + +import org.apache.hadoop.hive.ql.QTestUtil; +import org.apache.hadoop.hive.ql.QTestUtil.MiniClusterType; +import org.apache.hadoop.hive.ql.session.SessionState; + +public class $className extends TestCase { + + private static final String HIVE_ROOT = QTestUtil.ensurePathEndsInSlash(System.getProperty("hive.root")); + private static QTestUtil qt; + + public static class TestPerfCliDriverAddTestFromQFiles implements QTestUtil.SuiteAddTestFunctor { + public void addTestToSuite(TestSuite suite, Object setup, String tName) { + suite.addTest(new $className("testPerfCliDriver_"+tName)); + } + } + + static { + + MiniClusterType miniMR = MiniClusterType.valueForString("$clusterMode"); + String hiveConfDir = "$hiveConfDir"; + String initScript = "$initScript"; + String cleanupScript = "$cleanupScript"; + try { + String hadoopVer = "$hadoopVersion"; + if (!hiveConfDir.isEmpty()) { + hiveConfDir = HIVE_ROOT + hiveConfDir; + } + qt = new QTestUtil((HIVE_ROOT + "$resultsDir"), (HIVE_ROOT + "$logDir"), miniMR, + hiveConfDir, hadoopVer, initScript, cleanupScript); + + // do a one time initialization + qt.cleanUp(); + qt.createSources(); + + } catch (Exception e) { + System.err.println("Exception: " + e.getMessage()); + e.printStackTrace(); + System.err.flush(); + fail("Unexpected exception in static initialization: "+e.getMessage()); + } + } + + public $className(String name) { + super(name); + } + + @Override + protected void setUp() { + try { + qt.clearTestSideEffects(); + } catch (Exception e) { + System.err.println("Exception: " + e.getMessage()); + e.printStackTrace(); + System.err.flush(); + fail("Unexpected exception in setup"); + } + } + + /** + * Dummy last test. This is only meant to shutdown qt + */ + public void testPerfCliDriver_shutdown() { + System.err.println ("Cleaning up " + "$className"); + } + + @Override + protected void tearDown() { + try { + qt.clearPostTestEffects(); + if (getName().equals("testPerfCliDriver_shutdown")) + qt.shutdown(); + } + catch (Exception e) { + System.err.println("Exception: " + e.getMessage()); + e.printStackTrace(); + System.err.flush(); + fail("Unexpected exception in tearDown"); + } + } + + public static Test suite() { + Set qFilesToExecute = new HashSet(); + String qFiles = System.getProperty("qfile", "").trim(); + if(!qFiles.isEmpty()) { + for(String qFile : qFiles.split(",")) { + qFile = qFile.trim(); + if(!qFile.isEmpty()) { + qFilesToExecute.add(qFile); + } + } + } + + TestSuite suite = new TestSuite(); + + QTestUtil.addTestsToSuiteFromQfileNames("$qFileNamesFile", qFilesToExecute, + suite, null, new TestPerfCliDriverAddTestFromQFiles()); + suite.addTest(new $className("testPerfCliDriver_shutdown")); + return suite; + } + + static String debugHint = "\nSee ./ql/target/tmp/log/hive.log or ./itests/qtest/target/tmp/log/hive.log, " + + "or check ./ql/target/surefire-reports or ./itests/qtest/target/surefire-reports/ for specific test cases logs."; + +#foreach ($qf in $qfiles) + #set ($fname = $qf.getName()) + #set ($eidx = $fname.indexOf('.')) + #set ($tname = $fname.substring(0, $eidx)) + #set ($fpath = $qfilesMap.get($fname)) + public void testPerfCliDriver_$tname() throws Exception { + runTest("$tname", "$fname", (HIVE_ROOT + "$fpath")); + } + +#end + + private void runTest(String tname, String fname, String fpath) throws Exception { + long startTime = System.currentTimeMillis(); + try { + System.err.println("Begin query: " + fname); + + qt.addFile(fpath); + + if (qt.shouldBeSkipped(fname)) { + return; + } + + qt.cliInit(fname, true); + int ecode = qt.executeClient(fname); + if (ecode != 0) { + qt.failed(ecode, fname, debugHint); + } + ecode = qt.checkCliDriverResults(fname); + if (ecode != 0) { + qt.failedDiff(ecode, fname, debugHint); + } + } + catch (Throwable e) { + qt.failed(e, fname, debugHint); + } + + long elapsedTime = System.currentTimeMillis() - startTime; + System.err.println("Done query: " + fname + " elapsedTime=" + elapsedTime/1000 + "s"); + assertTrue("Test passed", true); + } +}