deniskuzZ commented on code in PR #6853:
URL: https://github.com/apache/hive/pull/6853#discussion_r4410088840
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java:
##########
@@ -5055,56 +5056,75 @@ private static boolean
isPositiveIntConstant(ExprNodeDesc exprNodeDesc) {
&& constantDesc.getValue() instanceof Integer value && value > 0;
}
- // TODO: An evaluator that wants to handle an unbuffered partition-only
column in its calculation could
- // opt in to vectorization here.
+ /**
+ * Validates window function arguments that reference partition-only columns
(not buffered in vector PTF).
+ * Allowed functions are listed in {@link
VectorPTFDesc#PARTITION_ONLY_COL_ALLOWED_FUNCTIONS};
+ * their partition expr indices are recorded on {@link
VectorPTFDesc#setEvalPartitionOnlyExprIndices(int[])}.
+ *
+ * @return true if an unsupported evaluator references a partition-only
column
+ */
private static boolean hasUnbufferedPartitionColumnInEvaluatorArgs(
Review Comment:
boolean method now comes with side-effects: calls
setEvalPartitionOnlyExprIndices.
Either rename it (e.g. validateAndMapPartitionOnlyArgs) or compute the
indices in createVectorPTFDesc and keep the check side-effect-free.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]