You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2020/11/06 00:16:00 UTC
[jira] [Created] (CALCITE-4380) Make class SqlNodeList implement
List
Julian Hyde created CALCITE-4380:
------------------------------------
Summary: Make class SqlNodeList implement List<SqlNode>
Key: CALCITE-4380
URL: https://issues.apache.org/jira/browse/CALCITE-4380
Project: Calcite
Issue Type: Bug
Reporter: Julian Hyde
Make {{class SqlNodeList}} implement {{List<SqlNode>}}. Currently it implements {{Iterable<SqlNode>}}. Supporting the List interface would make the size available, and that might allow users of SqlNodeList to pre-allocate space.
The downside is that a few places might have different overloads on {{SqlNode}} and {{Collection<SqlNode>}} or {{List<SqlNode>}}, and these would become ambiguous because {{SqlNodeList}} implements both.
Another benefit is that we can remove many of the calls to {{List<SqlNode> SqlNodeList.toList()}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)