61yao commented on code in PR #9792:
URL: https://github.com/apache/pinot/pull/9792#discussion_r1022137413


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/operands/FilterOperand.java:
##########
@@ -41,22 +41,24 @@ public static FilterOperand toFilterOperand(RexExpression 
rexExpression, DataSch
     }
   }
 
-  public static FilterOperand toFilterOperand(RexExpression.Literal literal) {
+  private static FilterOperand toFilterOperand(RexExpression.Literal literal) {
     return new BooleanLiteral(literal);
   }
 
-  public static FilterOperand toFilterOperand(RexExpression.InputRef inputRef, 
DataSchema dataSchema) {
+  private static FilterOperand toFilterOperand(RexExpression.InputRef 
inputRef, DataSchema dataSchema) {
     return new BooleanInputRef(inputRef, dataSchema);
   }
 
-  public static FilterOperand toFilterOperand(RexExpression.FunctionCall 
functionCall, DataSchema dataSchema) {
-
+  private static FilterOperand toFilterOperand(RexExpression.FunctionCall 
functionCall, DataSchema dataSchema) {
     switch 
(OperatorUtils.canonicalizeFunctionName(functionCall.getFunctionName())) {
       case "AND":
+        Preconditions.checkState(functionCall.getFunctionOperands().size() 
>=2, "AND takes >=2 argument");

Review Comment:
   Good point. Forgot about this while writing the code. added.



-- 
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]

Reply via email to