You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Deepak Jaiswal (JIRA)" <ji...@apache.org> on 2018/08/13 19:34:00 UTC

[jira] [Resolved] (HIVE-19115) Merge: Semijoin hints are dropped by the merge

     [ https://issues.apache.org/jira/browse/HIVE-19115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepak Jaiswal resolved HIVE-19115.
-----------------------------------
    Resolution: Duplicate

Duplicate of HIVE-20354.

> Merge: Semijoin hints are dropped by the merge
> ----------------------------------------------
>
>                 Key: HIVE-19115
>                 URL: https://issues.apache.org/jira/browse/HIVE-19115
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Planning, Transactions
>            Reporter: Gopal V
>            Assignee: Deepak Jaiswal
>            Priority: Major
>
> {code}
> create table target stored as orc as select ss_ticket_number, ss_item_sk, current_timestamp as `ts` from tpcds_bin_partitioned_orc_1000.store_sales;
> create table source stored as orc as select sr_ticket_number, sr_item_sk, d_date from tpcds_bin_partitioned_orc_1000.store_returns join tpcds_bin_partitioned_orc_1000.date_dim where d_date_sk = sr_returned_date_sk;
> merge /* +semi(T, sr_ticket_number, S, 10000) */ into target T using (select * from source where year(d_date) = 1998) S ON T.ss_ticket_number = S.sr_ticket_number and sr_item_sk = ss_item_sk 
> when matched THEN UPDATE SET ts = current_timestamp
> when not matched and sr_item_sk is not null and sr_ticket_number is not null THEN INSERT VALUES(S.sr_ticket_number, S.sr_item_sk, current_timestamp);
> {code}
> The semijoin hints are ignored and the code says 
> {code}
>      todo: do we care to preserve comments in original SQL?
> {code}
> https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java#L624
> in this case we do.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)