[multivalue index place holder]:add index type and multivalue column flag, ob table param add member
This commit is contained in:
@ -127,6 +127,8 @@ static const uint64_t OB_MIN_ID = 0;//used for lower_bound
|
|||||||
#define GENERATED_COLUMN_UDF_EXPR (INT64_C(1) << 20)
|
#define GENERATED_COLUMN_UDF_EXPR (INT64_C(1) << 20)
|
||||||
#define UNUSED_COLUMN_FLAG (INT64_C(1) << 21) // check if the column is unused.
|
#define UNUSED_COLUMN_FLAG (INT64_C(1) << 21) // check if the column is unused.
|
||||||
#define GENERATED_DOC_ID_COLUMN_FLAG (INT64_C(1) << 22)
|
#define GENERATED_DOC_ID_COLUMN_FLAG (INT64_C(1) << 22)
|
||||||
|
#define MULTIVALUE_INDEX_GENERATED_COLUMN_FLAG (INT64_C(1) << 23) // for multivalue index
|
||||||
|
#define MULTIVALUE_INDEX_GENERATED_ARRAY_COLUMN_FLAG (INT64_C(1) << 24) // for multivalue index
|
||||||
|
|
||||||
//the high 32-bit flag isn't stored in __all_column
|
//the high 32-bit flag isn't stored in __all_column
|
||||||
#define GENERATED_DEPS_CASCADE_FLAG (INT64_C(1) << 32)
|
#define GENERATED_DEPS_CASCADE_FLAG (INT64_C(1) << 32)
|
||||||
@ -317,11 +319,15 @@ enum ObIndexType
|
|||||||
INDEX_TYPE_FTS_DOC_ROWKEY_GLOBAL_LOCAL_STORAGE = 20,
|
INDEX_TYPE_FTS_DOC_ROWKEY_GLOBAL_LOCAL_STORAGE = 20,
|
||||||
INDEX_TYPE_FTS_INDEX_GLOBAL_LOCAL_STORAGE = 21,
|
INDEX_TYPE_FTS_INDEX_GLOBAL_LOCAL_STORAGE = 21,
|
||||||
INDEX_TYPE_FTS_DOC_WORD_GLOBAL_LOCAL_STORAGE = 22,
|
INDEX_TYPE_FTS_DOC_WORD_GLOBAL_LOCAL_STORAGE = 22,
|
||||||
|
|
||||||
|
// new index types for multivalue index
|
||||||
|
INDEX_TYPE_NORMAL_MULTIVALUE_LOCAL = 23,
|
||||||
|
INDEX_TYPE_UNIQUE_MULTIVALUE_LOCAL = 24,
|
||||||
/*
|
/*
|
||||||
* Attention!!! when add new index type,
|
* Attention!!! when add new index type,
|
||||||
* need update func ObSimpleTableSchemaV2::should_not_validate_data_index_ckm()
|
* need update func ObSimpleTableSchemaV2::should_not_validate_data_index_ckm()
|
||||||
*/
|
*/
|
||||||
INDEX_TYPE_MAX = 23,
|
INDEX_TYPE_MAX = 25,
|
||||||
};
|
};
|
||||||
|
|
||||||
// using type for index
|
// using type for index
|
||||||
|
|||||||
@ -42,7 +42,10 @@ ObTableSchemaParam::ObTableSchemaParam(ObIAllocator &allocator)
|
|||||||
read_param_version_(0),
|
read_param_version_(0),
|
||||||
read_info_(),
|
read_info_(),
|
||||||
cg_read_infos_(),
|
cg_read_infos_(),
|
||||||
lob_inrow_threshold_(OB_DEFAULT_LOB_INROW_THRESHOLD)
|
lob_inrow_threshold_(OB_DEFAULT_LOB_INROW_THRESHOLD),
|
||||||
|
multivalue_col_id_(OB_INVALID_ID),
|
||||||
|
multivalue_arr_col_id_(OB_INVALID_ID),
|
||||||
|
data_table_rowkey_column_num_(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,6 +74,9 @@ void ObTableSchemaParam::reset()
|
|||||||
cg_read_infos_.reset();
|
cg_read_infos_.reset();
|
||||||
read_param_version_ = 0;
|
read_param_version_ = 0;
|
||||||
lob_inrow_threshold_ = OB_DEFAULT_LOB_INROW_THRESHOLD;
|
lob_inrow_threshold_ = OB_DEFAULT_LOB_INROW_THRESHOLD;
|
||||||
|
multivalue_col_id_ = OB_INVALID_ID;
|
||||||
|
multivalue_arr_col_id_ = OB_INVALID_ID;
|
||||||
|
data_table_rowkey_column_num_ =0 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ObTableSchemaParam::convert(const ObTableSchema *schema)
|
int ObTableSchemaParam::convert(const ObTableSchema *schema)
|
||||||
@ -446,6 +452,9 @@ OB_DEF_SERIALIZE(ObTableSchemaParam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
OB_UNIS_ENCODE(multivalue_col_id_);
|
||||||
|
OB_UNIS_ENCODE(multivalue_arr_col_id_);
|
||||||
|
OB_UNIS_ENCODE(data_table_rowkey_column_num_);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -527,6 +536,10 @@ OB_DEF_DESERIALIZE(ObTableSchemaParam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OB_UNIS_DECODE(multivalue_col_id_);
|
||||||
|
OB_UNIS_DECODE(multivalue_arr_col_id_);
|
||||||
|
OB_UNIS_DECODE(data_table_rowkey_column_num_);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -568,6 +581,10 @@ OB_DEF_SERIALIZE_SIZE(ObTableSchemaParam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OB_UNIS_ADD_LEN(multivalue_col_id_);
|
||||||
|
OB_UNIS_ADD_LEN(multivalue_arr_col_id_);
|
||||||
|
OB_UNIS_ADD_LEN(data_table_rowkey_column_num_);
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -114,6 +114,9 @@ private:
|
|||||||
storage::ObTableReadInfo read_info_;
|
storage::ObTableReadInfo read_info_;
|
||||||
storage::ObFixedMetaObjArray<storage::ObTableReadInfo *> cg_read_infos_;
|
storage::ObFixedMetaObjArray<storage::ObTableReadInfo *> cg_read_infos_;
|
||||||
int64_t lob_inrow_threshold_;
|
int64_t lob_inrow_threshold_;
|
||||||
|
uint64_t multivalue_col_id_;
|
||||||
|
uint64_t multivalue_arr_col_id_;
|
||||||
|
int64_t data_table_rowkey_column_num_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ObTableDMLParam
|
class ObTableDMLParam
|
||||||
|
|||||||
@ -625,7 +625,8 @@ ObTableParam::ObTableParam(ObIAllocator &allocator)
|
|||||||
parser_name_(),
|
parser_name_(),
|
||||||
enable_lob_locator_v2_(false),
|
enable_lob_locator_v2_(false),
|
||||||
is_spatial_index_(false),
|
is_spatial_index_(false),
|
||||||
is_fts_index_(false)
|
is_fts_index_(false),
|
||||||
|
is_multivalue_index_(false)
|
||||||
{
|
{
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
@ -653,6 +654,7 @@ void ObTableParam::reset()
|
|||||||
enable_lob_locator_v2_ = false;
|
enable_lob_locator_v2_ = false;
|
||||||
is_spatial_index_ = false;
|
is_spatial_index_ = false;
|
||||||
is_fts_index_ = false;
|
is_fts_index_ = false;
|
||||||
|
is_multivalue_index_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
OB_DEF_SERIALIZE(ObTableParam)
|
OB_DEF_SERIALIZE(ObTableParam)
|
||||||
@ -688,6 +690,9 @@ OB_DEF_SERIALIZE(ObTableParam)
|
|||||||
if (OB_SUCC(ret) && is_fts_index_) {
|
if (OB_SUCC(ret) && is_fts_index_) {
|
||||||
OB_UNIS_ENCODE(parser_name_);
|
OB_UNIS_ENCODE(parser_name_);
|
||||||
}
|
}
|
||||||
|
if (OB_SUCC(ret)) {
|
||||||
|
OB_UNIS_ENCODE(is_multivalue_index_);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -767,6 +772,11 @@ OB_DEF_DESERIALIZE(ObTableParam)
|
|||||||
LOG_WARN("Fail to ccopy parser name ", K(ret), K_(parser_name), K(tmp_parser_name));
|
LOG_WARN("Fail to ccopy parser name ", K(ret), K_(parser_name), K(tmp_parser_name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (OB_SUCC(ret)) {
|
||||||
|
LST_DO_CODE(OB_UNIS_DECODE,
|
||||||
|
is_multivalue_index_);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -802,6 +812,11 @@ OB_DEF_SERIALIZE_SIZE(ObTableParam)
|
|||||||
if (OB_SUCC(ret) && is_fts_index_) {
|
if (OB_SUCC(ret) && is_fts_index_) {
|
||||||
OB_UNIS_ADD_LEN(parser_name_);
|
OB_UNIS_ADD_LEN(parser_name_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (OB_SUCC(ret)) {
|
||||||
|
LST_DO_CODE(OB_UNIS_ADD_LEN,
|
||||||
|
is_multivalue_index_);
|
||||||
|
}
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -397,6 +397,7 @@ private:
|
|||||||
bool enable_lob_locator_v2_;
|
bool enable_lob_locator_v2_;
|
||||||
bool is_spatial_index_;
|
bool is_spatial_index_;
|
||||||
bool is_fts_index_;
|
bool is_fts_index_;
|
||||||
|
bool is_multivalue_index_;
|
||||||
};
|
};
|
||||||
} //namespace schema
|
} //namespace schema
|
||||||
} //namespace share
|
} //namespace share
|
||||||
|
|||||||
@ -110,7 +110,10 @@ public:
|
|||||||
enum INDEX_KEYNAME {
|
enum INDEX_KEYNAME {
|
||||||
NORMAL_KEY = 0,
|
NORMAL_KEY = 0,
|
||||||
UNIQUE_KEY = 1,
|
UNIQUE_KEY = 1,
|
||||||
SPATIAL_KEY = 2
|
SPATIAL_KEY = 2,
|
||||||
|
FTS_KEY = 3,
|
||||||
|
MULTI_KEY = 4,
|
||||||
|
MULTI_UNIQUE_KEY = 5
|
||||||
};
|
};
|
||||||
enum COLUMN_NODE {
|
enum COLUMN_NODE {
|
||||||
COLUMN_REF_NODE = 0,
|
COLUMN_REF_NODE = 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user