Krisztian Kasa created HIVE-23908:
-------------------------------------

             Summary: Rewrite plan to join back tables: handle root input is an 
Aggregate
                 Key: HIVE-23908
                 URL: https://issues.apache.org/jira/browse/HIVE-23908
             Project: Hive
          Issue Type: Improvement
            Reporter: Krisztian Kasa
            Assignee: Krisztian Kasa


{code}
EXPLAIN CBO
SELECT
        C_CUSTOMER_ID
FROM
        CUSTOMER
,       STORE_SALES
WHERE
        C_CUSTOMER_SK   =       SS_CUSTOMER_SK
GROUP BY
        C_CUSTOMER_SK
,       C_CUSTOMER_ID
,       C_FIRST_NAME
,       C_LAST_NAME
,       C_PREFERRED_CUST_FLAG
,       C_BIRTH_COUNTRY
,       C_LOGIN
,       C_EMAIL_ADDRESS
{code}
{code}
HiveProject(c_customer_id=[$1])
  HiveAggregate(group=[{0, 1}])
    HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], $f4=[$4], $f5=[$5], 
$f6=[$6], $f7=[$7])
      HiveJoin(condition=[=($0, $8)], joinType=[inner], algorithm=[none], 
cost=[not available])
        HiveProject(c_customer_sk=[$0], c_customer_id=[$1], c_first_name=[$8], 
c_last_name=[$9], c_preferred_cust_flag=[$10], c_birth_country=[$14], 
c_login=[$15], c_email_address=[$16])
          HiveTableScan(table=[[default, customer]], table:alias=[customer])
        HiveProject(ss_customer_sk=[$3])
          HiveFilter(condition=[IS NOT NULL($3)])
            HiveTableScan(table=[[default, store_sales]], 
table:alias=[store_sales])

{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to