From 49c40639301ddaa03e355a208a8dc3bfdf1a6f99 Mon Sep 17 00:00:00 2001 From: obdev Date: Fri, 9 Feb 2024 12:23:00 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=86=E5=9B=BE=E7=9A=84nu?= =?UTF-8?q?llable=E6=95=B0=E5=80=BC=E4=B8=8D=E4=B8=80=E8=87=B4=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/observer/virtual_table/ob_information_columns_table.cpp | 4 +--- src/sql/resolver/ddl/ob_create_view_resolver.cpp | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/observer/virtual_table/ob_information_columns_table.cpp b/src/observer/virtual_table/ob_information_columns_table.cpp index 9a39b1bc77..902f72ab15 100644 --- a/src/observer/virtual_table/ob_information_columns_table.cpp +++ b/src/observer/virtual_table/ob_information_columns_table.cpp @@ -1061,9 +1061,7 @@ int ObInfoSchemaColumnsTable::fill_row_cells(const common::ObString &database_na break; } case IS_NULLABLE: { - ObString nullable_val = ObString::make_string( - column_attributes.null_ ? "YES" : "NO"); - cells[cell_idx].set_varchar(nullable_val); + cells[cell_idx].set_varchar(column_attributes.null_); cells[cell_idx].set_collation_type(ObCharset::get_default_collation( ObCharset::get_default_charset())); break; diff --git a/src/sql/resolver/ddl/ob_create_view_resolver.cpp b/src/sql/resolver/ddl/ob_create_view_resolver.cpp index 8df032f567..00c14bee72 100644 --- a/src/sql/resolver/ddl/ob_create_view_resolver.cpp +++ b/src/sql/resolver/ddl/ob_create_view_resolver.cpp @@ -1280,6 +1280,7 @@ int ObCreateViewResolver::fill_column_meta_infos(const ObRawExpr &expr, column.set_collation_type(expr.get_collation_type()); column.set_accuracy(expr.get_accuracy()); column.set_zero_fill(expr.get_result_type().has_result_flag(ZEROFILL_FLAG)); + column.set_nullable(expr.get_result_type().is_not_null_for_read() ? false : true); if (OB_FAIL(ret)) { } else if (column.is_enum_or_set() && OB_FAIL(column.set_extended_type_info(expr.get_enum_set_values()))) { LOG_WARN("set enum or set info failed", K(ret), K(expr));