You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/05/10 11:04:00 UTC

[jira] [Work logged] (HIVE-24761) Vectorization: Support PTF - bounded start windows

     [ https://issues.apache.org/jira/browse/HIVE-24761?focusedWorklogId=593908&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-593908 ]

ASF GitHub Bot logged work on HIVE-24761:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/May/21 11:03
            Start Date: 10/May/21 11:03
    Worklog Time Spent: 10m 
      Work Description: abstractdog commented on a change in pull request #2099:
URL: https://github.com/apache/hive/pull/2099#discussion_r629266309



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
##########
@@ -3005,6 +3003,19 @@ private boolean validatePTFOperator(PTFOperator op, VectorizationContext vContex
           }
         }
       }
+      if (vectorPTFDesc.getOrderExprNodeDescs().length > 1) {
+        /*
+         * Currently, we need to rule out here all cases where a range boundary scanner can run,
+         * basically: 1. bounded start 2. bounded end which is not current row
+         */
+        if (windowFrameDef.getWindowType() == WindowType.RANGE
+            && (!windowFrameDef.isStartUnbounded() || !windowFrameDef.getEnd().isCurrentRow())) {

Review comment:
       this is fixed in https://github.com/apache/hive/pull/2099/commits/f6b5ea27501ccef175da961b49be9e0587a1ce00 and will be squashed later




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 593908)
    Time Spent: 2h  (was: 1h 50m)

> Vectorization: Support PTF - bounded start windows
> --------------------------------------------------
>
>                 Key: HIVE-24761
>                 URL: https://issues.apache.org/jira/browse/HIVE-24761
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> {code}
>  notVectorizedReason: PTF operator: *** only UNBOUNDED start frame is supported
> {code}
> 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
> {code}
>       if (!windowFrameDef.isStartUnbounded()) {
>         setOperatorIssue(functionName + " only UNBOUNDED start frame is supported");
>         return false;
>       }
> {code}
> We get incorrect results, that's because vectorized codepath completely ignores boundaries, and simply iterates through all the input batches in [VectorPTFGroupBatches|https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFGroupBatches.java#L172]:
> {code}
>     for (VectorPTFEvaluatorBase evaluator : evaluators) {
>       evaluator.evaluateGroupBatch(batch);
>       if (isLastGroupBatch) {
>         evaluator.doLastBatchWork();
>       }
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)