GitHub user arina-ielchiieva opened a pull request:
https://github.com/apache/drill/pull/845
DRILL-5537: Display columns alias for queries with sum() when RDBMS sâ¦
â¦torage plugin is enabled
For sum() queries DrillConvertSumToSumZero rule is applied. But during
converting to new aggregate call, this call was created with name set to null,
therefore column alias was lost when RDBMS storage plugin was enabled. RDBMS
storage plugin was adding new rule during PHYSICAL phase - ReduceProjectRule,
since project stage was omitted, column alias was lost. With this fix even if
project stage is omitted, column alias still will be shown.
Changes:
1. Added old call aggregate name during new call aggregate creation in
DrillConvertSumToSumZero rule.
2. Replaced deprecated AggregateCall constructor to `AggregateCall.create`.
3. Minor refactoring.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/arina-ielchiieva/drill DRILL-5537
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/845.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #845
----
commit 5e83d6d17232d4ddbff7e11eaadecad9ef992b10
Author: Arina Ielchiieva <[email protected]>
Date: 2017-05-25T13:23:43Z
DRILL-5537: Display columns alias for queries with sum() when RDBMS storage
plugin is enabled
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---