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

    https://github.com/apache/tajo/pull/602#discussion_r33069841
  
    --- Diff: 
tajo-core/src/main/java/org/apache/tajo/querymaster/Repartitioner.java ---
    @@ -648,10 +644,15 @@ public static void 
scheduleRangeShuffledFetches(TaskSchedulerContext schedulerCo
             throw new IOException("Can't get table meta data from catalog: " +
                 PlannerUtil.getStoreTableName(masterPlan.getLogicalPlan()));
           }
    -      ranges = 
TableSpaceManager.getStorageManager(stage.getContext().getConf(), storeType)
    -          .getInsertSortRanges(stage.getContext().getQueryContext(), 
tableDesc,
    -              sortNode.getInSchema(), sortSpecs,
    -              mergedRange);
    +
    +      Tablespace space = TablespaceManager.getAnyByScheme(storeType).get();
    +      ranges = space.getInsertSortRanges(
    --- End diff --
    
    In original implementation, it guarantees that 
TablespaceManager.getAnyByScheme(storeType) will always return the proper 
tablespace handler if ``sortNode.getSortPurpose()`` is ``STORAGE_SPECIFIED``.
    
    But, its implementation is not intuitive. We should improve them. But, it 
requires lots of extra changes. I'll continue to improve storage layer APIs. It 
will be improved later too.
    



---
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