[jira] [Resolved] (CALCITE-4371) TableMacro and TableFunction should have List rather than List parameters

Sun, 29 Nov 2020 15:00:37 -0800


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

Vladimir Sitnikov resolved CALCITE-4371.
----------------------------------------
    Fix Version/s: 1.27.0
       Resolution: Fixed

Fixed in 
https://github.com/apache/calcite/commit/d9a81b88ad561e7e4cedae93e805e0d7a53a7f1a

> TableMacro and TableFunction should have List<? extends Objects> rather than 
> List<Object> parameters
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-4371
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4371
>             Project: Calcite
>          Issue Type: Sub-task
>          Components: core
>    Affects Versions: 1.26.0
>            Reporter: Vladimir Sitnikov
>            Priority: Major
>             Fix For: 1.27.0
>
>
> Currently, the functions are declared as follows:
> {code:java}public interface TableMacro extends Function {
>   /**
>    * Applies arguments to yield a table.
>    *
>    * @param arguments Arguments
>    * @return Table
>    */
>   TranslatableTable apply(List<Object> arguments);
> }
> {code}
> That means the method can't be called with {{List<String>}} parameter.
> It makes sense to adjust the parameter type to {{List<? extends Object>}}, 
> then the call with {{List<String>}} would succeed.
> Note: this is source-incompatible change. So all the classes that implement 
> TableMacro and TableFunction would need to be adjusted.
> Calcite codebase has <10 such classes, so I believe it should be ok.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to