[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:
spaces-x
2022-03-24 09:11:34 +08:00
committed by GitHub
parent 36c85d2f06
commit bea9a7ba4f
67 changed files with 1498 additions and 153 deletions

View File

@ -216,6 +216,7 @@ void RawValue::print_value(const void* value, const TypeDescriptor& type, int sc
case TYPE_VARCHAR:
case TYPE_OBJECT:
case TYPE_HLL:
case TYPE_QUANTILE_STATE:
case TYPE_STRING: {
string_val = reinterpret_cast<const StringValue*>(value);
std::stringstream ss;
@ -296,6 +297,7 @@ void RawValue::write(const void* value, void* dst, const TypeDescriptor& type, M
case TYPE_OBJECT:
case TYPE_HLL:
case TYPE_QUANTILE_STATE:
case TYPE_VARCHAR:
case TYPE_CHAR:
case TYPE_STRING: {