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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to