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

Julian Hyde commented on CALCITE-2649:
--------------------------------------

Can you explain your use case where you need to know the stack depth?

If I’m creating an ON  condition for a join, I know that I’m about to pop 2 
items off the stack, and therefore create field references accordingly. 

I care that the stack depth is at least 2, but I don’t care whether it is 2 or 
1000. I feel that a stack not a list is the right abstraction because behavior 
is always relative to the top of the stack. 

There is already a variant of the field method that can look several places 
down the stack. 

> Allow RelBuilder to create field references to aliased relations without 
> knowing the size of the stack
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-2649
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2649
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: Stamatis Zampetakis
>            Assignee: Julian Hyde
>            Priority: Minor
>              Labels: beginner, newbie
>             Fix For: 1.18.0
>
>
> As of [CALCITE-1523|https://issues.apache.org/jira/browse/CALCITE-1523] it is 
> possible to create field references to aliased relations anywhere in the 
> stack. However the respective field method requires to pass as a parameter 
> the inputCount (i.e., size of the stack). This is not very convenient since 
> clients of RelBuilder are obliged to track the size of the stack (leading to 
> the uneseccary creation of Wrapper classes).



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

Reply via email to