diff --git a/ql/src/test/results/clientpositive/jdbc/postgres/cbo_query47.q.out b/ql/src/test/results/clientpositive/jdbc/postgres/cbo_query47.q.out deleted file mode 100644 index 2eccbc16d0e9..000000000000 --- a/ql/src/test/results/clientpositive/jdbc/postgres/cbo_query47.q.out +++ /dev/null @@ -1,192 +0,0 @@ -PREHOOK: query: explain cbo -with v1 as( - select i_category, i_brand, - s_store_name, s_company_name, - d_year, d_moy, - sum(ss_sales_price) sum_sales, - avg(sum(ss_sales_price)) over - (partition by i_category, i_brand, - s_store_name, s_company_name, d_year) - avg_monthly_sales, - rank() over - (partition by i_category, i_brand, - s_store_name, s_company_name - order by d_year, d_moy) rn - from item, store_sales, date_dim, store - where ss_item_sk = i_item_sk and - ss_sold_date_sk = d_date_sk and - ss_store_sk = s_store_sk and - ( - d_year = 2000 or - ( d_year = 2000-1 and d_moy =12) or - ( d_year = 2000+1 and d_moy =1) - ) - group by i_category, i_brand, - s_store_name, s_company_name, - d_year, d_moy), - v2 as( - select v1.i_category - ,v1.d_year, v1.d_moy - ,v1.avg_monthly_sales - ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum - from v1, v1 v1_lag, v1 v1_lead - where v1.i_category = v1_lag.i_category and - v1.i_category = v1_lead.i_category and - v1.i_brand = v1_lag.i_brand and - v1.i_brand = v1_lead.i_brand and - v1.s_store_name = v1_lag.s_store_name and - v1.s_store_name = v1_lead.s_store_name and - v1.s_company_name = v1_lag.s_company_name and - v1.s_company_name = v1_lead.s_company_name and - v1.rn = v1_lag.rn + 1 and - v1.rn = v1_lead.rn - 1) - select * - from v2 - where d_year = 2000 and - avg_monthly_sales > 0 and - case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1 - order by sum_sales - avg_monthly_sales, 3 - limit 100 -PREHOOK: type: QUERY -PREHOOK: Input: default@date_dim -PREHOOK: Input: default@item -PREHOOK: Input: default@store -PREHOOK: Input: default@store_sales -#### A masked pattern was here #### -POSTHOOK: query: explain cbo -with v1 as( - select i_category, i_brand, - s_store_name, s_company_name, - d_year, d_moy, - sum(ss_sales_price) sum_sales, - avg(sum(ss_sales_price)) over - (partition by i_category, i_brand, - s_store_name, s_company_name, d_year) - avg_monthly_sales, - rank() over - (partition by i_category, i_brand, - s_store_name, s_company_name - order by d_year, d_moy) rn - from item, store_sales, date_dim, store - where ss_item_sk = i_item_sk and - ss_sold_date_sk = d_date_sk and - ss_store_sk = s_store_sk and - ( - d_year = 2000 or - ( d_year = 2000-1 and d_moy =12) or - ( d_year = 2000+1 and d_moy =1) - ) - group by i_category, i_brand, - s_store_name, s_company_name, - d_year, d_moy), - v2 as( - select v1.i_category - ,v1.d_year, v1.d_moy - ,v1.avg_monthly_sales - ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum - from v1, v1 v1_lag, v1 v1_lead - where v1.i_category = v1_lag.i_category and - v1.i_category = v1_lead.i_category and - v1.i_brand = v1_lag.i_brand and - v1.i_brand = v1_lead.i_brand and - v1.s_store_name = v1_lag.s_store_name and - v1.s_store_name = v1_lead.s_store_name and - v1.s_company_name = v1_lag.s_company_name and - v1.s_company_name = v1_lead.s_company_name and - v1.rn = v1_lag.rn + 1 and - v1.rn = v1_lead.rn - 1) - select * - from v2 - where d_year = 2000 and - avg_monthly_sales > 0 and - case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1 - order by sum_sales - avg_monthly_sales, 3 - limit 100 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@date_dim -POSTHOOK: Input: default@item -POSTHOOK: Input: default@store -POSTHOOK: Input: default@store_sales -#### A masked pattern was here #### -CBO PLAN: -HiveProject(i_category=[$0], d_year=[$1], d_moy=[$2], avg_monthly_sales=[$3], sum_sales=[$4], psum=[$5], nsum=[$6]) - HiveSortLimit(sort0=[$7], sort1=[$2], dir0=[ASC], dir1=[ASC], fetch=[100]) - HiveProject(i_category=[$0], d_year=[$4], d_moy=[$5], avg_monthly_sales=[$7], sum_sales=[$6], psum=[$13], nsum=[$19], (- (tok_table_or_col sum_sales) (tok_table_or_col avg_monthly_sales))1=[-($6, $7)]) - HiveJoin(condition=[AND(=($0, $15), =($1, $16), =($2, $17), =($3, $18), =($8, $20))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[AND(=($0, $9), =($1, $10), =($2, $11), =($3, $12), =($8, $14))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject((tok_table_or_col i_category)=[$0], (tok_table_or_col i_brand)=[$1], (tok_table_or_col s_store_name)=[$2], (tok_table_or_col s_company_name)=[$3], (tok_table_or_col d_year)=[$4], (tok_table_or_col d_moy)=[$5], (tok_function sum (tok_table_or_col ss_sales_price))=[$6], avg_window_0=[$7], rank_window_1=[$8]) - HiveFilter(condition=[AND(>($7, 0:DECIMAL(1, 0)), =($4, 2000), CASE(>($7, 0:DECIMAL(1, 0)), >(/(ABS(-($6, $7)), $7), 0.1:DECIMAL(1, 1)), false), IS NOT NULL($8))]) - HiveProject((tok_table_or_col i_category)=[$1], (tok_table_or_col i_brand)=[$0], (tok_table_or_col s_store_name)=[$4], (tok_table_or_col s_company_name)=[$5], (tok_table_or_col d_year)=[$2], (tok_table_or_col d_moy)=[$3], (tok_function sum (tok_table_or_col ss_sales_price))=[$6], avg_window_0=[avg($6) OVER (PARTITION BY $1, $0, $4, $5, $2 ORDER BY $1 NULLS FIRST, $0 NULLS FIRST, $4 NULLS FIRST, $5 NULLS FIRST, $2 NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)], rank_window_1=[rank() OVER (PARTITION BY $1, $0, $4, $5 ORDER BY $2 NULLS LAST, $3 NULLS LAST RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)]) - HiveProject(i_brand=[$0], i_category=[$1], d_year=[$2], d_moy=[$3], s_store_name=[$4], s_company_name=[$5], $f6=[$6]) - HiveJdbcConverter(convention=[JDBC.POSTGRES]) - JdbcAggregate(group=[{5, 6, 8, 9, 11, 12}], agg#0=[sum($3)]) - JdbcJoin(condition=[=($2, $10)], joinType=[inner]) - JdbcJoin(condition=[=($0, $7)], joinType=[inner]) - JdbcJoin(condition=[=($1, $4)], joinType=[inner]) - JdbcProject(ss_sold_date_sk=[$0], ss_item_sk=[$1], ss_store_sk=[$2], ss_sales_price=[$3]) - JdbcFilter(condition=[AND(IS NOT NULL($1), IS NOT NULL($0), IS NOT NULL($2))]) - JdbcProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_store_sk=[$7], ss_sales_price=[$13]) - JdbcHiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) - JdbcProject(i_item_sk=[$0], i_brand=[$1], i_category=[$2]) - JdbcFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($2), IS NOT NULL($1))]) - JdbcProject(i_item_sk=[$0], i_brand=[$8], i_category=[$12]) - JdbcHiveTableScan(table=[[default, item]], table:alias=[item]) - JdbcProject(d_date_sk=[$0], d_year=[$1], d_moy=[$2]) - JdbcFilter(condition=[AND(OR(=($1, 2000), AND(=($1, 1999), =($2, 12)), AND(=($1, 2001), =($2, 1))), IN($1, 2000, 1999, 2001), IS NOT NULL($0))]) - JdbcProject(d_date_sk=[$0], d_year=[$6], d_moy=[$8]) - JdbcHiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - JdbcProject(s_store_sk=[$0], s_store_name=[$1], s_company_name=[$2]) - JdbcFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($1), IS NOT NULL($2))]) - JdbcProject(s_store_sk=[$0], s_store_name=[$5], s_company_name=[$17]) - JdbcHiveTableScan(table=[[default, store]], table:alias=[store]) - HiveProject((tok_table_or_col i_category)=[$0], (tok_table_or_col i_brand)=[$1], (tok_table_or_col s_store_name)=[$2], (tok_table_or_col s_company_name)=[$3], (tok_function sum (tok_table_or_col ss_sales_price))=[$4], +=[+($5, 1)]) - HiveFilter(condition=[IS NOT NULL($5)]) - HiveProject((tok_table_or_col i_category)=[$1], (tok_table_or_col i_brand)=[$0], (tok_table_or_col s_store_name)=[$4], (tok_table_or_col s_company_name)=[$5], (tok_function sum (tok_table_or_col ss_sales_price))=[$6], rank_window_1=[rank() OVER (PARTITION BY $1, $0, $4, $5 ORDER BY $2 NULLS LAST, $3 NULLS LAST RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)]) - HiveProject(i_brand=[$0], i_category=[$1], d_year=[$2], d_moy=[$3], s_store_name=[$4], s_company_name=[$5], $f6=[$6]) - HiveJdbcConverter(convention=[JDBC.POSTGRES]) - JdbcAggregate(group=[{5, 6, 8, 9, 11, 12}], agg#0=[sum($3)]) - JdbcJoin(condition=[=($2, $10)], joinType=[inner]) - JdbcJoin(condition=[=($0, $7)], joinType=[inner]) - JdbcJoin(condition=[=($1, $4)], joinType=[inner]) - JdbcProject(ss_sold_date_sk=[$0], ss_item_sk=[$1], ss_store_sk=[$2], ss_sales_price=[$3]) - JdbcFilter(condition=[AND(IS NOT NULL($1), IS NOT NULL($0), IS NOT NULL($2))]) - JdbcProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_store_sk=[$7], ss_sales_price=[$13]) - JdbcHiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) - JdbcProject(i_item_sk=[$0], i_brand=[$1], i_category=[$2]) - JdbcFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($2), IS NOT NULL($1))]) - JdbcProject(i_item_sk=[$0], i_brand=[$8], i_category=[$12]) - JdbcHiveTableScan(table=[[default, item]], table:alias=[item]) - JdbcProject(d_date_sk=[$0], d_year=[$1], d_moy=[$2]) - JdbcFilter(condition=[AND(OR(=($1, 2000), AND(=($1, 1999), =($2, 12)), AND(=($1, 2001), =($2, 1))), IN($1, 2000, 1999, 2001), IS NOT NULL($0))]) - JdbcProject(d_date_sk=[$0], d_year=[$6], d_moy=[$8]) - JdbcHiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - JdbcProject(s_store_sk=[$0], s_store_name=[$1], s_company_name=[$2]) - JdbcFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($1), IS NOT NULL($2))]) - JdbcProject(s_store_sk=[$0], s_store_name=[$5], s_company_name=[$17]) - JdbcHiveTableScan(table=[[default, store]], table:alias=[store]) - HiveProject((tok_table_or_col i_category)=[$0], (tok_table_or_col i_brand)=[$1], (tok_table_or_col s_store_name)=[$2], (tok_table_or_col s_company_name)=[$3], (tok_function sum (tok_table_or_col ss_sales_price))=[$4], -=[-($5, 1)]) - HiveFilter(condition=[IS NOT NULL($5)]) - HiveProject((tok_table_or_col i_category)=[$1], (tok_table_or_col i_brand)=[$0], (tok_table_or_col s_store_name)=[$4], (tok_table_or_col s_company_name)=[$5], (tok_function sum (tok_table_or_col ss_sales_price))=[$6], rank_window_1=[rank() OVER (PARTITION BY $1, $0, $4, $5 ORDER BY $2 NULLS LAST, $3 NULLS LAST RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)]) - HiveProject(i_brand=[$0], i_category=[$1], d_year=[$2], d_moy=[$3], s_store_name=[$4], s_company_name=[$5], $f6=[$6]) - HiveJdbcConverter(convention=[JDBC.POSTGRES]) - JdbcAggregate(group=[{5, 6, 8, 9, 11, 12}], agg#0=[sum($3)]) - JdbcJoin(condition=[=($2, $10)], joinType=[inner]) - JdbcJoin(condition=[=($0, $7)], joinType=[inner]) - JdbcJoin(condition=[=($1, $4)], joinType=[inner]) - JdbcProject(ss_sold_date_sk=[$0], ss_item_sk=[$1], ss_store_sk=[$2], ss_sales_price=[$3]) - JdbcFilter(condition=[AND(IS NOT NULL($1), IS NOT NULL($0), IS NOT NULL($2))]) - JdbcProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_store_sk=[$7], ss_sales_price=[$13]) - JdbcHiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) - JdbcProject(i_item_sk=[$0], i_brand=[$1], i_category=[$2]) - JdbcFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($2), IS NOT NULL($1))]) - JdbcProject(i_item_sk=[$0], i_brand=[$8], i_category=[$12]) - JdbcHiveTableScan(table=[[default, item]], table:alias=[item]) - JdbcProject(d_date_sk=[$0], d_year=[$1], d_moy=[$2]) - JdbcFilter(condition=[AND(OR(=($1, 2000), AND(=($1, 1999), =($2, 12)), AND(=($1, 2001), =($2, 1))), IN($1, 2000, 1999, 2001), IS NOT NULL($0))]) - JdbcProject(d_date_sk=[$0], d_year=[$6], d_moy=[$8]) - JdbcHiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - JdbcProject(s_store_sk=[$0], s_store_name=[$1], s_company_name=[$2]) - JdbcFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($1), IS NOT NULL($2))]) - JdbcProject(s_store_sk=[$0], s_store_name=[$5], s_company_name=[$17]) - JdbcHiveTableScan(table=[[default, store]], table:alias=[store]) - diff --git a/ql/src/test/results/clientpositive/jdbc/postgres/cbo_query57.q.out b/ql/src/test/results/clientpositive/jdbc/postgres/cbo_query57.q.out deleted file mode 100644 index 6b0cf166c374..000000000000 --- a/ql/src/test/results/clientpositive/jdbc/postgres/cbo_query57.q.out +++ /dev/null @@ -1,186 +0,0 @@ -PREHOOK: query: explain cbo -with v1 as( - select i_category, i_brand, - cc_name, - d_year, d_moy, - sum(cs_sales_price) sum_sales, - avg(sum(cs_sales_price)) over - (partition by i_category, i_brand, - cc_name, d_year) - avg_monthly_sales, - rank() over - (partition by i_category, i_brand, - cc_name - order by d_year, d_moy) rn - from item, catalog_sales, date_dim, call_center - where cs_item_sk = i_item_sk and - cs_sold_date_sk = d_date_sk and - cc_call_center_sk= cs_call_center_sk and - ( - d_year = 2000 or - ( d_year = 2000-1 and d_moy =12) or - ( d_year = 2000+1 and d_moy =1) - ) - group by i_category, i_brand, - cc_name , d_year, d_moy), - v2 as( - select v1.i_category, v1.i_brand - ,v1.d_year, v1.d_moy - ,v1.avg_monthly_sales - ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum - from v1, v1 v1_lag, v1 v1_lead - where v1.i_category = v1_lag.i_category and - v1.i_category = v1_lead.i_category and - v1.i_brand = v1_lag.i_brand and - v1.i_brand = v1_lead.i_brand and - v1. cc_name = v1_lag. cc_name and - v1. cc_name = v1_lead. cc_name and - v1.rn = v1_lag.rn + 1 and - v1.rn = v1_lead.rn - 1) - select * - from v2 - where d_year = 2000 and - avg_monthly_sales > 0 and - case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1 - order by sum_sales - avg_monthly_sales, 3 - limit 100 -PREHOOK: type: QUERY -PREHOOK: Input: default@call_center -PREHOOK: Input: default@catalog_sales -PREHOOK: Input: default@date_dim -PREHOOK: Input: default@item -#### A masked pattern was here #### -POSTHOOK: query: explain cbo -with v1 as( - select i_category, i_brand, - cc_name, - d_year, d_moy, - sum(cs_sales_price) sum_sales, - avg(sum(cs_sales_price)) over - (partition by i_category, i_brand, - cc_name, d_year) - avg_monthly_sales, - rank() over - (partition by i_category, i_brand, - cc_name - order by d_year, d_moy) rn - from item, catalog_sales, date_dim, call_center - where cs_item_sk = i_item_sk and - cs_sold_date_sk = d_date_sk and - cc_call_center_sk= cs_call_center_sk and - ( - d_year = 2000 or - ( d_year = 2000-1 and d_moy =12) or - ( d_year = 2000+1 and d_moy =1) - ) - group by i_category, i_brand, - cc_name , d_year, d_moy), - v2 as( - select v1.i_category, v1.i_brand - ,v1.d_year, v1.d_moy - ,v1.avg_monthly_sales - ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum - from v1, v1 v1_lag, v1 v1_lead - where v1.i_category = v1_lag.i_category and - v1.i_category = v1_lead.i_category and - v1.i_brand = v1_lag.i_brand and - v1.i_brand = v1_lead.i_brand and - v1. cc_name = v1_lag. cc_name and - v1. cc_name = v1_lead. cc_name and - v1.rn = v1_lag.rn + 1 and - v1.rn = v1_lead.rn - 1) - select * - from v2 - where d_year = 2000 and - avg_monthly_sales > 0 and - case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1 - order by sum_sales - avg_monthly_sales, 3 - limit 100 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@call_center -POSTHOOK: Input: default@catalog_sales -POSTHOOK: Input: default@date_dim -POSTHOOK: Input: default@item -#### A masked pattern was here #### -CBO PLAN: -HiveProject(i_category=[$0], i_brand=[$1], d_year=[$2], d_moy=[$3], avg_monthly_sales=[$4], sum_sales=[$5], psum=[$6], nsum=[$7]) - HiveSortLimit(sort0=[$8], sort1=[$2], dir0=[ASC], dir1=[ASC], fetch=[100]) - HiveProject(i_category=[$0], i_brand=[$1], d_year=[$3], d_moy=[$4], avg_monthly_sales=[$6], sum_sales=[$5], psum=[$11], nsum=[$16], (- (tok_table_or_col sum_sales) (tok_table_or_col avg_monthly_sales))1=[-($5, $6)]) - HiveJoin(condition=[AND(=($0, $13), =($1, $14), =($2, $15), =($7, $17))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[AND(=($0, $8), =($1, $9), =($2, $10), =($7, $12))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject((tok_table_or_col i_category)=[$0], (tok_table_or_col i_brand)=[$1], (tok_table_or_col cc_name)=[$2], (tok_table_or_col d_year)=[$3], (tok_table_or_col d_moy)=[$4], (tok_function sum (tok_table_or_col cs_sales_price))=[$5], avg_window_0=[$6], rank_window_1=[$7]) - HiveFilter(condition=[AND(>($6, 0:DECIMAL(1, 0)), =($3, 2000), CASE(>($6, 0:DECIMAL(1, 0)), >(/(ABS(-($5, $6)), $6), 0.1:DECIMAL(1, 1)), false), IS NOT NULL($7))]) - HiveProject((tok_table_or_col i_category)=[$2], (tok_table_or_col i_brand)=[$1], (tok_table_or_col cc_name)=[$0], (tok_table_or_col d_year)=[$3], (tok_table_or_col d_moy)=[$4], (tok_function sum (tok_table_or_col cs_sales_price))=[$5], avg_window_0=[avg($5) OVER (PARTITION BY $2, $1, $0, $3 ORDER BY $2 NULLS FIRST, $1 NULLS FIRST, $0 NULLS FIRST, $3 NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)], rank_window_1=[rank() OVER (PARTITION BY $2, $1, $0 ORDER BY $3 NULLS LAST, $4 NULLS LAST RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)]) - HiveProject(cc_name=[$0], i_brand=[$1], i_category=[$2], d_year=[$3], d_moy=[$4], $f5=[$5]) - HiveJdbcConverter(convention=[JDBC.POSTGRES]) - JdbcAggregate(group=[{5, 7, 8, 10, 11}], agg#0=[sum($3)]) - JdbcJoin(condition=[=($0, $9)], joinType=[inner]) - JdbcJoin(condition=[=($2, $6)], joinType=[inner]) - JdbcJoin(condition=[=($4, $1)], joinType=[inner]) - JdbcProject(cs_sold_date_sk=[$0], cs_call_center_sk=[$1], cs_item_sk=[$2], cs_sales_price=[$3]) - JdbcFilter(condition=[AND(IS NOT NULL($2), IS NOT NULL($0), IS NOT NULL($1))]) - JdbcProject(cs_sold_date_sk=[$0], cs_call_center_sk=[$11], cs_item_sk=[$15], cs_sales_price=[$21]) - JdbcHiveTableScan(table=[[default, catalog_sales]], table:alias=[catalog_sales]) - JdbcProject(cc_call_center_sk=[$0], cc_name=[$1]) - JdbcFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($1))]) - JdbcProject(cc_call_center_sk=[$0], cc_name=[$6]) - JdbcHiveTableScan(table=[[default, call_center]], table:alias=[call_center]) - JdbcProject(i_item_sk=[$0], i_brand=[$1], i_category=[$2]) - JdbcFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($2), IS NOT NULL($1))]) - JdbcProject(i_item_sk=[$0], i_brand=[$8], i_category=[$12]) - JdbcHiveTableScan(table=[[default, item]], table:alias=[item]) - JdbcProject(d_date_sk=[$0], d_year=[$1], d_moy=[$2]) - JdbcFilter(condition=[AND(OR(=($1, 2000), AND(=($1, 1999), =($2, 12)), AND(=($1, 2001), =($2, 1))), IN($1, 2000, 1999, 2001), IS NOT NULL($0))]) - JdbcProject(d_date_sk=[$0], d_year=[$6], d_moy=[$8]) - JdbcHiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject((tok_table_or_col i_category)=[$0], (tok_table_or_col i_brand)=[$1], (tok_table_or_col cc_name)=[$2], (tok_function sum (tok_table_or_col cs_sales_price))=[$3], +=[+($4, 1)]) - HiveFilter(condition=[IS NOT NULL($4)]) - HiveProject((tok_table_or_col i_category)=[$2], (tok_table_or_col i_brand)=[$1], (tok_table_or_col cc_name)=[$0], (tok_function sum (tok_table_or_col cs_sales_price))=[$5], rank_window_1=[rank() OVER (PARTITION BY $2, $1, $0 ORDER BY $3 NULLS LAST, $4 NULLS LAST RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)]) - HiveProject(cc_name=[$0], i_brand=[$1], i_category=[$2], d_year=[$3], d_moy=[$4], $f5=[$5]) - HiveJdbcConverter(convention=[JDBC.POSTGRES]) - JdbcAggregate(group=[{5, 7, 8, 10, 11}], agg#0=[sum($3)]) - JdbcJoin(condition=[=($0, $9)], joinType=[inner]) - JdbcJoin(condition=[=($2, $6)], joinType=[inner]) - JdbcJoin(condition=[=($4, $1)], joinType=[inner]) - JdbcProject(cs_sold_date_sk=[$0], cs_call_center_sk=[$1], cs_item_sk=[$2], cs_sales_price=[$3]) - JdbcFilter(condition=[AND(IS NOT NULL($2), IS NOT NULL($0), IS NOT NULL($1))]) - JdbcProject(cs_sold_date_sk=[$0], cs_call_center_sk=[$11], cs_item_sk=[$15], cs_sales_price=[$21]) - JdbcHiveTableScan(table=[[default, catalog_sales]], table:alias=[catalog_sales]) - JdbcProject(cc_call_center_sk=[$0], cc_name=[$1]) - JdbcFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($1))]) - JdbcProject(cc_call_center_sk=[$0], cc_name=[$6]) - JdbcHiveTableScan(table=[[default, call_center]], table:alias=[call_center]) - JdbcProject(i_item_sk=[$0], i_brand=[$1], i_category=[$2]) - JdbcFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($2), IS NOT NULL($1))]) - JdbcProject(i_item_sk=[$0], i_brand=[$8], i_category=[$12]) - JdbcHiveTableScan(table=[[default, item]], table:alias=[item]) - JdbcProject(d_date_sk=[$0], d_year=[$1], d_moy=[$2]) - JdbcFilter(condition=[AND(OR(=($1, 2000), AND(=($1, 1999), =($2, 12)), AND(=($1, 2001), =($2, 1))), IN($1, 2000, 1999, 2001), IS NOT NULL($0))]) - JdbcProject(d_date_sk=[$0], d_year=[$6], d_moy=[$8]) - JdbcHiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject((tok_table_or_col i_category)=[$0], (tok_table_or_col i_brand)=[$1], (tok_table_or_col cc_name)=[$2], (tok_function sum (tok_table_or_col cs_sales_price))=[$3], -=[-($4, 1)]) - HiveFilter(condition=[IS NOT NULL($4)]) - HiveProject((tok_table_or_col i_category)=[$2], (tok_table_or_col i_brand)=[$1], (tok_table_or_col cc_name)=[$0], (tok_function sum (tok_table_or_col cs_sales_price))=[$5], rank_window_1=[rank() OVER (PARTITION BY $2, $1, $0 ORDER BY $3 NULLS LAST, $4 NULLS LAST RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)]) - HiveProject(cc_name=[$0], i_brand=[$1], i_category=[$2], d_year=[$3], d_moy=[$4], $f5=[$5]) - HiveJdbcConverter(convention=[JDBC.POSTGRES]) - JdbcAggregate(group=[{5, 7, 8, 10, 11}], agg#0=[sum($3)]) - JdbcJoin(condition=[=($0, $9)], joinType=[inner]) - JdbcJoin(condition=[=($2, $6)], joinType=[inner]) - JdbcJoin(condition=[=($4, $1)], joinType=[inner]) - JdbcProject(cs_sold_date_sk=[$0], cs_call_center_sk=[$1], cs_item_sk=[$2], cs_sales_price=[$3]) - JdbcFilter(condition=[AND(IS NOT NULL($2), IS NOT NULL($0), IS NOT NULL($1))]) - JdbcProject(cs_sold_date_sk=[$0], cs_call_center_sk=[$11], cs_item_sk=[$15], cs_sales_price=[$21]) - JdbcHiveTableScan(table=[[default, catalog_sales]], table:alias=[catalog_sales]) - JdbcProject(cc_call_center_sk=[$0], cc_name=[$1]) - JdbcFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($1))]) - JdbcProject(cc_call_center_sk=[$0], cc_name=[$6]) - JdbcHiveTableScan(table=[[default, call_center]], table:alias=[call_center]) - JdbcProject(i_item_sk=[$0], i_brand=[$1], i_category=[$2]) - JdbcFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($2), IS NOT NULL($1))]) - JdbcProject(i_item_sk=[$0], i_brand=[$8], i_category=[$12]) - JdbcHiveTableScan(table=[[default, item]], table:alias=[item]) - JdbcProject(d_date_sk=[$0], d_year=[$1], d_moy=[$2]) - JdbcFilter(condition=[AND(OR(=($1, 2000), AND(=($1, 1999), =($2, 12)), AND(=($1, 2001), =($2, 1))), IN($1, 2000, 1999, 2001), IS NOT NULL($0))]) - JdbcProject(d_date_sk=[$0], d_year=[$6], d_moy=[$8]) - JdbcHiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - diff --git a/ql/src/test/results/clientpositive/jdbc/postgres/query47.q.out b/ql/src/test/results/clientpositive/jdbc/postgres/query47.q.out deleted file mode 100644 index 5438d91a83e8..000000000000 --- a/ql/src/test/results/clientpositive/jdbc/postgres/query47.q.out +++ /dev/null @@ -1,407 +0,0 @@ -PREHOOK: query: explain -with v1 as( - select i_category, i_brand, - s_store_name, s_company_name, - d_year, d_moy, - sum(ss_sales_price) sum_sales, - avg(sum(ss_sales_price)) over - (partition by i_category, i_brand, - s_store_name, s_company_name, d_year) - avg_monthly_sales, - rank() over - (partition by i_category, i_brand, - s_store_name, s_company_name - order by d_year, d_moy) rn - from item, store_sales, date_dim, store - where ss_item_sk = i_item_sk and - ss_sold_date_sk = d_date_sk and - ss_store_sk = s_store_sk and - ( - d_year = 2000 or - ( d_year = 2000-1 and d_moy =12) or - ( d_year = 2000+1 and d_moy =1) - ) - group by i_category, i_brand, - s_store_name, s_company_name, - d_year, d_moy), - v2 as( - select v1.i_category - ,v1.d_year, v1.d_moy - ,v1.avg_monthly_sales - ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum - from v1, v1 v1_lag, v1 v1_lead - where v1.i_category = v1_lag.i_category and - v1.i_category = v1_lead.i_category and - v1.i_brand = v1_lag.i_brand and - v1.i_brand = v1_lead.i_brand and - v1.s_store_name = v1_lag.s_store_name and - v1.s_store_name = v1_lead.s_store_name and - v1.s_company_name = v1_lag.s_company_name and - v1.s_company_name = v1_lead.s_company_name and - v1.rn = v1_lag.rn + 1 and - v1.rn = v1_lead.rn - 1) - select * - from v2 - where d_year = 2000 and - avg_monthly_sales > 0 and - case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1 - order by sum_sales - avg_monthly_sales, 3 - limit 100 -PREHOOK: type: QUERY -PREHOOK: Input: default@date_dim -PREHOOK: Input: default@item -PREHOOK: Input: default@store -PREHOOK: Input: default@store_sales -#### A masked pattern was here #### -POSTHOOK: query: explain -with v1 as( - select i_category, i_brand, - s_store_name, s_company_name, - d_year, d_moy, - sum(ss_sales_price) sum_sales, - avg(sum(ss_sales_price)) over - (partition by i_category, i_brand, - s_store_name, s_company_name, d_year) - avg_monthly_sales, - rank() over - (partition by i_category, i_brand, - s_store_name, s_company_name - order by d_year, d_moy) rn - from item, store_sales, date_dim, store - where ss_item_sk = i_item_sk and - ss_sold_date_sk = d_date_sk and - ss_store_sk = s_store_sk and - ( - d_year = 2000 or - ( d_year = 2000-1 and d_moy =12) or - ( d_year = 2000+1 and d_moy =1) - ) - group by i_category, i_brand, - s_store_name, s_company_name, - d_year, d_moy), - v2 as( - select v1.i_category - ,v1.d_year, v1.d_moy - ,v1.avg_monthly_sales - ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum - from v1, v1 v1_lag, v1 v1_lead - where v1.i_category = v1_lag.i_category and - v1.i_category = v1_lead.i_category and - v1.i_brand = v1_lag.i_brand and - v1.i_brand = v1_lead.i_brand and - v1.s_store_name = v1_lag.s_store_name and - v1.s_store_name = v1_lead.s_store_name and - v1.s_company_name = v1_lag.s_company_name and - v1.s_company_name = v1_lead.s_company_name and - v1.rn = v1_lag.rn + 1 and - v1.rn = v1_lead.rn - 1) - select * - from v2 - where d_year = 2000 and - avg_monthly_sales > 0 and - case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1 - order by sum_sales - avg_monthly_sales, 3 - limit 100 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@date_dim -POSTHOOK: Input: default@item -POSTHOOK: Input: default@store -POSTHOOK: Input: default@store_sales -#### A masked pattern was here #### -STAGE DEPENDENCIES: - Stage-1 is a root stage - Stage-0 depends on stages: Stage-1 - -STAGE PLANS: - Stage: Stage-1 - Tez -#### A masked pattern was here #### - Edges: - Reducer 2 <- Map 1 (SIMPLE_EDGE) - Reducer 3 <- Reducer 2 (SIMPLE_EDGE) - Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) - Reducer 5 <- Reducer 4 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) - Reducer 6 <- Reducer 5 (SIMPLE_EDGE) - Reducer 7 <- Map 1 (SIMPLE_EDGE) -#### A masked pattern was here #### - Vertices: - Map 1 - Map Operator Tree: - TableScan - alias: store_sales - properties: - hive.sql.query SELECT "t4"."i_brand", "t4"."i_category", "t7"."d_year", "t7"."d_moy", "t10"."s_store_name", "t10"."s_company_name", SUM("t1"."ss_sales_price") AS "$f6" -FROM (SELECT "ss_sold_date_sk", "ss_item_sk", "ss_store_sk", "ss_sales_price" -FROM (SELECT "ss_sold_date_sk", "ss_item_sk", "ss_store_sk", "ss_sales_price" -FROM "store_sales") AS "t" -WHERE "ss_item_sk" IS NOT NULL AND ("ss_sold_date_sk" IS NOT NULL AND "ss_store_sk" IS NOT NULL)) AS "t1" -INNER JOIN (SELECT "i_item_sk", "i_brand", "i_category" -FROM (SELECT "i_item_sk", "i_brand", "i_category" -FROM "item") AS "t2" -WHERE "i_item_sk" IS NOT NULL AND ("i_category" IS NOT NULL AND "i_brand" IS NOT NULL)) AS "t4" ON "t1"."ss_item_sk" = "t4"."i_item_sk" -INNER JOIN (SELECT "d_date_sk", "d_year", "d_moy" -FROM (SELECT "d_date_sk", "d_year", "d_moy" -FROM "date_dim") AS "t5" -WHERE ("d_year" = 2000 OR ("d_year" = 1999 AND "d_moy" = 12 OR "d_year" = 2001 AND "d_moy" = 1)) AND ("d_year" IN (2000, 1999, 2001) AND "d_date_sk" IS NOT NULL)) AS "t7" ON "t1"."ss_sold_date_sk" = "t7"."d_date_sk" -INNER JOIN (SELECT "s_store_sk", "s_store_name", "s_company_name" -FROM (SELECT "s_store_sk", "s_store_name", "s_company_name" -FROM "store") AS "t8" -WHERE "s_store_sk" IS NOT NULL AND ("s_store_name" IS NOT NULL AND "s_company_name" IS NOT NULL)) AS "t10" ON "t1"."ss_store_sk" = "t10"."s_store_sk" -GROUP BY "t4"."i_brand", "t4"."i_category", "t7"."d_year", "t7"."d_moy", "t10"."s_store_name", "t10"."s_company_name" - hive.sql.query.fieldNames i_brand,i_category,d_year,d_moy,s_store_name,s_company_name,$f6 - hive.sql.query.fieldTypes string,string,int,int,string,string,decimal(17,2) - hive.sql.query.split false - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: i_brand (type: string), i_category (type: string), d_year (type: int), d_moy (type: int), s_store_name (type: string), s_company_name (type: string), $f6 (type: decimal(17,2)) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col1 (type: string), _col0 (type: string), _col4 (type: string), _col5 (type: string), _col2 (type: int) - null sort order: aaaaa - sort order: +++++ - Map-reduce partition columns: _col1 (type: string), _col0 (type: string), _col4 (type: string), _col5 (type: string), _col2 (type: int) - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - value expressions: _col3 (type: int), _col6 (type: decimal(17,2)) - Reduce Output Operator - key expressions: _col1 (type: string), _col0 (type: string), _col4 (type: string), _col5 (type: string), _col2 (type: int), _col3 (type: int) - null sort order: aaaazz - sort order: ++++++ - Map-reduce partition columns: _col1 (type: string), _col0 (type: string), _col4 (type: string), _col5 (type: string) - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - value expressions: _col6 (type: decimal(17,2)) - Execution mode: vectorized, llap - LLAP IO: no inputs - Reducer 2 - Execution mode: vectorized, llap - Reduce Operator Tree: - Select Operator - expressions: KEY.reducesinkkey1 (type: string), KEY.reducesinkkey0 (type: string), KEY.reducesinkkey4 (type: int), VALUE._col0 (type: int), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), VALUE._col1 (type: decimal(17,2)) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - PTF Operator - Function definitions: - Input definition - input alias: ptf_0 - output shape: _col0: string, _col1: string, _col2: int, _col3: int, _col4: string, _col5: string, _col6: decimal(17,2) - type: WINDOWING - Windowing table definition - input alias: ptf_1 - name: windowingtablefunction - order by: _col1 ASC NULLS FIRST, _col0 ASC NULLS FIRST, _col4 ASC NULLS FIRST, _col5 ASC NULLS FIRST, _col2 ASC NULLS FIRST - partition by: _col1, _col0, _col4, _col5, _col2 - raw input shape: - window functions: - window function definition - alias: avg_window_0 - arguments: _col6 - name: avg - window function: GenericUDAFAverageEvaluatorDecimal - window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX) - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: avg_window_0 (type: decimal(21,6)), _col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string), _col5 (type: string), _col6 (type: decimal(17,2)) - outputColumnNames: avg_window_0, _col0, _col1, _col2, _col3, _col4, _col5, _col6 - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col1 (type: string), _col0 (type: string), _col4 (type: string), _col5 (type: string), _col2 (type: int), _col3 (type: int) - null sort order: aaaazz - sort order: ++++++ - Map-reduce partition columns: _col1 (type: string), _col0 (type: string), _col4 (type: string), _col5 (type: string) - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - value expressions: avg_window_0 (type: decimal(21,6)), _col6 (type: decimal(17,2)) - Reducer 3 - Execution mode: vectorized, llap - Reduce Operator Tree: - Select Operator - expressions: VALUE._col0 (type: decimal(21,6)), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey0 (type: string), KEY.reducesinkkey4 (type: int), KEY.reducesinkkey5 (type: int), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), VALUE._col1 (type: decimal(17,2)) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - PTF Operator - Function definitions: - Input definition - input alias: ptf_0 - output shape: _col0: decimal(21,6), _col1: string, _col2: string, _col3: int, _col4: int, _col5: string, _col6: string, _col7: decimal(17,2) - type: WINDOWING - Windowing table definition - input alias: ptf_1 - name: windowingtablefunction - order by: _col3 ASC NULLS LAST, _col4 ASC NULLS LAST - partition by: _col2, _col1, _col5, _col6 - raw input shape: - window functions: - window function definition - alias: rank_window_1 - arguments: _col3, _col4 - name: rank - window function: GenericUDAFRankEvaluator - window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX) - isPivotResult: true - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: ((_col0 > 0) and rank_window_1 is not null and (_col3 = 2000)) (type: boolean) - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: rank_window_1 (type: int), _col0 (type: decimal(21,6)), _col1 (type: string), _col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: string), _col6 (type: string), _col7 (type: decimal(17,2)) - outputColumnNames: rank_window_1, _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: if((_col0 > 0), ((abs((_col7 - _col0)) / _col0) > 0.1), false) (type: boolean) - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col2 (type: string), _col1 (type: string), _col5 (type: string), _col6 (type: string), _col3 (type: int), _col4 (type: int), _col7 (type: decimal(17,2)), _col0 (type: decimal(21,6)), rank_window_1 (type: int) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col8 (type: int) - null sort order: zzzzz - sort order: +++++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col8 (type: int) - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - value expressions: _col4 (type: int), _col5 (type: int), _col6 (type: decimal(17,2)), _col7 (type: decimal(21,6)) - Reducer 4 - Execution mode: llap - Reduce Operator Tree: - Merge Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col8 (type: int) - 1 _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: int) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col13 - Statistics: Num rows: 1 Data size: 941 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col8 (type: int) - null sort order: zzzzz - sort order: +++++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col8 (type: int) - Statistics: Num rows: 1 Data size: 941 Basic stats: COMPLETE Column stats: NONE - value expressions: _col4 (type: int), _col5 (type: int), _col6 (type: decimal(17,2)), _col7 (type: decimal(21,6)), _col13 (type: decimal(17,2)) - Reducer 5 - Execution mode: llap - Reduce Operator Tree: - Merge Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col8 (type: int) - 1 _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: int) - outputColumnNames: _col0, _col4, _col5, _col6, _col7, _col13, _col19 - Statistics: Num rows: 1 Data size: 1035 Basic stats: COMPLETE Column stats: NONE - Top N Key Operator - sort order: ++ - keys: (_col6 - _col7) (type: decimal(22,6)), _col5 (type: int) - null sort order: zz - Statistics: Num rows: 1 Data size: 1035 Basic stats: COMPLETE Column stats: NONE - top n: 100 - Select Operator - expressions: _col0 (type: string), _col4 (type: int), _col5 (type: int), _col7 (type: decimal(21,6)), _col6 (type: decimal(17,2)), _col13 (type: decimal(17,2)), _col19 (type: decimal(17,2)), (_col6 - _col7) (type: decimal(22,6)) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 - Statistics: Num rows: 1 Data size: 1035 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col7 (type: decimal(22,6)), _col2 (type: int) - null sort order: zz - sort order: ++ - Statistics: Num rows: 1 Data size: 1035 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: string), _col1 (type: int), _col3 (type: decimal(21,6)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)) - Reducer 6 - Execution mode: vectorized, llap - Reduce Operator Tree: - Select Operator - expressions: VALUE._col0 (type: string), VALUE._col1 (type: int), KEY.reducesinkkey1 (type: int), VALUE._col2 (type: decimal(21,6)), 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 - Statistics: Num rows: 1 Data size: 1035 Basic stats: COMPLETE Column stats: NONE - Limit - Number of rows: 100 - Statistics: Num rows: 1 Data size: 1035 Basic stats: COMPLETE Column stats: NONE - File Output Operator - compressed: false - Statistics: Num rows: 1 Data size: 1035 Basic stats: COMPLETE Column stats: NONE - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - Reducer 7 - Execution mode: vectorized, llap - Reduce Operator Tree: - Select Operator - expressions: KEY.reducesinkkey1 (type: string), KEY.reducesinkkey0 (type: string), KEY.reducesinkkey4 (type: int), KEY.reducesinkkey5 (type: int), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), VALUE._col0 (type: decimal(17,2)) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - PTF Operator - Function definitions: - Input definition - input alias: ptf_0 - output shape: _col0: string, _col1: string, _col2: int, _col3: int, _col4: string, _col5: string, _col6: decimal(17,2) - type: WINDOWING - Windowing table definition - input alias: ptf_1 - name: windowingtablefunction - order by: _col2 ASC NULLS LAST, _col3 ASC NULLS LAST - partition by: _col1, _col0, _col4, _col5 - raw input shape: - window functions: - window function definition - alias: rank_window_0 - arguments: _col2, _col3 - name: rank - window function: GenericUDAFRankEvaluator - window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX) - isPivotResult: true - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: rank_window_0 is not null (type: boolean) - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col1 (type: string), _col0 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: decimal(17,2)), (rank_window_0 + 1) (type: int) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: int) - null sort order: zzzzz - sort order: +++++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: int) - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - value expressions: _col4 (type: decimal(17,2)) - PTF Operator - Function definitions: - Input definition - input alias: ptf_0 - output shape: _col0: string, _col1: string, _col2: int, _col3: int, _col4: string, _col5: string, _col6: decimal(17,2) - type: WINDOWING - Windowing table definition - input alias: ptf_1 - name: windowingtablefunction - order by: _col2 ASC NULLS LAST, _col3 ASC NULLS LAST - partition by: _col1, _col0, _col4, _col5 - raw input shape: - window functions: - window function definition - alias: rank_window_0 - arguments: _col2, _col3 - name: rank - window function: GenericUDAFRankEvaluator - window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX) - isPivotResult: true - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: rank_window_0 is not null (type: boolean) - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col1 (type: string), _col0 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: decimal(17,2)), (rank_window_0 - 1) (type: int) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: int) - null sort order: zzzzz - sort order: +++++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: int) - Statistics: Num rows: 1 Data size: 856 Basic stats: COMPLETE Column stats: NONE - value expressions: _col4 (type: decimal(17,2)) - - Stage: Stage-0 - Fetch Operator - limit: -1 - Processor Tree: - ListSink - diff --git a/ql/src/test/results/clientpositive/jdbc/postgres/query57.q.out b/ql/src/test/results/clientpositive/jdbc/postgres/query57.q.out deleted file mode 100644 index 99bebe2d1477..000000000000 --- a/ql/src/test/results/clientpositive/jdbc/postgres/query57.q.out +++ /dev/null @@ -1,401 +0,0 @@ -PREHOOK: query: explain -with v1 as( - select i_category, i_brand, - cc_name, - d_year, d_moy, - sum(cs_sales_price) sum_sales, - avg(sum(cs_sales_price)) over - (partition by i_category, i_brand, - cc_name, d_year) - avg_monthly_sales, - rank() over - (partition by i_category, i_brand, - cc_name - order by d_year, d_moy) rn - from item, catalog_sales, date_dim, call_center - where cs_item_sk = i_item_sk and - cs_sold_date_sk = d_date_sk and - cc_call_center_sk= cs_call_center_sk and - ( - d_year = 2000 or - ( d_year = 2000-1 and d_moy =12) or - ( d_year = 2000+1 and d_moy =1) - ) - group by i_category, i_brand, - cc_name , d_year, d_moy), - v2 as( - select v1.i_category, v1.i_brand - ,v1.d_year, v1.d_moy - ,v1.avg_monthly_sales - ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum - from v1, v1 v1_lag, v1 v1_lead - where v1.i_category = v1_lag.i_category and - v1.i_category = v1_lead.i_category and - v1.i_brand = v1_lag.i_brand and - v1.i_brand = v1_lead.i_brand and - v1. cc_name = v1_lag. cc_name and - v1. cc_name = v1_lead. cc_name and - v1.rn = v1_lag.rn + 1 and - v1.rn = v1_lead.rn - 1) - select * - from v2 - where d_year = 2000 and - avg_monthly_sales > 0 and - case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1 - order by sum_sales - avg_monthly_sales, 3 - limit 100 -PREHOOK: type: QUERY -PREHOOK: Input: default@call_center -PREHOOK: Input: default@catalog_sales -PREHOOK: Input: default@date_dim -PREHOOK: Input: default@item -#### A masked pattern was here #### -POSTHOOK: query: explain -with v1 as( - select i_category, i_brand, - cc_name, - d_year, d_moy, - sum(cs_sales_price) sum_sales, - avg(sum(cs_sales_price)) over - (partition by i_category, i_brand, - cc_name, d_year) - avg_monthly_sales, - rank() over - (partition by i_category, i_brand, - cc_name - order by d_year, d_moy) rn - from item, catalog_sales, date_dim, call_center - where cs_item_sk = i_item_sk and - cs_sold_date_sk = d_date_sk and - cc_call_center_sk= cs_call_center_sk and - ( - d_year = 2000 or - ( d_year = 2000-1 and d_moy =12) or - ( d_year = 2000+1 and d_moy =1) - ) - group by i_category, i_brand, - cc_name , d_year, d_moy), - v2 as( - select v1.i_category, v1.i_brand - ,v1.d_year, v1.d_moy - ,v1.avg_monthly_sales - ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum - from v1, v1 v1_lag, v1 v1_lead - where v1.i_category = v1_lag.i_category and - v1.i_category = v1_lead.i_category and - v1.i_brand = v1_lag.i_brand and - v1.i_brand = v1_lead.i_brand and - v1. cc_name = v1_lag. cc_name and - v1. cc_name = v1_lead. cc_name and - v1.rn = v1_lag.rn + 1 and - v1.rn = v1_lead.rn - 1) - select * - from v2 - where d_year = 2000 and - avg_monthly_sales > 0 and - case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1 - order by sum_sales - avg_monthly_sales, 3 - limit 100 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@call_center -POSTHOOK: Input: default@catalog_sales -POSTHOOK: Input: default@date_dim -POSTHOOK: Input: default@item -#### A masked pattern was here #### -STAGE DEPENDENCIES: - Stage-1 is a root stage - Stage-0 depends on stages: Stage-1 - -STAGE PLANS: - Stage: Stage-1 - Tez -#### A masked pattern was here #### - Edges: - Reducer 2 <- Map 1 (SIMPLE_EDGE) - Reducer 3 <- Reducer 2 (SIMPLE_EDGE) - Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) - Reducer 5 <- Reducer 4 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) - Reducer 6 <- Reducer 5 (SIMPLE_EDGE) - Reducer 7 <- Map 1 (SIMPLE_EDGE) -#### A masked pattern was here #### - Vertices: - Map 1 - Map Operator Tree: - TableScan - alias: catalog_sales - properties: - hive.sql.query SELECT "t4"."cc_name", "t7"."i_brand", "t7"."i_category", "t10"."d_year", "t10"."d_moy", SUM("t1"."cs_sales_price") AS "$f5" -FROM (SELECT "cs_sold_date_sk", "cs_call_center_sk", "cs_item_sk", "cs_sales_price" -FROM (SELECT "cs_sold_date_sk", "cs_call_center_sk", "cs_item_sk", "cs_sales_price" -FROM "catalog_sales") AS "t" -WHERE "cs_item_sk" IS NOT NULL AND ("cs_sold_date_sk" IS NOT NULL AND "cs_call_center_sk" IS NOT NULL)) AS "t1" -INNER JOIN (SELECT "cc_call_center_sk", "cc_name" -FROM (SELECT "cc_call_center_sk", "cc_name" -FROM "call_center") AS "t2" -WHERE "cc_call_center_sk" IS NOT NULL AND "cc_name" IS NOT NULL) AS "t4" ON "t1"."cs_call_center_sk" = "t4"."cc_call_center_sk" -INNER JOIN (SELECT "i_item_sk", "i_brand", "i_category" -FROM (SELECT "i_item_sk", "i_brand", "i_category" -FROM "item") AS "t5" -WHERE "i_item_sk" IS NOT NULL AND ("i_category" IS NOT NULL AND "i_brand" IS NOT NULL)) AS "t7" ON "t1"."cs_item_sk" = "t7"."i_item_sk" -INNER JOIN (SELECT "d_date_sk", "d_year", "d_moy" -FROM (SELECT "d_date_sk", "d_year", "d_moy" -FROM "date_dim") AS "t8" -WHERE ("d_year" = 2000 OR ("d_year" = 1999 AND "d_moy" = 12 OR "d_year" = 2001 AND "d_moy" = 1)) AND ("d_year" IN (2000, 1999, 2001) AND "d_date_sk" IS NOT NULL)) AS "t10" ON "t1"."cs_sold_date_sk" = "t10"."d_date_sk" -GROUP BY "t4"."cc_name", "t7"."i_brand", "t7"."i_category", "t10"."d_year", "t10"."d_moy" - hive.sql.query.fieldNames cc_name,i_brand,i_category,d_year,d_moy,$f5 - hive.sql.query.fieldTypes string,string,string,int,int,decimal(17,2) - hive.sql.query.split false - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: cc_name (type: string), i_brand (type: string), i_category (type: string), d_year (type: int), d_moy (type: int), $f5 (type: decimal(17,2)) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col2 (type: string), _col1 (type: string), _col0 (type: string), _col3 (type: int) - null sort order: aaaa - sort order: ++++ - Map-reduce partition columns: _col2 (type: string), _col1 (type: string), _col0 (type: string), _col3 (type: int) - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - value expressions: _col4 (type: int), _col5 (type: decimal(17,2)) - Reduce Output Operator - key expressions: _col2 (type: string), _col1 (type: string), _col0 (type: string), _col3 (type: int), _col4 (type: int) - null sort order: aaazz - sort order: +++++ - Map-reduce partition columns: _col2 (type: string), _col1 (type: string), _col0 (type: string) - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - value expressions: _col5 (type: decimal(17,2)) - Execution mode: vectorized, llap - LLAP IO: no inputs - Reducer 2 - Execution mode: vectorized, llap - Reduce Operator Tree: - Select Operator - expressions: KEY.reducesinkkey2 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey0 (type: string), KEY.reducesinkkey3 (type: int), VALUE._col0 (type: int), VALUE._col1 (type: decimal(17,2)) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 - Statistics: Num rows: 1 Data size: 672 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: int, _col4: int, _col5: decimal(17,2) - type: WINDOWING - Windowing table definition - input alias: ptf_1 - name: windowingtablefunction - order by: _col2 ASC NULLS FIRST, _col1 ASC NULLS FIRST, _col0 ASC NULLS FIRST, _col3 ASC NULLS FIRST - partition by: _col2, _col1, _col0, _col3 - raw input shape: - window functions: - window function definition - alias: avg_window_0 - arguments: _col5 - name: avg - window function: GenericUDAFAverageEvaluatorDecimal - window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX) - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: avg_window_0 (type: decimal(21,6)), _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(17,2)) - outputColumnNames: avg_window_0, _col0, _col1, _col2, _col3, _col4, _col5 - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col2 (type: string), _col1 (type: string), _col0 (type: string), _col3 (type: int), _col4 (type: int) - null sort order: aaazz - sort order: +++++ - Map-reduce partition columns: _col2 (type: string), _col1 (type: string), _col0 (type: string) - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - value expressions: avg_window_0 (type: decimal(21,6)), _col5 (type: decimal(17,2)) - Reducer 3 - Execution mode: vectorized, llap - Reduce Operator Tree: - Select Operator - expressions: VALUE._col0 (type: decimal(21,6)), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey0 (type: string), KEY.reducesinkkey3 (type: int), KEY.reducesinkkey4 (type: int), VALUE._col1 (type: decimal(17,2)) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - PTF Operator - Function definitions: - Input definition - input alias: ptf_0 - output shape: _col0: decimal(21,6), _col1: string, _col2: string, _col3: string, _col4: int, _col5: int, _col6: decimal(17,2) - type: WINDOWING - Windowing table definition - input alias: ptf_1 - name: windowingtablefunction - order by: _col4 ASC NULLS LAST, _col5 ASC NULLS LAST - partition by: _col3, _col2, _col1 - raw input shape: - window functions: - window function definition - alias: rank_window_1 - arguments: _col4, _col5 - name: rank - window function: GenericUDAFRankEvaluator - window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX) - isPivotResult: true - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: ((_col0 > 0) and rank_window_1 is not null and (_col4 = 2000)) (type: boolean) - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: rank_window_1 (type: int), _col0 (type: decimal(21,6)), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: int), _col6 (type: decimal(17,2)) - outputColumnNames: rank_window_1, _col0, _col1, _col2, _col3, _col4, _col5, _col6 - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: if((_col0 > 0), ((abs((_col6 - _col0)) / _col0) > 0.1), false) (type: boolean) - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col3 (type: string), _col2 (type: string), _col1 (type: string), _col4 (type: int), _col5 (type: int), _col6 (type: decimal(17,2)), _col0 (type: decimal(21,6)), rank_window_1 (type: int) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string), _col7 (type: int), _col2 (type: string) - null sort order: zzzz - sort order: ++++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col7 (type: int), _col2 (type: string) - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - value expressions: _col3 (type: int), _col4 (type: int), _col5 (type: decimal(17,2)), _col6 (type: decimal(21,6)) - Reducer 4 - Execution mode: llap - Reduce Operator Tree: - Merge Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col0 (type: string), _col1 (type: string), _col7 (type: int), _col2 (type: string) - 1 _col0 (type: string), _col1 (type: string), _col4 (type: int), _col2 (type: string) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col11 - Statistics: Num rows: 1 Data size: 739 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string), _col7 (type: int), _col2 (type: string) - null sort order: zzzz - sort order: ++++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col7 (type: int), _col2 (type: string) - Statistics: Num rows: 1 Data size: 739 Basic stats: COMPLETE Column stats: NONE - value expressions: _col3 (type: int), _col4 (type: int), _col5 (type: decimal(17,2)), _col6 (type: decimal(21,6)), _col11 (type: decimal(17,2)) - Reducer 5 - Execution mode: llap - Reduce Operator Tree: - Merge Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col0 (type: string), _col1 (type: string), _col7 (type: int), _col2 (type: string) - 1 _col0 (type: string), _col1 (type: string), _col4 (type: int), _col2 (type: string) - outputColumnNames: _col0, _col1, _col3, _col4, _col5, _col6, _col11, _col16 - Statistics: Num rows: 1 Data size: 812 Basic stats: COMPLETE Column stats: NONE - Top N Key Operator - sort order: ++ - keys: (_col5 - _col6) (type: decimal(22,6)), _col3 (type: int) - null sort order: zz - Statistics: Num rows: 1 Data size: 812 Basic stats: COMPLETE Column stats: NONE - top n: 100 - Select Operator - expressions: _col0 (type: string), _col1 (type: string), _col3 (type: int), _col4 (type: int), _col6 (type: decimal(21,6)), _col5 (type: decimal(17,2)), _col11 (type: decimal(17,2)), _col16 (type: decimal(17,2)), (_col5 - _col6) (type: decimal(22,6)) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 1 Data size: 812 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col8 (type: decimal(22,6)), _col2 (type: int) - null sort order: zz - sort order: ++ - Statistics: Num rows: 1 Data size: 812 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: string), _col1 (type: string), _col3 (type: int), _col4 (type: decimal(21,6)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)), _col7 (type: decimal(17,2)) - Reducer 6 - Execution mode: vectorized, llap - Reduce Operator Tree: - Select Operator - expressions: VALUE._col0 (type: string), VALUE._col1 (type: string), KEY.reducesinkkey1 (type: int), VALUE._col2 (type: int), VALUE._col3 (type: decimal(21,6)), VALUE._col4 (type: decimal(17,2)), VALUE._col5 (type: decimal(17,2)), VALUE._col6 (type: decimal(17,2)) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 - Statistics: Num rows: 1 Data size: 812 Basic stats: COMPLETE Column stats: NONE - Limit - Number of rows: 100 - Statistics: Num rows: 1 Data size: 812 Basic stats: COMPLETE Column stats: NONE - File Output Operator - compressed: false - Statistics: Num rows: 1 Data size: 812 Basic stats: COMPLETE Column stats: NONE - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - Reducer 7 - Execution mode: vectorized, llap - Reduce Operator Tree: - Select Operator - expressions: KEY.reducesinkkey2 (type: string), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey0 (type: string), KEY.reducesinkkey3 (type: int), KEY.reducesinkkey4 (type: int), VALUE._col0 (type: decimal(17,2)) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 - Statistics: Num rows: 1 Data size: 672 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: int, _col4: int, _col5: decimal(17,2) - type: WINDOWING - Windowing table definition - input alias: ptf_1 - name: windowingtablefunction - order by: _col3 ASC NULLS LAST, _col4 ASC NULLS LAST - partition by: _col2, _col1, _col0 - raw input shape: - window functions: - window function definition - alias: rank_window_0 - arguments: _col3, _col4 - name: rank - window function: GenericUDAFRankEvaluator - window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX) - isPivotResult: true - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: rank_window_0 is not null (type: boolean) - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col2 (type: string), _col1 (type: string), _col0 (type: string), _col5 (type: decimal(17,2)), (rank_window_0 + 1) (type: int) - outputColumnNames: _col0, _col1, _col2, _col3, _col4 - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string), _col4 (type: int), _col2 (type: string) - null sort order: zzzz - sort order: ++++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col4 (type: int), _col2 (type: string) - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - value expressions: _col3 (type: decimal(17,2)) - PTF Operator - Function definitions: - Input definition - input alias: ptf_0 - output shape: _col0: string, _col1: string, _col2: string, _col3: int, _col4: int, _col5: decimal(17,2) - type: WINDOWING - Windowing table definition - input alias: ptf_1 - name: windowingtablefunction - order by: _col3 ASC NULLS LAST, _col4 ASC NULLS LAST - partition by: _col2, _col1, _col0 - raw input shape: - window functions: - window function definition - alias: rank_window_0 - arguments: _col3, _col4 - name: rank - window function: GenericUDAFRankEvaluator - window frame: ROWS PRECEDING(MAX)~FOLLOWING(MAX) - isPivotResult: true - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: rank_window_0 is not null (type: boolean) - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col2 (type: string), _col1 (type: string), _col0 (type: string), _col5 (type: decimal(17,2)), (rank_window_0 - 1) (type: int) - outputColumnNames: _col0, _col1, _col2, _col3, _col4 - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string), _col4 (type: int), _col2 (type: string) - null sort order: zzzz - sort order: ++++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col4 (type: int), _col2 (type: string) - Statistics: Num rows: 1 Data size: 672 Basic stats: COMPLETE Column stats: NONE - value expressions: _col3 (type: decimal(17,2)) - - Stage: Stage-0 - Fetch Operator - limit: -1 - Processor Tree: - ListSink -