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

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_r18433100
  
    --- Diff: 
tajo-core/src/main/java/org/apache/tajo/master/querymaster/Query.java ---
    @@ -424,19 +424,65 @@ 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());
    +
    +            if (queryContext.hasPartition()) {
    +              Map<Path, Path> renameDirs = TUtil.newHashMap();
    --- End diff --
    
    Could you add the description about key and value of Map?


> 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