[feature-wip](decimalv3) Support basic agg and arithmetic operations for decimal v3 (#14513)

This commit is contained in:
Gabriel
2022-11-29 15:12:41 +08:00
committed by GitHub
parent 82da071b45
commit 3e8b3658c7
211 changed files with 29230 additions and 8063 deletions

View File

@ -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>>>;
};