Support TIME type and timediff function (#1505)

This commit is contained in:
HangyuanLiu
2019-07-23 13:42:40 +08:00
committed by ZHAO Chun
parent 221cd2e103
commit 4aedaea84e
37 changed files with 318 additions and 20 deletions

View File

@ -137,6 +137,7 @@ Expr::Expr(const TypeDescriptor& type) :
case TYPE_FLOAT:
case TYPE_DOUBLE:
case TYPE_TIME:
_node_type = (TExprNodeType::FLOAT_LITERAL);
break;
@ -195,6 +196,7 @@ Expr::Expr(const TypeDescriptor& type, bool is_slotref) :
case TYPE_FLOAT:
case TYPE_DOUBLE:
case TYPE_TIME:
_node_type = (TExprNodeType::FLOAT_LITERAL);
break;
@ -743,7 +745,8 @@ doris_udf::AnyVal* Expr::get_const_val(ExprContext* context) {
_constant_val.reset(new FloatVal(get_float_val(context, NULL)));
break;
}
case TYPE_DOUBLE: {
case TYPE_DOUBLE:
case TYPE_TIME: {
_constant_val.reset(new DoubleVal(get_double_val(context, NULL)));
break;
}