Fix printer bugs

This commit is contained in:
xianyu-w
2023-06-22 03:42:42 +00:00
committed by ob-robot
parent 7851991b8b
commit 1858194fc4
5 changed files with 201 additions and 136 deletions

View File

@ -4033,7 +4033,7 @@ int ObRawExprPrinter::print_cast_type(ObRawExpr *expr)
if (lib::is_oracle_mode()) {
DATA_PRINTF("char(%d %s)", len, get_length_semantics_str(length_semantics));
} else {
if (len > 0) {
if (len >= 0) {
DATA_PRINTF("char(%d) charset %s", len, ObCharset::charset_name(
static_cast<ObCollationType>(collation)));
} else {