Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRILL-5537: Display columns alias for queries with sum() when RDBMS s… #845

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
3 participants
@arina-ielchiieva
Copy link
Member

commented May 25, 2017

…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 removed alias was lost.

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.
@jinfengni

This comment has been minimized.

Copy link
Contributor

commented May 30, 2017

+1

LGTM.

@paul-rogers
Copy link
Contributor

left a comment

Lots of nice code cleanup. The key change seems to be to pass along a name where we used to pass nothing. I'm not a Calcite expert, but seems good.

+1

jinfengni added a commit to jinfengni/incubator-drill that referenced this pull request Jun 1, 2017

jinfengni added a commit to jinfengni/incubator-drill that referenced this pull request Jun 1, 2017

@asfgit asfgit closed this in d38917b Jun 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.