[
https://issues.apache.org/jira/browse/CALCITE-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16127023#comment-16127023
]
Dian Fu commented on CALCITE-1943:
----------------------------------
You're right. This is related to how to implement the above expression. I think
{{PREV("A"."net_weight", 0)}} will make the implementation more unified.
Let's image how we implement {{PREV("A"."net_weight", 0)}}. This may be
separated into two steps:
1) Calculate "A"."net_weight" (suppose the result is result1)
2) Calculate PREV(result1, 0)
This means that the result of {{"A"."net_weight"}} is better not be an
{{integer}} value (this depends on the implementation), otherwise it will be
impossible to calculate {{PREV(result1, 0)}} as it makes no sense if the first
argument of PREV is an {{integer}} value.
So for expression {{A.net_weight > PREV(B.net_weight, 1)}}, the type of
{{A.net_weight}} may not be an {{integer}} value (depends on the
implementation) and the compare may make no sense.
> Add back NavigationExpander and NavigationReplacer in SqlValidatorImpl
> ----------------------------------------------------------------------
>
> Key: CALCITE-1943
> URL: https://issues.apache.org/jira/browse/CALCITE-1943
> Project: Calcite
> Issue Type: Bug
> Reporter: Dian Fu
> Assignee: Julian Hyde
>
> {{NavigationExpander}} and {{NavigationReplacer}} was deleted as a fix of
> issue CALCITE-1871. Just create this ticket to track whether we should add
> them back.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)