[ 
https://issues.apache.org/jira/browse/HIVE-17647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16427700#comment-16427700
 ] 

Eugene Koifman edited comment on HIVE-17647 at 4/5/18 10:41 PM:
----------------------------------------------------------------

if you look at acid_vectorization_original_tez.q.out, the same query shows 
rows....

{noformat}
PREHOOK: query: select distinct 7 as seven, INPUT__FILE__NAME from 
over10k_orc_bucketed
PREHOOK: type: QUERY
PREHOOK: Input: default@over10k_orc_bucketed
PREHOOK: Output: hdfs://### HDFS PATH ###
POSTHOOK: query: select distinct 7 as seven, INPUT__FILE__NAME from 
over10k_orc_bucketed
POSTHOOK: type: QUERY
POSTHOOK: Input: default@over10k_orc_bucketed
POSTHOOK: Output: hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
{noformat}

Either way, removing rows from output is not really "masking"



was (Author: ekoifman):
if you look at acid_vectorization_original_tez.q.out, the same query shows 
rows....

{noformat}
PREHOOK: query: select distinct 7 as seven, INPUT__FILE__NAME from 
over10k_orc_bucketed
PREHOOK: type: QUERY
PREHOOK: Input: default@over10k_orc_bucketed
PREHOOK: Output: hdfs://### HDFS PATH ###
POSTHOOK: query: select distinct 7 as seven, INPUT__FILE__NAME from 
over10k_orc_bucketed
POSTHOOK: type: QUERY
POSTHOOK: Input: default@over10k_orc_bucketed
POSTHOOK: Output: hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
7       hdfs://### HDFS PATH ###
{noformat}

> DDLTask.generateAddMmTasks(Table tbl) and other random code should not start 
> transactions
> -----------------------------------------------------------------------------------------
>
>                 Key: HIVE-17647
>                 URL: https://issues.apache.org/jira/browse/HIVE-17647
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Transactions
>            Reporter: Eugene Koifman
>            Assignee: Sergey Shelukhin
>            Priority: Major
>              Labels: mm-gap-2
>         Attachments: HIVE-17647.01.patch, HIVE-17647.patch
>
>
> This method (and other places) have 
> {noformat}
>       if (txnManager.isTxnOpen()) {
>         mmWriteId = txnManager.getCurrentTxnId();
>       } else {
>         mmWriteId = txnManager.openTxn(new Context(conf), conf.getUser());
>         txnManager.commitTxn();
>       }
> {noformat}
> this should throw if there is no open transaction.  It should never open one.
> In general the logic seems suspect.  Looks like the intent is to move all 
> existing files into a delta_x_x/ when a plain table is converted to MM table. 
>  This seems like something that needs to be done from under an Exclusive lock 
> to prevent concurrent Insert operations writing data under table/partition 
> root.  But this is too late to acquire locks which should be done from the 
> Driver.acquireLocks()  (or else have deadlock detector since acquiring them 
> here would bread all-or-nothing lock acquisition semantics currently required 
> w/o deadlock detector)



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

Reply via email to