abstractdog commented on a change in pull request #2099:
URL: https://github.com/apache/hive/pull/2099#discussion_r616566788



##########
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:
       good catch, I'm going to fix the condition to enable unbounded end
   FYI, the connection between this part and boundary scanner is the 
unimplemented method:
   {code}
     @Override
     public boolean isDistanceGreater(Object v1, Object v2, int amt) {
       throw new UnsupportedOperationException("Only unbounded ranges 
supported");
     }
   {code}

##########
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:
       good catch! I'm going to fix the condition to enable unbounded end
   FYI, the connection between this part and boundary scanner is the 
unimplemented method:
   ```
     @Override
     public boolean isDistanceGreater(Object v1, Object v2, int amt) {
       throw new UnsupportedOperationException("Only unbounded ranges 
supported");
     }
   ```




-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to