Fix zerofill double calc hash inconsistent

This commit is contained in:
hezuojiao
2023-02-13 03:14:55 +00:00
committed by ob-robot
parent 735665f131
commit 51a269bf73

View File

@ -743,7 +743,10 @@ int ObExprCast::cg_expr(ObExprCGCtx &op_cg_ctx,
if (OB_UNLIKELY(UINT_MAX8 < src_res_type.get_length())) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("unexpected zerofill length", K(ret), K(src_res_type.get_length()));
} else {
} else if (ob_is_string_or_lob_type(out_type)) {
// The zerofill information will only be used when cast to string/lob type.
// for these types, scale is unused, so the previous design is to save child length
// to the scale of the rt_expr.
rt_expr.datum_meta_.scale_ = static_cast<int8_t>(src_res_type.get_length());
}
}