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

Make class SqlNodeList implement List<SqlNode>

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.27.0
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: