You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (Jira)" <ji...@apache.org> on 2020/11/02 20:34:00 UTC
[jira] [Created] (CALCITE-4371) TableMacro and TableFunction should
have List extends Objects> rather than List
Vladimir Sitnikov created CALCITE-4371:
------------------------------------------
Summary: 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
Assignee: Vladimir Sitnikov
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)