-
Notifications
You must be signed in to change notification settings - Fork 409
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
fix decimal bug #10
Conversation
/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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
).
Don't merge to raft, merge to master instead: |
/rebuild |
Fixed in #51 |
Refine some code: use template specialization to avoid too many compilation conditions
No description provided.