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

Julian Hyde commented on CALCITE-3183:
--------------------------------------

Review comments:
* In the factory method, can you convert the description of "variablesSet" into 
English.
* Factories should be minimal. The old method should be default and deprecated. 
See {{SortFactory}}.
* In the factory, use a {{List}} rather than {{ImmutableList}}. We try to keep 
Guava out of public APIs.
* In the {{RelBuilder}} method, use an {{Iterable}} argument rather than and 
{{ImmutableSet}}. I suggest {{filter(Iterable<CorrelationId> variablesSet, 
Iterable<? extends RexNode> predicates)}}. Make other {{RelBuilder.filter}} 
methods call your method. We don't want new code paths.
* Modify {{algebra.md}}.

> Trimming method for Filter rel uses wrong traitSet 
> ---------------------------------------------------
>
>                 Key: CALCITE-3183
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3183
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Juhwan Kim
>            Assignee: Juhwan Kim
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> It seems like there is a bug here: 
> https://github.com/apache/calcite/blob/e8d598a434e8dbadaf756f8c57c748f4d7e16fdf/core/src/main/java/org/apache/calcite/sql2rel/RelFieldTrimmer.java#L487.
> Unlike other trimming methods, filter trim function copies the current filter 
> rel and directly pushes it to the builder instead of calling factory method 
> for filter rel. The problem with the current code is that it uses the same 
> traitSet even though it would no longer be valid after trimming its input. 
> For example, fields in collation might have been updated after trimming. We 
> should reflect this change when creating a new rel.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to