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:17:00 UTC
[jira] [Updated] (CALCITE-4380) Make class SqlNodeList implement
List
[ https://issues.apache.org/jira/browse/CALCITE-4380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde updated CALCITE-4380:
---------------------------------
Description:
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()}}.
See [email thread on dev@calcite|https://lists.apache.org/thread.html/rdf346f734991928f3a1e84e46145a9d51275a4622c7e25fac1989908%40%3Cdev.calcite.apache.org%3E].
was:
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()}}.
> 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
> Assignee: Julian Hyde
> Priority: Major
>
> 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()}}.
> See [email thread on dev@calcite|https://lists.apache.org/thread.html/rdf346f734991928f3a1e84e46145a9d51275a4622c7e25fac1989908%40%3Cdev.calcite.apache.org%3E].
--
This message was sent by Atlassian Jira
(v8.3.4#803005)