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

fix decimal bug #10

Closed
wants to merge 1 commit into from
Closed

fix decimal bug #10

wants to merge 1 commit into from

Conversation

hanfei1991
Copy link
Member

No description provided.

@zanmato1984
Copy link
Contributor

/run-integration-tests

@@ -44,6 +44,16 @@ class AggregateFunctionAvg final : public IAggregateFunctionDataHelper<Aggregate
}
String getName() const override { return "avg"; }

AggregateDataPtr adjust_place(AggregateDataPtr place) const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two functions are implemented twice, in both avg and sum. They can simply be static and put somewhere common.

@@ -44,6 +44,16 @@ class AggregateFunctionAvg final : public IAggregateFunctionDataHelper<Aggregate
}
String getName() const override { return "avg"; }

AggregateDataPtr adjust_place(AggregateDataPtr place) const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend to name these two functions more specifically as alignDecimalPlace, put more comments, and use the camel-case naming as CH does (i.e. alignDecimalPlace rather than align_decimal_place).

@innerr
Copy link
Contributor

innerr commented Apr 2, 2019

Don't merge to raft, merge to master instead:
#30

@hanfei1991 hanfei1991 changed the base branch from raft to master April 23, 2019 15:29
@hanfei1991 hanfei1991 changed the base branch from master to raft April 23, 2019 15:30
@solotzg
Copy link
Contributor

solotzg commented Apr 24, 2019

/rebuild

@zanmato1984
Copy link
Contributor

Fixed in #51
Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants