Add object type (#1948)

Add a new type: Object. Currently, it's mainly for complex aggregate metrics(HLL , Bitmap).

The Object type has the following constraints:
1 Object type could not as key column type
2 Object type doesn't support all indices (BloomFilter, short key, zone map, invert index)
3 Object type doesn't support filter and group by

In the implementation:

The Object type reuse the StringValue and StringVal, because in storage engine, the Object type is binary, it has a pointer and length.
This commit is contained in:
kangkaisen
2019-10-31 21:42:58 +08:00
committed by ZHAO Chun
parent 78d7a8f315
commit 95a3b4ccfe
46 changed files with 257 additions and 249 deletions

View File

@ -154,6 +154,7 @@ Expr::Expr(const TypeDescriptor& type) :
case TYPE_CHAR:
case TYPE_VARCHAR:
case TYPE_HLL:
case TYPE_OBJECT:
_node_type = (TExprNodeType::STRING_LITERAL);
break;
@ -212,6 +213,7 @@ Expr::Expr(const TypeDescriptor& type, bool is_slotref) :
case TYPE_CHAR:
case TYPE_VARCHAR:
case TYPE_HLL:
case TYPE_OBJECT:
_node_type = (TExprNodeType::STRING_LITERAL);
break;
@ -379,13 +381,6 @@ Status Expr::create_expr(ObjectPool* pool, const TExprNode& texpr_node, Expr** e
*expr = pool->add(new ScalarFnCall(texpr_node));
}
return Status::OK();
//case TExprNodeType::AGG_EXPR: {
// if (!texpr_node.__isset.agg_expr) {
// return Status::InternalError("Aggregation expression not set in thrift node");
// }
// *expr = pool->add(new AggregateExpr(texpr_node));
// return Status::OK();
//}
case TExprNodeType::CASE_EXPR: {
if (!texpr_node.__isset.case_expr) {
@ -752,7 +747,8 @@ doris_udf::AnyVal* Expr::get_const_val(ExprContext* context) {
}
case TYPE_CHAR:
case TYPE_VARCHAR:
case TYPE_HLL: {
case TYPE_HLL:
case TYPE_OBJECT: {
_constant_val.reset(new StringVal(get_string_val(context, NULL)));
break;
}