[ https://issues.apache.org/jira/browse/CALCITE-5740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17731376#comment-17731376 ]
Rong Rong commented on CALCITE-5740: ------------------------------------ [~libenchao] i dont have a generic mechanism in mind. but the idea is to detect whether the access field is only from the LHS of the join - for Aggregate there's {{RelOptUtil.getAllFields(aggregateNode)}} to detect the all the bit access. - for Project the original method in this class is {{RelOptUtil.InputFinder.bits(projectNode.getProjects())}}, we can basically do the same for aggregate we can even create a util to detect all the inputField access bits for anyNode but that would require some work (or maybe it already exists :-P ) but for now i dont know if there's any additional benefit for supporting other nodes (maybe one more: CalcNode?) let me know what you think, should we (1) go with generic and create a bit finder and change the rule to any RelNode, or (2) add one for Aggregate only > Support for AggToSemiJoinRule > ----------------------------- > > Key: CALCITE-5740 > URL: https://issues.apache.org/jira/browse/CALCITE-5740 > Project: Calcite > Issue Type: New Feature > Reporter: Rong Rong > Priority: Major > > **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)