deniskuzZ commented on code in PR #3637:
URL: https://github.com/apache/hive/pull/3637#discussion_r1000586151
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java:
##########
@@ -4635,7 +4636,26 @@ public static
ImmutablePair<VectorAggregationDesc,String> getVectorAggregationDe
"and output type: \"" + outputColVectorType + "\" " +
"and mode: " + udafEvaluatorMode + " not supported for " +
"evaluator " + evaluator.getClass().getSimpleName();
- return new ImmutablePair<VectorAggregationDesc,String>(null, issue);
+ return new ImmutablePair<>(null, issue);
+ }
+
+ private static List<ConstantVectorExpression> getConstantParams(
+ VectorizationContext vContext, List<ExprNodeDesc> parameterList) throws
HiveException {
+ if (parameterList.isEmpty()) {
+ return Collections.emptyList();
+ }
+
+ final List<ConstantVectorExpression> res = new
ArrayList<>(parameterList.size() - 1);
+
+ // skip the first parameter as it is not a constant
+ for (ExprNodeDesc exprNodeDesc : parameterList.subList(1,
parameterList.size())) {
Review Comment:
consider using declarative style
````
parameterList.stream().skip(1).map().filter().collect()
````
--
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]