[jira] [Commented] (CALCITE-6025) Simplify DECODE function

2023-09-25 Thread Julian Hyde (Jira)


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

Julian Hyde commented on CALCITE-6025:
--

I don't think we should simplify DECODE. Why? I think of DECODE as syntactic 
sugar for CASE. As such, simplify should work on the CASE expression that has 
been created from DECODE. If generating SQL for a dialect that supports DECODE, 
we could convert CASE back to DECODE.

> Simplify DECODE function
> 
>
> Key: CALCITE-6025
> URL: https://issues.apache.org/jira/browse/CALCITE-6025
> Project: Calcite
>  Issue Type: Improvement
>Reporter: Wenzhuang Zhu
>Assignee: Wenzhuang Zhu
>Priority: Minor
>
> RexSimplify.simplify  supports COALESCE and CASE, but DECODE is not supported.
>  
> DECODE function: decode(, , [, , 
> ]...[, ]) 
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CALCITE-6025) Simplify DECODE function

2023-09-25 Thread Ran Tao (Jira)


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

Ran Tao commented on CALCITE-6025:
--

Maybe we should add description to explain this ticket?

> Simplify DECODE function
> 
>
> Key: CALCITE-6025
> URL: https://issues.apache.org/jira/browse/CALCITE-6025
> Project: Calcite
>  Issue Type: Improvement
>Reporter: Wenzhuang Zhu
>Assignee: Wenzhuang Zhu
>Priority: Minor
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)