You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Rong Rong (JIRA)" <ji...@apache.org> on 2019/02/23 15:59:00 UTC

[jira] [Updated] (CALCITE-2862) Deprecated ExprSimplifier causes some operands not being simplified

     [ https://issues.apache.org/jira/browse/CALCITE-2862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rong Rong updated CALCITE-2862:
-------------------------------
    Description: 
This might not be a bug or the original intention of CALCITE-2726 since it is not part of the [PR|https://github.com/apache/calcite/pull/956/files]. 
 The reduction of ExprSimplifier (RexShuttle) actually causes some of the chained operations not being simplified. For example:
{code:java}
AS(
  +(
    someAggFunc($2, $0), 
    CAST(1):BIGINT NOT NULL
    ),
  someName'
)
{code}
Somehow did not get simplified (e.g. the CAST(1) still remains instead of being simplified as a Literal. 

My initial feeling is that {{AS}} is not one of the kinds in the case-switch code in RexSimplify. 

  was:
This might not be a bug or the original intention of CALCITE-2726 since it is not part of the [PR|https://github.com/apache/calcite/pull/956/files]. 
 The reduction of ExprSimplifier (RexShuttle) actually causes some of the chained operations not being simplified. For example:
{code:java}
AS(
  +(
    someAggFunc($2, $0), 
    CAST(1):BIGINT NOT NULL
    ),
  someName'
)
{code}
Somehow did not get simplified. My initial feeling is that {{AS}} is not one of the kinds in the case-switch code in RexSimplify. 


> Deprecated ExprSimplifier causes some operands not being simplified
> -------------------------------------------------------------------
>
>                 Key: CALCITE-2862
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2862
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Rong Rong
>            Priority: Major
>
> This might not be a bug or the original intention of CALCITE-2726 since it is not part of the [PR|https://github.com/apache/calcite/pull/956/files]. 
>  The reduction of ExprSimplifier (RexShuttle) actually causes some of the chained operations not being simplified. For example:
> {code:java}
> AS(
>   +(
>     someAggFunc($2, $0), 
>     CAST(1):BIGINT NOT NULL
>     ),
>   someName'
> )
> {code}
> Somehow did not get simplified (e.g. the CAST(1) still remains instead of being simplified as a Literal. 
> My initial feeling is that {{AS}} is not one of the kinds in the case-switch code in RexSimplify. 



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