Uploaded image for project: 'Tajo (Retired)'
  1. Tajo (Retired)
  2. TAJO-561

PhysicalPlanner::createBestSortPlan should consider input size of leaf tasks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • 0.8.0
    • Physical Operator
    • None

    Description

      Please take a look at the following code. This code determines which sort operator is chosen according to the input volume. Here are two problems. One is threshold is constant value, and it must be configurable. The second problem is that estimateSizeRecursive does not obtain an input volume if a task is leaf. We should fix them. In addition, I think that estimateSizeRecursive should be renamed to more proper name. It's vague and does not follow our naming convention.

      public SortExec createBestSortPlan(TaskAttemptContext context, SortNode sortNode,
                                           PhysicalExec child) throws IOException {
          String [] outerLineage = PlannerUtil.getRelationLineage(sortNode.getChild());
          long estimatedSize = estimateSizeRecursive(context, outerLineage);
          final long threshold = 1048576 * 2000;
      
          // if the relation size is less than the reshold,
          // the in-memory sort will be used.
          if (estimatedSize <= threshold) {
            return new MemSortExec(context, sortNode, child);
          } else {
            return new ExternalSortExec(context, sm, sortNode, child);
          }
        }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            hyunsik Hyunsik Choi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: