drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arina Ielchiieva (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5537) Display columns alias for queries with sum() when RDBMS storage plugin is enabled
Date Sat, 27 May 2017 18:26:04 GMT

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

Arina Ielchiieva commented on DRILL-5537:
-----------------------------------------

RDBMS plugin does not have impact on DrillReduceAggregatesRule, is has impact on query planning.
When RDBMS plugin is enabled, it adds ProjectRemoveRule.
Due to bug in DrillReduceAggregatesRule we were losing column alias when we were creating
new aggregate call and ProjectRemoveRule was removing project stage since considered project
trivial. With the fix when column alias is preserved in new aggregate call, ProjectRecordBatch
does not remove project stage since now it does not consider project trivial (it sees that
we need to add alias).

> Display columns alias for queries with sum() when RDBMS storage plugin is enabled
> ---------------------------------------------------------------------------------
>
>                 Key: DRILL-5537
>                 URL: https://issues.apache.org/jira/browse/DRILL-5537
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.10.0
>            Reporter: Arina Ielchiieva
>            Assignee: Arina Ielchiieva
>
> When [RDBMS storage plugin|https://drill.apache.org/docs/rdbms-storage-plugin/]  is enabled,
alias is not displayed for column with sum function:
> {noformat}
> 0: jdbc:drill:zk=local> select version, sum(1) as s from sys.version group by version;
> +------------------+------+
> |     version      | $f1  |
> +------------------+------+
> | 1.11.0-SNAPSHOT  | 1    |
> +------------------+------+
> 1 row selected (0.444 seconds)
> {noformat}
> Other functions like avg, count are not affected.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message