yinzhijian commented on code in PR #10377: URL: https://github.com/apache/doris/pull/10377#discussion_r909264103
########## fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java: ########## @@ -567,13 +578,26 @@ public Expression withPredicate(PredicateContext ctx, Expression e) { * @return Expression */ public Expression withBetween(PredicateContext ctx, Expression e) { - boolean isNotBetween = ctx.NOT() != null ? true : false; BetweenPredicate betweenPredicate = new BetweenPredicate( e, expression(ctx.lower), expression(ctx.upper) ); - return isNotBetween ? new Not(betweenPredicate) : betweenPredicate; + return betweenPredicate; + } + + /** + * Generate In predicate. + * + * @param ctx PredicateContext + * @param e Expression + * @return Expression + */ + public Expression withIn(PredicateContext ctx, Expression e) { + List<Expression> expressions = ctx.expression().stream() + .map(expr -> expression(expr)).collect(ImmutableList.toImmutableList()); + InPredicate inPredicate = new InPredicate(e, expressions); + return inPredicate; Review Comment: ```suggestion return new InPredicate(e, expressions); ``` -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org