walterddr commented on code in PR #9597:
URL: https://github.com/apache/pinot/pull/9597#discussion_r998275834
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/operands/FilterOperand.java:
##########
@@ -95,6 +114,36 @@ public Boolean apply(Object[] row) {
@Override
public abstract Boolean apply(Object[] row);
+ private static class BooleanInputRef extends FilterOperand {
+ private final RexExpression.InputRef _inputRef;
+
+ public BooleanInputRef(RexExpression.InputRef inputRef, DataSchema
dataSchema) {
+
Preconditions.checkState(dataSchema.getColumnDataType(inputRef.getIndex())
+ == DataSchema.ColumnDataType.BOOLEAN);
+ _inputRef = inputRef;
+ }
+
+ @Override
+ public Boolean apply(Object[] row) {
+ return row[_inputRef.getIndex()] instanceof Integer ? (Integer)
row[_inputRef.getIndex()] > 0
Review Comment:
with https://github.com/apache/pinot/pull/9618 i think this PR doesn't have
to do the per-row check
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/operands/FilterOperand.java:
##########
@@ -95,6 +114,36 @@ public Boolean apply(Object[] row) {
@Override
public abstract Boolean apply(Object[] row);
+ private static class BooleanInputRef extends FilterOperand {
+ private final RexExpression.InputRef _inputRef;
+
+ public BooleanInputRef(RexExpression.InputRef inputRef, DataSchema
dataSchema) {
+
Preconditions.checkState(dataSchema.getColumnDataType(inputRef.getIndex())
+ == DataSchema.ColumnDataType.BOOLEAN);
+ _inputRef = inputRef;
+ }
+
+ @Override
+ public Boolean apply(Object[] row) {
+ return row[_inputRef.getIndex()] instanceof Integer ? (Integer)
row[_inputRef.getIndex()] > 0
Review Comment:
with https://github.com/apache/pinot/pull/9618 i think this PR doesn't have
to do the per-row check, i will rebase and test once the other is merged
--
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]