Jess is correct that a rule is allowed to no-op, but how to no-op is different for two kinds of rules.
Converter rules can produce 0 or 1 successors, and therefore no-op by returning null from their implementation of the method @Nullable RelNode ConverterRule.convert(RelNode) Regular rules are allowed to produce 0, 1 or more successors, and therefore the API is different. The method of interest is void RelRule.onMatch(RelOptRuleCall call) Implementations of that method invoke call.transformTo(RelNode) with each successor, and calling that method 0 times is a no-op. Julian > On Apr 11, 2022, at 12:00 PM, Jess Balint <[email protected]> wrote: > > You can return null in your rule implementation if the transformation > cannot produce a valid plan. If this is not clearly the answer to what > you're asking, please share an example or some details about what you're > attempting to do. > > Jess > > On Mon, Apr 11, 2022 at 1:29 PM Soumyava Das <[email protected]> wrote: > >> Hi, >> >> I have a question for you. >> >> During a transformation while planning, if we have a faulty transformation >> that cannot build the query properly, is it fine if I ignore it with the >> premise that the transformation can be deemed invalid and the assumption is >> that calcite will find another plan as it continues exploring ? >> >> Thanks, >> Somu >>
