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

Zhen Chen commented on CALCITE-5787:
------------------------------------

[~julianhyde] I apologize for this oversight; my understanding of 
`getInputFieldsUsed` might have been somewhat flawed. Although I tried to 
discuss in CALCITE-5787 whether a single `ImmutableBitSet` or a list was 
needed, I didn't receive confirmation from others. I will submit a PR today to 
fix this issue. However, this might introduce a blocking change: changing the 
return value of the `RelMdInputFieldsUsed` interface to `ImmutableBitSet` 
instead of a list. Considering we haven't released a version yet, is this 
acceptable? I also saw your reply in CALCITE-5740, so I'll reply to you here as 
well. If adjusting the return value type of this interface is acceptable, I 
will also include a fix for `AggToSemiJoinRule` in this PR. Could you please 
take a look and see if this is acceptable?

> The RelMdInputFieldsUsed is introduced to track the usage of input fields
> -------------------------------------------------------------------------
>
>                 Key: CALCITE-5787
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5787
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: Rong Rong
>            Assignee: Zhen Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.42.0
>
>
> It would be super useful to detect all the input fields used in a {{RelNode}} 
> to indicate what's being used from the inputs. 
> We have a similar utility to find all input fields referenced for a 
> {{RexNode}} via {{RelOptUtil.InputFinder}}. For a relation we can do one step 
> further to automatically keep track of all the relevant relations.
> For example,
>  - {{Aggregate}} relations: {{RelNode.getInputFieldsUsed}} should return a 
> union of the input fields used by {{groupSet}} and all {{aggregateCall}}  
>  - for each {{aggregateCall}}, we should include all fields used in 
> {{{}argList{}}}, {{{}filterArg{}}}, {{{}distinctKeys{}}}, and 
> {{{}collation{}}}.
> see relative discussion in CALCITE-5740



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

Reply via email to