jihoonson commented on a change in pull request #10401:
URL: https://github.com/apache/druid/pull/10401#discussion_r492963211
##########
File path:
processing/src/main/java/org/apache/druid/segment/column/RowSignature.java
##########
@@ -157,6 +158,24 @@ public int indexOf(final String columnName)
return columnPositions.applyAsInt(columnName);
}
+ public ColumnInspector asColumnInspector()
Review comment:
Hmm, should `RowSignature` simply implement `ColumnInspector`?
##########
File path: core/src/main/java/org/apache/druid/math/expr/Function.java
##########
@@ -517,6 +532,24 @@ public ExprEval apply(List<Expr> args, Expr.ObjectBinding
bindings)
return ExprEval.of(retVal);
}
+
+ @Override
+ public boolean canVectorize(Expr.InputBindingTypes inputTypes, List<Expr>
args)
+ {
+ return (args.size() == 1 || (args.get(1).isLiteral() &&
args.get(1).getLiteralValue() instanceof Number)) &&
+ inputTypes.canVectorize(args);
+ }
+
+ @Override
+ public <T> ExprVectorProcessor<T>
asVectorProcessor(Expr.VectorInputBindingTypes inputTypes, List<Expr> args)
+ {
+ if (args.size() == 1 || args.get(1).isLiteral()) {
+ final int radix = args.size() == 1 ? 10 : ((Number)
args.get(1).getLiteralValue()).intValue();
+ return VectorProcessors.parseLong(inputTypes, args.get(0), radix);
+ }
+ // not yet implemented, how did we get here
Review comment:
Could you add these details in the comment?
----------------------------------------------------------------
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]