You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Arina Ielchiieva (JIRA)" <ji...@apache.org> on 2017/10/30 13:33:00 UTC

[jira] [Comment Edited] (DRILL-5768) Drill planer should not allow select * with group by clause

    [ https://issues.apache.org/jira/browse/DRILL-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224886#comment-16224886 ] 

Arina Ielchiieva edited comment on DRILL-5768 at 10/30/17 1:32 PM:
-------------------------------------------------------------------

Issue to ban star in queries with group by was resolved in Calcite 1.5 (https://issues.apache.org/jira/browse/CALCITE-546).

The root cause is that [AggChecker|https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/validate/AggChecker.java#L93] does not do full validation and exits, too early.
The key change was made in how star in represented  in [SqlIdentifier|https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/SqlIdentifier.java#L359].

I suggest we wait for Calcite upgrade.


was (Author: arina):
Issue to ban star in queries with group by was resolved in Calcite 1.5 (https://issues.apache.org/jira/browse/CALCITE-546).

The root cause is that [AggChecker|https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/validate/AggChecker.java#L93] does not do full validation and exists, too early.
The key change was made in how star in represented  in [SqlIdentifier|https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/SqlIdentifier.java#L359].

I suggest we wait for Calcite upgrade.

> Drill planer should not allow select * with group by clause
> -----------------------------------------------------------
>
>                 Key: DRILL-5768
>                 URL: https://issues.apache.org/jira/browse/DRILL-5768
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.11.0
>            Reporter: Jinfeng Ni
>            Assignee: Roman Kulyk
>
> The following query should not be allowed in Drill planner.
> {code}
> select * from cp.`tpch/nation.parquet` group by n_regionkey;
> +----+
> | *  |
> +----+
> | 0  |
> | 1  |
> | 4  |
> | 3  |
> | 2  |
> +----+
> {code}
> However, Drill allow such query to run and even worse the result is incorrect.  It would make sense that we block such type of query. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)