提交 cdb3f877 编写于 作者: O obdev 提交者: wangzelin.wzl

[CP] [CP] Add useful log info to help debug when cast string to number

上级 e4997016
......@@ -4084,7 +4084,9 @@ static int string_number(
}
}
if (CAST_FAIL(ret)) {
LOG_WARN("string_number failed", K(ret), K(in), K(expect_type), K(cast_mode));
} else if (ObUNumberType == expect_type && CAST_FAIL(numeric_negative_check(value))) {
LOG_WARN("numeric_negative_check failed", K(ret), K(in), K(cast_mode));
} else {
out.set_number(expect_type, value);
}
......
......@@ -896,10 +896,11 @@ static OB_INLINE int common_string_number(
}
}
const ObCastMode cast_mode = expr.extra_;
if (CAST_FAIL(ret)) {
LOG_WARN("string_number failed", K(ret));
LOG_WARN("string_number failed", K(ret), K(in_type), K(out_type), K(cast_mode), K(in_str));
} else if (ObUNumberType == out_type && CAST_FAIL(numeric_negative_check(nmb))) {
LOG_WARN("numeric_negative_check failed", K(ret));
LOG_WARN("numeric_negative_check failed", K(ret), K(in_type), K(cast_mode), K(in_str));
}
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册