You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stamatis Zampetakis (JIRA)" <ji...@apache.org> on 2019/04/02 17:10:00 UTC
[jira] [Resolved] (CALCITE-2930) IllegalStateException when
FilterCorrelateRule matches a SEMI or ANTI Correlate
[ https://issues.apache.org/jira/browse/CALCITE-2930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stamatis Zampetakis resolved CALCITE-2930.
------------------------------------------
Resolution: Fixed
Fixed inĀ [43ba147937dc53dfb86ee8723d45562e48b14d20|https://github.com/apache/calcite/commit/43ba147937dc53dfb86ee8723d45562e48b14d20]. Thanks for the PR [~rubenql]!
> IllegalStateException when FilterCorrelateRule matches a SEMI or ANTI Correlate
> -------------------------------------------------------------------------------
>
> Key: CALCITE-2930
> URL: https://issues.apache.org/jira/browse/CALCITE-2930
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.18.0, 1.19.0
> Reporter: Ruben Quesada Lopez
> Assignee: Ruben Quesada Lopez
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.20.0
>
> Time Spent: 3h 50m
> Remaining Estimate: 0h
>
> FilterCorrelateRule#onMatch method executes the following:
> {code:java}
> public void onMatch(RelOptRuleCall call) {
> final Filter filter = call.rel(0);
> final Correlate corr = call.rel(1);
> ...
> RelOptUtil.classifyFilters(
> corr,
> aboveFilters,
> JoinRelType.INNER,
> false,
> !corr.getJoinType().toJoinType().generatesNullsOnLeft(), // *** HERE!
> !corr.getJoinType().toJoinType().generatesNullsOnRight(), // *** HERE!
> aboveFilters,
> leftFilters,
> rightFilters);
> ...
> {code}
> If the Correlate object has SemiJoinType SEMI (or ANTI), the {{corr.getJoinType().toJoinType()}} will throw a IllegalStateException:
> {code}
> Caused by: java.lang.IllegalStateException: Unable to convert SEMI to JoinRelType
> at org.apache.calcite.sql.SemiJoinType.toJoinType(SemiJoinType.java:83)
> at org.apache.calcite.rel.rules.FilterCorrelateRule.onMatch(FilterCorrelateRule.java:89)
> at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:205)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)