[ 
https://issues.apache.org/jira/browse/CALCITE-4621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ruben Q L updated CALCITE-4621:
-------------------------------
    Description: 
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.

  was:
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.


> 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)

Reply via email to