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

JDBC adapter throws NullPointerException while generating GROUP BY query for MySQL

    Details

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

      Description

      JDBC adapter throws NullPointerException or ClassCastException while generating GROUP BY query for MySQL.

      The problem is that MySQL does not support nested aggregates, and if the input to the query is either a table or an un-expected 'select *', the code that looks for the input expression to an aggregate function does not see a SqlSelectNode (and therefore throws ClassCastException) or runs off the end of the un-expanded '*' (giving a NullPointerException).

      See test cases in RelToSqlConverterTest.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: