gortiz commented on code in PR #14066: URL: https://github.com/apache/pinot/pull/14066#discussion_r1772783313
########## pinot-query-planner/src/main/java/org/apache/pinot/calcite/rel/rules/PinotAggregateToSemiJoinRule.java: ########## @@ -50,18 +48,9 @@ public class PinotAggregateToSemiJoinRule extends RelOptRule { new PinotAggregateToSemiJoinRule(PinotRuleUtils.PINOT_REL_FACTORY); public PinotAggregateToSemiJoinRule(RelBuilderFactory factory) { - super(operand(LogicalAggregate.class, any()), factory, null); - } - - @Override - @SuppressWarnings("rawtypes") - public boolean matches(RelOptRuleCall call) { - final Aggregate topAgg = call.rel(0); - if (!PinotRuleUtils.isJoin(topAgg.getInput())) { - return false; - } - final Join join = (Join) PinotRuleUtils.unboxRel(topAgg.getInput()); - return PinotRuleUtils.isAggregate(join.getInput(1)); + super(operand(Aggregate.class, + some(operand(Join.class, some(operand(RelNode.class, any()), operand(Aggregate.class, any()))))), factory, + null); Review Comment: Nit: I would recommend to start using the new way to instantiate rules instead of this one, which is deprecated. See PinotImplicitTableHintRule in https://github.com/apache/pinot/pull/13943. -- 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...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org