gortiz commented on code in PR #17328:
URL: https://github.com/apache/pinot/pull/17328#discussion_r2639967866
##########
pinot-query-planner/src/main/java/org/apache/pinot/calcite/rel/rules/PinotSortExchangeCopyRule.java:
##########
@@ -100,23 +104,22 @@ public void onMatch(RelOptRuleCall call) {
call.transformTo(sortCopy);
}
+ @Value.Immutable
public interface Config extends RelRule.Config {
- Config DEFAULT = ImmutableSortExchangeCopyRule.Config.of()
- .withOperandFor(LogicalSort.class, PinotLogicalSortExchange.class);
+ Config DEFAULT = ImmutablePinotSortExchangeCopyRule.Config.builder()
+ .operandSupplier(b0 ->
+ b0.operand(LogicalSort.class)
+ .oneInput(b1 ->
b1.operand(PinotLogicalSortExchange.class).anyInputs()))
+ .build();
Review Comment:
This configures a _pre matching_ in Calcite, so the `onMatch` method is only
called if the node being visited is a LogicalSort with one input, which is a
`PinotLogicalSortExchange`
--
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]