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

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

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

    https://github.com/apache/tajo/pull/161#discussion_r18318014
  
    --- Diff: 
tajo-core/src/main/java/org/apache/tajo/master/querymaster/Query.java ---
    @@ -432,19 +432,68 @@ public Path commitOutputData(Query query) {
                 boolean movedToOldTable = false;
                 boolean committed = false;
                 Path oldTableDir = new Path(queryContext.getStagingDir(), 
TajoConstants.INSERT_OVERWIRTE_OLD_TABLE_NAME);
    -            try {
    -              if (fs.exists(finalOutputDir)) {
    -                fs.rename(finalOutputDir, oldTableDir);
    -                movedToOldTable = fs.exists(oldTableDir);
    -              } else { // if the parent does not exist, make its parent 
directory.
    -                fs.mkdirs(finalOutputDir.getParent());
    +
    +            // INSERT OVERWRITE INTO always moves the result data into the 
original table location.
    +            // As a result, all existing partitions have been removed. The 
query should not remove all partitions
    --- End diff --
    
    I think that you don't need to the story about the old implementation. It 
would be better if you explain what the below code does.


> INSERT OVERWRITE INTO should not remove all partitions.
> -------------------------------------------------------
>
>                 Key: TAJO-1067
>                 URL: https://issues.apache.org/jira/browse/TAJO-1067
>             Project: Tajo
>          Issue Type: Bug
>          Components: query master
>            Reporter: Jaehwa Jung
>            Assignee: Jaehwa Jung
>            Priority: Critical
>             Fix For: 0.9.0
>
>
> Currently, INSERT OVERWRITE INTO always moves the result data into the 
> original table location. As a result, all existing partitions have been 
> removed. The query should not remove all partitions because existing 
> partitions may be a dataset for a production cluster.



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

Reply via email to