You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2026/01/22 21:00:00 UTC

[jira] [Commented] (CALCITE-5740) Support for AggToSemiJoinRule

    [ https://issues.apache.org/jira/browse/CALCITE-5740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18053699#comment-18053699 ] 

Julian Hyde commented on CALCITE-5740:
--------------------------------------

The {{SemiJoinRule.getUsedFields}} method (see [code|https://github.com/apache/calcite/blob/6fab1a1b64766ce5a7167b5be3e62505b99fad07/core/src/main/java/org/apache/calcite/rel/rules/SemiJoinRule.java#L143-L146]) doesn't look right to me.

It's ironic that after I and [~zabetak] argued that getInputFieldsUsed should return a single ImmutableBitSet, and our arguments were ignored, someone should add this method that produces a single ImmutableBitSet but does it wrong.

> Support for AggToSemiJoinRule
> -----------------------------
>
>                 Key: CALCITE-5740
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5740
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: Rong Rong
>            Assignee: Zhen Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.42.0
>
>
> **Description**
> Currently we only have JoinToSemiJoin and ProjectToSemiJoin rule.  which in the rule itself it performance check and see if the project accesses columns from the RHS result
> This can be extended to Aggregate as well, experimental code: https://github.com/walterddr/calcite/pull/1/files
> **Alternative**
> Alternative is to add a project/calc between the join and the aggregate to activate the project-to-semi-join rule. please share if there's any other alternative if I haven't considered. 
> thanks



--
This message was sent by Atlassian Jira
(v8.20.10#820010)