[refactor] Remove decimal v1 related code from code base (#6079)

remove ALL DECIMAL V1 type code , this is a part of #6073
This commit is contained in:
Zhengguo Yang
2021-07-07 10:26:32 +08:00
committed by GitHub
parent d6e6c7815b
commit 739c0268ff
151 changed files with 707 additions and 4369 deletions

View File

@ -127,7 +127,6 @@ Expr::Expr(const TypeDescriptor& type)
_node_type = (TExprNodeType::FLOAT_LITERAL);
break;
case TYPE_DECIMAL:
case TYPE_DECIMALV2:
_node_type = (TExprNodeType::DECIMAL_LITERAL);
break;
@ -186,7 +185,6 @@ Expr::Expr(const TypeDescriptor& type, bool is_slotref)
_node_type = (TExprNodeType::FLOAT_LITERAL);
break;
case TYPE_DECIMAL:
case TYPE_DECIMALV2:
_node_type = (TExprNodeType::DECIMAL_LITERAL);
break;
@ -459,14 +457,6 @@ int Expr::compute_results_layout(const std::vector<Expr*>& exprs, std::vector<in
if (exprs[i]->type().type == TYPE_CHAR || exprs[i]->type().type == TYPE_VARCHAR) {
data[i].byte_size = 16;
data[i].variable_length = true;
} else if (exprs[i]->type().type == TYPE_DECIMAL) {
data[i].byte_size = get_byte_size(exprs[i]->type().type);
// Although the current decimal has a fix-length, for the
// same value, it will work out different hash value due to the
// different memory represent if the variable_length here is set
// to false, so we have to keep it.
data[i].variable_length = true;
} else {
data[i].byte_size = get_byte_size(exprs[i]->type().type);
data[i].variable_length = false;
@ -720,10 +710,7 @@ doris_udf::AnyVal* Expr::get_const_val(ExprContext* context) {
_constant_val.reset(new DateTimeVal(get_datetime_val(context, NULL)));
break;
}
case TYPE_DECIMAL: {
_constant_val.reset(new DecimalVal(get_decimal_val(context, NULL)));
break;
}
case TYPE_DECIMALV2: {
_constant_val.reset(new DecimalV2Val(get_decimalv2_val(context, NULL)));
break;
@ -805,12 +792,6 @@ DateTimeVal Expr::get_datetime_val(ExprContext* context, TupleRow* row) {
return val;
}
DecimalVal Expr::get_decimal_val(ExprContext* context, TupleRow* row) {
DecimalVal val;
// ((DecimalValue*)get_value(row))->to_decimal_val(&val);
return val;
}
DecimalV2Val Expr::get_decimalv2_val(ExprContext* context, TupleRow* row) {
DecimalV2Val val;
return val;