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));