Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4380

Make class SqlNodeList implement List<SqlNode>

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.27.0
    • None
    • None

    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.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            julianhyde Julian Hyde
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: