support json type

This commit is contained in:
xj0
2022-02-08 14:58:13 +08:00
committed by LINxiansheng
parent 4b25bac8d0
commit e5f59ea074
241 changed files with 46116 additions and 749 deletions

View File

@ -482,7 +482,8 @@ int ObInfoSchemaColumnsTable::fill_row_cells(const ObString &database_name, cons
break;
}
case CHARACTER_MAXIMUM_LENGTH: {
if (ob_is_string_type(column_schema->get_data_type())) {
if (ob_is_string_type(column_schema->get_data_type())
|| ob_is_json(column_schema->get_data_type())) {
cells[cell_idx].set_uint64(static_cast<uint64_t>(column_schema->get_data_length()));
} else {
cells[cell_idx].reset();
@ -498,7 +499,8 @@ int ObInfoSchemaColumnsTable::fill_row_cells(const ObString &database_name, cons
} else {
cells[cell_idx].set_uint64(static_cast<uint64_t>(mbmaxlen * column_schema->get_data_length()));
}
} else if (ob_is_text_tc(column_schema->get_data_type())) {
} else if (ob_is_text_tc(column_schema->get_data_type())
|| ob_is_json(column_schema->get_data_type())) {
cells[cell_idx].set_uint64(static_cast<uint64_t>(column_schema->get_data_length()));
} else {
cells[cell_idx].reset();