[feature-wip](decimalv3) Support basic agg and arithmetic operations for decimal v3 (#14513)
This commit is contained in:
@ -55,18 +55,18 @@ struct ArrayAggregateResultImpl<Element, AggregateOperation::MAX> {
|
||||
|
||||
template <typename Element>
|
||||
struct ArrayAggregateResultImpl<Element, AggregateOperation::AVERAGE> {
|
||||
using Result = std::conditional_t<IsDecimalNumber<Element>, Decimal128, Float64>;
|
||||
using Result = DisposeDecimal<Element, Float64>;
|
||||
};
|
||||
|
||||
template <typename Element>
|
||||
struct ArrayAggregateResultImpl<Element, AggregateOperation::PRODUCT> {
|
||||
using Result = std::conditional_t<IsDecimalNumber<Element>, Decimal128, Float64>;
|
||||
using Result = DisposeDecimal<Element, Float64>;
|
||||
};
|
||||
|
||||
template <typename Element>
|
||||
struct ArrayAggregateResultImpl<Element, AggregateOperation::SUM> {
|
||||
using Result = std::conditional_t<
|
||||
IsDecimalNumber<Element>, Decimal128,
|
||||
using Result = DisposeDecimal<
|
||||
Element,
|
||||
std::conditional_t<IsFloatNumber<Element>, Float64,
|
||||
std::conditional_t<std::is_same_v<Element, Int128>, Int128, Int64>>>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user