修复视图的nullable数值不一致问题

This commit is contained in:
obdev
2024-01-16 08:26:51 +00:00
committed by ob-robot
parent 767c909a8e
commit a2c8ffcdda
2 changed files with 2 additions and 3 deletions

View File

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

View File

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