HappenLee commented on code in PR #18014:
URL: https://github.com/apache/doris/pull/18014#discussion_r1145576543
##########
be/src/vec/aggregate_functions/aggregate_function_product.h:
##########
@@ -77,6 +77,30 @@ struct AggregateFunctionProductData<Decimal128> {
void reset(Decimal128 value) { product = std::move(value); }
};
+template <>
+struct AggregateFunctionProductData<Decimal128I> {
+ Decimal128I product {};
+
+ template <typename NestedType>
+ void add(Decimal<NestedType> value, UInt32 scale) {
+ product *= value;
+ product /= DataTypeDecimal<Decimal128I>::get_scale_multiplier(scale);
Review Comment:
why directly pass
`DataTypeDecimal<Decimal128I>::get_scale_multiplier(scale)` to reduce the
function call ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]