[ https://issues.apache.org/jira/browse/CALCITE-4621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17351045#comment-17351045 ]
Ruben Q L commented on CALCITE-4621: ------------------------------------ [~zabetak] the rule uses the "new" interface {{OperandDetailBuilder#predicate}}: {code} public interface OperandDetailBuilder<R extends RelNode> { ... /** Sets the predicate of this operand. */ OperandDetailBuilder<R> predicate(Predicate<? super R> predicate); ... {code} I just propose to correct this predicate to fix the issue. > SemiJoinRule throws AssertionError on ANTI join > ----------------------------------------------- > > Key: CALCITE-4621 > URL: https://issues.apache.org/jira/browse/CALCITE-4621 > Project: Calcite > Issue Type: Bug > Components: core > Affects Versions: 1.26.0 > Reporter: Ruben Q L > Assignee: Ruben Q L > Priority: Major > Labels: pull-request-available > Fix For: 1.27.0 > > Time Spent: 10m > Remaining Estimate: 0h > > Credits to [~thomas.rebele] for discovering the issue. > When SemiJoinRule (both {{CoreRules.JOIN_TO_SEMI_JOIN}} and > {{CoreRules.PROJECT_TO_SEMI_JOIN}}) matches an ANTI join, it fails with the > following error: > {noformat} > java.lang.AssertionError: ANTI > at org.apache.calcite.rel.rules.SemiJoinRule.perform(SemiJoinRule.java:122) > ... > {noformat} > The problem is that the rule config only forbids RIGHT and FULL joins, and > lets ANTI go through. Later when the rule is actually executed, joins with > type ANTI cannot be handled, hence the {{AssertionError}}. > The rule config must be adapted to forbid also ANTI joins. -- This message was sent by Atlassian Jira (v8.3.4#803005)