[
https://issues.apache.org/jira/browse/CALCITE-2930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16797179#comment-16797179
]
Kevin Risden commented on CALCITE-2930:
---------------------------------------
Updated fix version to 1.20.0 since this was created after 1.19.0 RC were
started and reviews are still ongoing.
> FilterCorrelateRule on a Correlate with SemiJoinType SEMI (or ANTI) throws
> IllegalStateException
> ------------------------------------------------------------------------------------------------
>
> 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: 2h 20m
> 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)