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

Sat, 14 Nov 2020 13:51:23 -0800


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

Vladimir Sitnikov reassigned CALCITE-4371:
------------------------------------------

    Assignee:     (was: Vladimir Sitnikov)

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