ramesh0201 commented on a change in pull request #2278:
URL: https://github.com/apache/hive/pull/2278#discussion_r656727707



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFGroupBatches.java
##########
@@ -858,6 +858,15 @@ private void runEvaluatorForRow(int evaluatorIndex, 
VectorPTFEvaluatorBase evalu
 
     Object result = null;
     if (evaluator.canRunOptimizedCalculation(rowNum, range)) {
+      /*
+       * A classic evaluator (which doesn't take advantage of optimized 
calculation) usually
+       * evaluates its input expression in evaluateGroupBatch. The optimized 
calculation doesn't
+       * necessarily work on batches, but input expressions still have to be 
evaluated, so we take
+       * care of them here.
+       */
+      RowPositionInBatch rp = getPosition(rowNum);
+      evaluator.evaluateInputExpr(bufferedBatches.get(rp.batchIndex));

Review comment:
       Can this cause slowness/overhead on other optimized calculated PTF 
evaluators which doesn't need this calculation. Is this only need for lead/lag 
evaluators?




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