[Bug](DecimalV3) fix decimalv3 functions (#19801)
This commit is contained in:
@ -64,8 +64,7 @@ namespace doris::vectorized {
|
||||
// space-saving algorithm
|
||||
template <typename T>
|
||||
struct AggregateFunctionTopNData {
|
||||
using ColVecType =
|
||||
std::conditional_t<IsDecimalNumber<T>, ColumnDecimal<Decimal128>, ColumnVector<T>>;
|
||||
using ColVecType = std::conditional_t<IsDecimalNumber<T>, ColumnDecimal<T>, ColumnVector<T>>;
|
||||
void set_paramenters(int input_top_num, int space_expand_rate = 50) {
|
||||
top_num = input_top_num;
|
||||
capacity = (uint64_t)top_num * space_expand_rate;
|
||||
@ -231,8 +230,7 @@ struct AggregateFunctionTopNImplIntInt {
|
||||
//for topn_array agg
|
||||
template <typename T, bool has_default_param>
|
||||
struct AggregateFunctionTopNImplArray {
|
||||
using ColVecType =
|
||||
std::conditional_t<IsDecimalNumber<T>, ColumnDecimal<Decimal128>, ColumnVector<T>>;
|
||||
using ColVecType = std::conditional_t<IsDecimalNumber<T>, ColumnDecimal<T>, ColumnVector<T>>;
|
||||
static void add(AggregateFunctionTopNData<T>& __restrict place, const IColumn** columns,
|
||||
size_t row_num) {
|
||||
if constexpr (has_default_param) {
|
||||
@ -256,8 +254,7 @@ struct AggregateFunctionTopNImplArray {
|
||||
//for topn_weighted agg
|
||||
template <typename T, bool has_default_param>
|
||||
struct AggregateFunctionTopNImplWeight {
|
||||
using ColVecType =
|
||||
std::conditional_t<IsDecimalNumber<T>, ColumnDecimal<Decimal128>, ColumnVector<T>>;
|
||||
using ColVecType = std::conditional_t<IsDecimalNumber<T>, ColumnDecimal<T>, ColumnVector<T>>;
|
||||
static void add(AggregateFunctionTopNData<T>& __restrict place, const IColumn** columns,
|
||||
size_t row_num) {
|
||||
if constexpr (has_default_param) {
|
||||
|
||||
@ -159,7 +159,8 @@ public:
|
||||
DataTypePtr get_return_type_impl(const DataTypes& arguments) const override {
|
||||
DataTypePtr type = nullptr;
|
||||
get_least_supertype(DataTypes {arguments[1], arguments[2]}, &type);
|
||||
DCHECK_NE(type, nullptr);
|
||||
DCHECK_NE(type, nullptr) << " arguments[1]: " << arguments[1]->get_name()
|
||||
<< " arguments[2]: " << arguments[2]->get_name();
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user