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

ASF GitHub Bot commented on TAJO-1644:
--------------------------------------

Github user hyunsik commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/601#discussion_r32494311
  
    --- Diff: 
tajo-storage/tajo-storage-hdfs/src/main/java/org/apache/tajo/storage/FileTablespace.java
 ---
    @@ -892,9 +892,8 @@ protected Path commitOutputData(OverridableConf 
queryContext, boolean changeFile
               boolean movedToOldTable = false;
               boolean committed = false;
               Path oldTableDir = new Path(stagingDir, 
TajoConstants.INSERT_OVERWIRTE_OLD_TABLE_NAME);
    -          ContentSummary summary = fs.getContentSummary(stagingResultDir);
     
    -          if (!queryContext.get(QueryVars.OUTPUT_PARTITIONS, "").isEmpty() 
&& summary.getFileCount() > 0L) {
    +          if (!queryContext.get(QueryVars.OUTPUT_PARTITIONS, 
"").isEmpty()) {
    --- End diff --
    
    It would be better if it works according to session variable to allow users 
to decide whether original data set is removed or not when inserting rows is 
empty.


> When inserting empty data into a partitioned table, existing data would be 
> removed.
> -----------------------------------------------------------------------------------
>
>                 Key: TAJO-1644
>                 URL: https://issues.apache.org/jira/browse/TAJO-1644
>             Project: Tajo
>          Issue Type: Bug
>          Components: query master
>            Reporter: Jaehwa Jung
>            Assignee: Jaehwa Jung
>             Fix For: 0.11.0, 0.10.2
>
>         Attachments: TAJO-1644.patch
>
>
> When inserting empty data into a partitioned table, existing data would be 
> removed. Tajo provides column value partition which is hive-style partition. 
> In hive, when inserting empty data into a partition, there are two cases. If 
> you use dynamic partitions, existing data never would be removed. But if you 
> don't use dynamic partitions, existing data would be removed. When inserting 
> a data to partition, tajo user don't specify each column and each column 
> value. So, it is similar to dynamic partition of hive. It seems to update 
> deletion logic of partitioned table.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to