abstractdog commented on a change in pull request #2099:
URL: https://github.com/apache/hive/pull/2099#discussion_r616599645
##########
File path:
ql/src/gen/vectorization/ExpressionTemplates/ColumnArithmeticColumn.txt
##########
@@ -34,20 +34,17 @@ public class <ClassName> extends VectorExpression {
private static final long serialVersionUID = 1L;
- private final int colNum1;
private final int colNum2;
Review comment:
I agree that the current solution is not really clean by having only the
first column put into VectorExpression
a couple of notes here, which needs to be discussed before proceeding with
this huge refactor (which I'm happy to do once we 100% certain about the
"perfect" solution):
1. unary, binary is not enough, unfortunately, we have even expressions
involving even more cols, this is not a problem, we have the language support
for that :) tertiary, quaternary...
2. what's confusing is, how to show with simple class names that
unary/binary/... is only a story about the input columns? an expression can
have constants too, e.g. in IfExprScalarScalar.txt:
```
this.arg1Column = arg1Column;
this.arg2Scalar = arg2Scalar;
this.arg3Scalar = arg3Scalar;
```
in our terminology here, this is a unary expression because of arg1Column +
scalars, but in reality, it's obviously not a unary function...
3. with subclasses, we'll have to implement a general
VectorExpression.setInputColumnNum(int i, int j, int k, ...vararg), otherwise,
we won't be able to change the input column numbers (which is important, this
was the intention of this huge vector expression refactor), I think this will
simply work by simply overriding vararg method in subclasses
--
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]