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

2019-02-23 Thread Rong Rong (JIRA)


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

Rong Rong commented on CALCITE-2862:


Thanks for the quick reply [~kgyrtkirk] :-). as you mentioned in the JIRA yeah 
this doesn't seem to be limited to just to UDFs I will try some test and will 
close as duplicate if our problem is resolved by your patch.

> 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)


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

2019-02-23 Thread Zoltan Haindrich (JIRA)


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

Zoltan Haindrich commented on CALCITE-2862:
---

ExprSimplifier was doing some questionable things (and possibly re-running 
simplifications on alterady visited nodes)
I think CALCITE-2852 will probably help with this

> 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)