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

ArrayIndexOutOfBoundsException in sql-to-rel conversion for two-level columns

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.0
    • Fix Version/s: 1.10.0
    • Component/s: None
    • Labels:

      Issue Links

        Activity

        Hide
        maryannxue Maryann Xue added a comment -

        Julian Hyde, could you please review this patch?

        Show
        maryannxue Maryann Xue added a comment - Julian Hyde , could you please review this patch?
        Hide
        julianhyde Julian Hyde added a comment -

        +1

        I'd write

        +          final String tableName = map.keySet().iterator().next();
        +          final SqlValidatorNamespace namespace = map.values().iterator().next();
        

        a little differently, assigning map.entrySet().iterator().next() to a variable rather than independently iterating over keys and values.

        Show
        julianhyde Julian Hyde added a comment - +1 I'd write + final String tableName = map.keySet().iterator().next(); + final SqlValidatorNamespace namespace = map.values().iterator().next(); a little differently, assigning map.entrySet().iterator().next() to a variable rather than independently iterating over keys and values.
        Hide
        maryannxue Maryann Xue added a comment -

        Good advice. Thank you, Julian! I'll change those lines and make a check-in.

        Show
        maryannxue Maryann Xue added a comment - Good advice. Thank you, Julian! I'll change those lines and make a check-in.
        Show
        maryannxue Maryann Xue added a comment - Fixed in https://git1-us-west.apache.org/repos/asf?p=calcite.git;a=commit;h=349c7dc .
        Hide
        jcamachorodriguez Jesus Camacho Rodriguez added a comment -

        Resolved in release 1.10.0 (2016-10-12).

        Show
        jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.10.0 (2016-10-12).

          People

          • Assignee:
            maryannxue Maryann Xue
            Reporter:
            maryannxue Maryann Xue
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development