fix to_type() bug
This commit is contained in:
@ -76,13 +76,9 @@ int ObExprToNumberBase::calc_result_typeN(ObExprResType &type,
|
||||
if (param_num == 3) {
|
||||
types[2].set_calc_type_default_varchar();
|
||||
}
|
||||
if (types[0].is_null()) {
|
||||
type.set_null();
|
||||
} else {
|
||||
type.set_type(ObNumberType);
|
||||
type.set_scale(ORA_NUMBER_SCALE_UNKNOWN_YET);
|
||||
type.set_precision(PRECISION_UNKNOWN_YET);
|
||||
}
|
||||
type.set_type(ObNumberType);
|
||||
type.set_scale(ORA_NUMBER_SCALE_UNKNOWN_YET);
|
||||
type.set_precision(PRECISION_UNKNOWN_YET);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
@ -339,11 +335,7 @@ int ObExprToBinaryFloat::calc_result_typeN(ObExprResType &type,
|
||||
LOG_WARN("input type can not cast to binary_float", K(types[0].get_type()), K(ret));
|
||||
} else {
|
||||
types[0].set_calc_type(ObFloatType);
|
||||
if (types[0].is_null()) {
|
||||
type.set_null();
|
||||
} else {
|
||||
type.set_type(ObFloatType);
|
||||
}
|
||||
type.set_type(ObFloatType);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -416,11 +408,7 @@ int ObExprToBinaryDouble::calc_result_typeN(ObExprResType &type,
|
||||
LOG_WARN("input type can not cast to binary_double", K(types[0].get_type()), K(ret));
|
||||
} else {
|
||||
types[0].set_calc_type(ObDoubleType);
|
||||
if (types[0].is_null()) {
|
||||
type.set_null();
|
||||
} else {
|
||||
type.set_type(ObDoubleType);
|
||||
}
|
||||
type.set_type(ObDoubleType);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -244,10 +244,6 @@ int ObExprToTemporalBase::calc_result_typeN(ObExprResType &type,
|
||||
//result type
|
||||
if (OB_SUCC(ret)) {
|
||||
type.set_type(get_my_target_obj_type());
|
||||
if (ObDateTimeType == get_my_target_obj_type() && input_char.is_null()) {
|
||||
//set to_date(null) to null type
|
||||
type.set_null();
|
||||
}
|
||||
}
|
||||
//result scale
|
||||
if (OB_SUCC(ret)) {
|
||||
|
Reference in New Issue
Block a user