提交 e1a347ac 编写于 作者: O obdev 提交者: wangzelin.wzl

fix bug for virtual table in __all_virtaul_proxy_partition_info

上级 d4a22bb0
......@@ -337,12 +337,14 @@ int ObAllVirtualProxyPartitionInfo::fill_cells(const ObTableSchema& table_schema
break;
case SPARE2: {
int64_t idx = -1;
const ObRowkeyInfo& info = table_schema.get_rowkey_info();
const ObRowkeyInfo &info = table_schema.get_rowkey_info();
if (OB_FAIL(info.get_index(column_id, idx))) {
// The generated column of the primary key table can also be used as the partition key,
// not necessarily in the rowkey info
if (OB_LIKELY(OB_ENTRY_NOT_EXIST == ret && !table_schema.is_no_pk_table() &&
column_schema->is_generated_column())) {
// In the following scenarios, the partition key does not need to be included in the primary key
// 1、The generated column of the primary key table can also be used as the partition key
// 2、virtual table
if (OB_LIKELY(OB_ENTRY_NOT_EXIST == ret &&
((!table_schema.is_no_pk_table() && column_schema->is_generated_column())
|| table_schema.is_vir_table()))) {
idx = info.get_size() + next_part_key_idx_;
ret = OB_SUCCESS;
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册