Decimal optimize branch #695 (#727)

This commit is contained in:
lide
2019-03-22 17:22:16 +08:00
committed by ZHAO Chun
parent e60b71da8c
commit c34b306b4f
114 changed files with 3236 additions and 66 deletions

View File

@ -374,6 +374,14 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) {
_result.decimal_val = DecimalValue::from_decimal_val(v);
return &_result.decimal_val;
}
case TYPE_DECIMALV2: {
DecimalV2Val v = e->get_decimalv2_val(this, row);
if (v.is_null) {
return NULL;
}
_result.decimalv2_val = DecimalV2Value::from_decimal_val(v);
return &_result.decimalv2_val;
}
#if 0
case TYPE_ARRAY:
case TYPE_MAP: {
@ -451,6 +459,10 @@ DecimalVal ExprContext::get_decimal_val(TupleRow* row) {
return _root->get_decimal_val(this, row);
}
DecimalV2Val ExprContext::get_decimalv2_val(TupleRow* row) {
return _root->get_decimalv2_val(this, row);
}
Status ExprContext::get_const_value(RuntimeState* state, Expr& expr,
AnyVal** const_val) {
DCHECK(_opened);