[ 
https://issues.apache.org/jira/browse/HIVE-25404?focusedWorklogId=641523&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-641523
 ]

ASF GitHub Bot logged work on HIVE-25404:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Aug/21 06:27
            Start Date: 25/Aug/21 06:27
    Worklog Time Spent: 10m 
      Work Description: kgyrtkirk commented on a change in pull request #2568:
URL: https://github.com/apache/hive/pull/2568#discussion_r695436190



##########
File path: ql/src/test/queries/clientpositive/merge_partitioned_insert.q
##########
@@ -0,0 +1,19 @@
+--! qt:transactional
+
+drop table u;
+drop table t;

Review comment:
       my original test case only had one case; later added a second
   removed these `drop` statements as they are only needed from beeline




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 641523)
    Time Spent: 0.5h  (was: 20m)

> Inserts inside merge statements are rewritten incorrectly for partitioned 
> tables
> --------------------------------------------------------------------------------
>
>                 Key: HIVE-25404
>                 URL: https://issues.apache.org/jira/browse/HIVE-25404
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {code}
> drop table u;drop table t;
> create table t(value string default 'def') partitioned by (id integer);
> create table u(id integer);
> {code}
> #1 id&value specified
> rewritten
> {code}
> FROM
>   `default`.`t`
>   RIGHT OUTER JOIN
>   `default`.`u`
>   ON `t`.`id`=`u`.`id`
> INSERT INTO `default`.`t` (`id`,`value`) partition (`id`)    -- insert clause
>   SELECT `u`.`id`,'x'
>    WHERE `t`.`id` IS NULL
> {code}
> #2 when values is not specified
> {code}
> merge into t using u on t.id=u.id when not matched then insert (id) values 
> (u.id);
> {code}
> rewritten query:
> {code}
> FROM
>   `default`.`t`
>   RIGHT OUTER JOIN
>   `default`.`u`
>   ON `t`.`id`=`u`.`id`
> INSERT INTO `default`.`t` (`id`) partition (`id`)    -- insert clause
>   SELECT `u`.`id`
>    WHERE `t`.`id` IS NULL
> {code}



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

Reply via email to