[feature] Support pre-aggregation for quantile type (#8234)
Add a new column-type to speed up the approximation of quantiles. 1. The new column-type is named `quantile_state` with fixed aggregation function `quantile_union`, which stores the intermediate results of pre-aggregated approximation calculations for quantiles. 2. support pre-aggregation of new column-type and quantile_state related functions.
This commit is contained in:
@ -142,6 +142,7 @@ Expr::Expr(const TypeDescriptor& type)
|
||||
case TYPE_HLL:
|
||||
case TYPE_OBJECT:
|
||||
case TYPE_STRING:
|
||||
case TYPE_QUANTILE_STATE:
|
||||
_node_type = (TExprNodeType::STRING_LITERAL);
|
||||
break;
|
||||
|
||||
@ -199,6 +200,7 @@ Expr::Expr(const TypeDescriptor& type, bool is_slotref)
|
||||
case TYPE_VARCHAR:
|
||||
case TYPE_HLL:
|
||||
case TYPE_OBJECT:
|
||||
case TYPE_QUANTILE_STATE:
|
||||
case TYPE_STRING:
|
||||
_node_type = (TExprNodeType::STRING_LITERAL);
|
||||
break;
|
||||
@ -687,6 +689,7 @@ doris_udf::AnyVal* Expr::get_const_val(ExprContext* context) {
|
||||
case TYPE_VARCHAR:
|
||||
case TYPE_HLL:
|
||||
case TYPE_OBJECT:
|
||||
case TYPE_QUANTILE_STATE:
|
||||
case TYPE_STRING: {
|
||||
_constant_val.reset(new StringVal(get_string_val(context, nullptr)));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user