fix time expression with invalid parameter bug
This commit is contained in:
@ -40,7 +40,7 @@ int ObExprTime::calc_result_type1(ObExprResType& type, ObExprResType& type1, ObE
|
||||
int16_t scale1 = MIN(type1.get_scale(), MAX_SCALE_FOR_TEMPORAL);
|
||||
int16_t scale = (SCALE_UNKNOWN_YET == scale1) ? MAX_SCALE_FOR_TEMPORAL : scale1;
|
||||
type.set_scale(scale);
|
||||
UNUSED(type_ctx);
|
||||
type_ctx.set_cast_mode(type_ctx.get_cast_mode() | CM_NULL_ON_WARN);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@ -24,6 +24,10 @@ public:
|
||||
virtual int calc_result_type1(ObExprResType& type, ObExprResType& type1, common::ObExprTypeCtx& type_ctx) const;
|
||||
virtual int calc_result1(common::ObObj& result, const common::ObObj& time, common::ObExprCtx& expr_ctx) const;
|
||||
virtual int cg_expr(ObExprCGCtx& op_cg_ctx, const ObRawExpr& raw_expr, ObExpr& rt_expr) const override;
|
||||
virtual common::ObCastMode get_cast_mode() const override
|
||||
{
|
||||
return CM_NULL_ON_WARN;
|
||||
}
|
||||
static int calc_time(const ObExpr& expr, ObEvalCtx& ctx, ObDatum& expr_datum);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user