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

Julian Hyde commented on CALCITE-7227:
--------------------------------------

{{StandardConvertletTable}} is an implementation of {{interface 
SqlRexConvertletTable}}. Is there any reason why you couldn't produce another 
implementation?

It would be useful to re-imagine {{StandardConvertletTable}}. Originally 
{{StandardConvertletTable}} was a useful container of desugaring mappings. But 
not everyone wants to apply those mappings (the example you cite, {{SQRT\(x)}} 
→ {{POW(x, .5)}} is a great example). Some people might even want to apply 
the mappings in the other direction ({{NVL}} → {{COALESCE}}) or 
({{COALESCE}} → {{NVL}}).

The way to do this, I think, is to create concept of a "Rex rule" that is 
analogous to RelRule but works on scalar expressions (and also aggregate 
functions).

> There is no way to modify the StandardConvertletTable
> -----------------------------------------------------
>
>                 Key: CALCITE-7227
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7227
>             Project: Calcite
>          Issue Type: Wish
>          Components: core
>    Affects Versions: 1.40.0
>            Reporter: Mihai Budiu
>            Priority: Minor
>
> The convertlet table has a lot of functionality, but there is no easy way to, 
> let's say, exclude one of the conversions that is undesirable. Copying and 
> modifying the whole class is a solution, but it is not great. Adding new 
> conversions seems possible, but excluding the existing ones seems impossible.



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

Reply via email to