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 2018/10/17 01:53:00 UTC

[jira] [Updated] (CALCITE-2628) JDBC adapter throws NullPointerException while generating GROUP BY query for MySQL

     [ https://issues.apache.org/jira/browse/CALCITE-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde updated CALCITE-2628:
---------------------------------
    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.

  was:
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.


> JDBC adapter throws NullPointerException while generating GROUP BY query for MySQL
> ----------------------------------------------------------------------------------
>
>                 Key: CALCITE-2628
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2628
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>            Priority: Major
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)