Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-24872 PTF vectorization coverage
  3. HIVE-24761

Vectorization: Support PTF - bounded start windows

    XMLWordPrintableJSON

Details

    Description

       notVectorizedReason: PTF operator: *** only UNBOUNDED start frame is supported
      

      Currently, bounded windows are not supported in VectorPTFOperator. If we simply remove the check compile-time:
      https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java#L2911

            if (!windowFrameDef.isStartUnbounded()) {
              setOperatorIssue(functionName + " only UNBOUNDED start frame is supported");
              return false;
            }
      

      We get incorrect results, that's because vectorized codepath completely ignores boundaries, and simply iterates through all the input batches in VectorPTFGroupBatches:

          for (VectorPTFEvaluatorBase evaluator : evaluators) {
            evaluator.evaluateGroupBatch(batch);
            if (isLastGroupBatch) {
              evaluator.doLastBatchWork();
            }
          }
      

      Attachments

        Issue Links

          Activity

            People

              abstractdog László Bodor
              abstractdog László Bodor
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h
                  4h