github-actions[bot] commented on code in PR #18014:
URL: https://github.com/apache/doris/pull/18014#discussion_r1144191153
##########
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);
+ }
+
+ void merge(const AggregateFunctionProductData& other, UInt32 scale) {
+ product *= other.product;
+ product /= DataTypeDecimal<Decimal128I>::get_scale_multiplier(scale);
+ }
+
+ void write(BufferWritable& buffer) const { write_binary(product, buffer); }
+
+ void read(BufferReadable& buffer) { read_binary(product, buffer); }
+
+ Decimal128 get() const { return product; }
+
+ void reset(Decimal128 value) { product = std::move(value); }
Review Comment:
warning: std::move of the variable 'value' of the trivially-copyable type
'doris::vectorized::Decimal128' (aka 'Decimal<__int128>') has no effect; remove
std::move() [performance-move-const-arg]
```suggestion
void reset(Decimal128 value) { product = value; }
```
--
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]