fix typos
This commit is contained in:
@ -269,7 +269,7 @@ int ObLoadDataResolver::resolve(const ParseNode &parse_tree)
|
|||||||
} else {
|
} else {
|
||||||
load_args.combined_name_.assign_ptr(buf, pos);
|
load_args.combined_name_.assign_ptr(buf, pos);
|
||||||
}
|
}
|
||||||
LOG_DEBUG("resovle table info result", K(tenant_id), K(database_name), K(table_name));
|
LOG_DEBUG("resolve table info result", K(tenant_id), K(database_name), K(table_name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -907,7 +907,7 @@ int ObLoadDataResolver::resolve_column_ref_expr(ObIArray<ObQualifiedName> &colum
|
|||||||
* This function examines subqueries in set clause recursively,
|
* This function examines subqueries in set clause recursively,
|
||||||
* and ensures that no subquery read data from the loaded table.
|
* and ensures that no subquery read data from the loaded table.
|
||||||
*
|
*
|
||||||
* Call deepth has already examined in subquery resolving phase,
|
* Call depth has already examined in subquery resolving phase,
|
||||||
* don't need to do it again
|
* don't need to do it again
|
||||||
*/
|
*/
|
||||||
int recursively_check_subquery_tables(ObSelectStmt *subquery_stmt, uint64_t loaded_table_id)
|
int recursively_check_subquery_tables(ObSelectStmt *subquery_stmt, uint64_t loaded_table_id)
|
||||||
@ -1180,7 +1180,7 @@ int ObLoadDataResolver::check_if_table_exists(uint64_t tenant_id,
|
|||||||
LOG_WARN("fail to check table or index exist", K(tenant_id), K(database_id),
|
LOG_WARN("fail to check table or index exist", K(tenant_id), K(database_id),
|
||||||
K(table_name), K(ret));
|
K(table_name), K(ret));
|
||||||
} else if (!is_table_exist) {
|
} else if (!is_table_exist) {
|
||||||
//a alias table is impossiable
|
//a alias table is impossible
|
||||||
//TODO wjh: support synonym tables, return not exist for now
|
//TODO wjh: support synonym tables, return not exist for now
|
||||||
//see ObDMLResolver::resolve_table_relation_recursively
|
//see ObDMLResolver::resolve_table_relation_recursively
|
||||||
ret = OB_TABLE_NOT_EXIST;
|
ret = OB_TABLE_NOT_EXIST;
|
||||||
@ -1192,7 +1192,7 @@ int ObLoadDataResolver::check_if_table_exists(uint64_t tenant_id,
|
|||||||
cte_table_fisrt,
|
cte_table_fisrt,
|
||||||
is_hidden,
|
is_hidden,
|
||||||
tschema))) {
|
tschema))) {
|
||||||
//it's possiable to get "table not exist" ret here
|
//it's possible to get "table not exist" ret here
|
||||||
LOG_WARN("get table schema failed", K(ret));
|
LOG_WARN("get table schema failed", K(ret));
|
||||||
} else {
|
} else {
|
||||||
table_id = tschema->get_table_id();
|
table_id = tschema->get_table_id();
|
||||||
|
|||||||
@ -95,7 +95,7 @@ int ObCreateTableResolver::add_primary_key_part(const ObString &column_name,
|
|||||||
} else if (static_cast<int64_t>(table_id_) > 0
|
} else if (static_cast<int64_t>(table_id_) > 0
|
||||||
&& OB_FAIL(ObCompatModeGetter::check_is_oracle_mode_with_table_id(
|
&& OB_FAIL(ObCompatModeGetter::check_is_oracle_mode_with_table_id(
|
||||||
session_info_->get_effective_tenant_id(), table_id_, is_oracle_mode))) {
|
session_info_->get_effective_tenant_id(), table_id_, is_oracle_mode))) {
|
||||||
LOG_WARN("fail to check oralce mode", KR(ret), K_(table_id));
|
LOG_WARN("fail to check oracle mode", KR(ret), K_(table_id));
|
||||||
} else {
|
} else {
|
||||||
ObColumnSchemaV2 *col = NULL;
|
ObColumnSchemaV2 *col = NULL;
|
||||||
ObTableSchema &table_schema = create_table_stmt->get_create_table_arg().schema_;
|
ObTableSchema &table_schema = create_table_stmt->get_create_table_arg().schema_;
|
||||||
@ -767,7 +767,7 @@ int ObCreateTableResolver::resolve(const ParseNode &parse_tree)
|
|||||||
// Oracle 官方文档关于 references 权限的描述非常少。
|
// Oracle 官方文档关于 references 权限的描述非常少。
|
||||||
// 文档中比较重要的一条是“references 权限不能被授予给角色”,
|
// 文档中比较重要的一条是“references 权限不能被授予给角色”,
|
||||||
// 再加上测试的结果,所以我们推测references权限进行检查时,
|
// 再加上测试的结果,所以我们推测references权限进行检查时,
|
||||||
// 检查的不是当前用户是否具有refernces权限,而是去检查子表所在的schema有没有references的权限。
|
// 检查的不是当前用户是否具有references权限,而是去检查子表所在的schema有没有references的权限。
|
||||||
// 所以现在的逻辑是
|
// 所以现在的逻辑是
|
||||||
// 1. 当子表和父表相同时,无需检查
|
// 1. 当子表和父表相同时,无需检查
|
||||||
// 2. 当子表和父表同属一个schema时,也无需检查,这一点已经在oracle上验证了。
|
// 2. 当子表和父表同属一个schema时,也无需检查,这一点已经在oracle上验证了。
|
||||||
@ -963,7 +963,7 @@ int ObCreateTableResolver::resolve_partition_option(
|
|||||||
}
|
}
|
||||||
if (OB_SUCC(ret) && (OB_NOT_NULL(node) || is_oracle_temp_table_)) {
|
if (OB_SUCC(ret) && (OB_NOT_NULL(node) || is_oracle_temp_table_)) {
|
||||||
if (OB_FAIL(check_generated_partition_column(table_schema))) {
|
if (OB_FAIL(check_generated_partition_column(table_schema))) {
|
||||||
LOG_WARN("Failed to check generate partiton column", K(ret));
|
LOG_WARN("Failed to check generate partition column", K(ret));
|
||||||
} else if (OB_FAIL(table_schema.check_primary_key_cover_partition_column())) {
|
} else if (OB_FAIL(table_schema.check_primary_key_cover_partition_column())) {
|
||||||
SQL_RESV_LOG(WARN, "fail to check primary key cover partition column", K(ret));
|
SQL_RESV_LOG(WARN, "fail to check primary key cover partition column", K(ret));
|
||||||
} else if (OB_FAIL(table_schema.check_auto_partition_valid())) {
|
} else if (OB_FAIL(table_schema.check_auto_partition_valid())) {
|
||||||
@ -1202,7 +1202,7 @@ int ObCreateTableResolver::resolve_table_elements(const ParseNode *node,
|
|||||||
} else if (static_cast<int64_t>(table_id_) > 0
|
} else if (static_cast<int64_t>(table_id_) > 0
|
||||||
&& OB_FAIL(ObCompatModeGetter::check_is_oracle_mode_with_table_id(
|
&& OB_FAIL(ObCompatModeGetter::check_is_oracle_mode_with_table_id(
|
||||||
session_info_->get_effective_tenant_id(), table_id_, is_oracle_mode))) {
|
session_info_->get_effective_tenant_id(), table_id_, is_oracle_mode))) {
|
||||||
LOG_WARN("fail to check oralce mode", KR(ret), K_(table_id));
|
LOG_WARN("fail to check oracle mode", KR(ret), K_(table_id));
|
||||||
} else {
|
} else {
|
||||||
ObSEArray<ObString, 4> gen_col_expr_arr;
|
ObSEArray<ObString, 4> gen_col_expr_arr;
|
||||||
ParseNode *primary_node = NULL;
|
ParseNode *primary_node = NULL;
|
||||||
@ -1215,7 +1215,7 @@ int ObCreateTableResolver::resolve_table_elements(const ParseNode *node,
|
|||||||
table_schema.set_tenant_id(tenant_id);
|
table_schema.set_tenant_id(tenant_id);
|
||||||
bool has_visible_col = false;
|
bool has_visible_col = false;
|
||||||
// 将经过 resolve_column_definition 后的 column schema 存放在 resolved_cols 中
|
// 将经过 resolve_column_definition 后的 column schema 存放在 resolved_cols 中
|
||||||
// 为了支持生成列按照任意顺序定义,在生成全部 column_schema 之后,再按照统一存放到 table_schma 中
|
// 为了支持生成列按照任意顺序定义,在生成全部 column_schema 之后,再按照统一存放到 table_schema 中
|
||||||
ObSEArray<ObColumnSchemaV2, SEARRAY_INIT_NUM> resolved_cols;
|
ObSEArray<ObColumnSchemaV2, SEARRAY_INIT_NUM> resolved_cols;
|
||||||
//列需要根据租户id区分大小写,这里先把租户id设置进table_schema
|
//列需要根据租户id区分大小写,这里先把租户id设置进table_schema
|
||||||
if (RESOLVE_NON_COL != resolve_rule) {
|
if (RESOLVE_NON_COL != resolve_rule) {
|
||||||
@ -1674,7 +1674,7 @@ int ObCreateTableResolver::set_nullable_for_cta_column(ObSelectStmt *select_stmt
|
|||||||
column.set_nullable(!is_not_null);
|
column.set_nullable(!is_not_null);
|
||||||
}
|
}
|
||||||
} else { //mysql mode
|
} else { //mysql mode
|
||||||
if (expr->is_win_func_expr()) {//compatiable with mysql
|
if (expr->is_win_func_expr()) {//compatible with mysql
|
||||||
const ObWinFunRawExpr *win_expr = reinterpret_cast<const ObWinFunRawExpr*>(expr);
|
const ObWinFunRawExpr *win_expr = reinterpret_cast<const ObWinFunRawExpr*>(expr);
|
||||||
if (T_WIN_FUN_RANK == win_expr->get_func_type() ||
|
if (T_WIN_FUN_RANK == win_expr->get_func_type() ||
|
||||||
T_WIN_FUN_DENSE_RANK == win_expr->get_func_type() ||
|
T_WIN_FUN_DENSE_RANK == win_expr->get_func_type() ||
|
||||||
@ -2508,7 +2508,7 @@ int ObCreateTableResolver::resolve_index_node(const ParseNode *node)
|
|||||||
} else if (static_cast<int64_t>(table_id_) > 0
|
} else if (static_cast<int64_t>(table_id_) > 0
|
||||||
&& OB_FAIL(ObCompatModeGetter::check_is_oracle_mode_with_table_id(
|
&& OB_FAIL(ObCompatModeGetter::check_is_oracle_mode_with_table_id(
|
||||||
session_info_->get_effective_tenant_id(), table_id_, is_oracle_mode))) {
|
session_info_->get_effective_tenant_id(), table_id_, is_oracle_mode))) {
|
||||||
LOG_WARN("fail to check oralce mode", KR(ret), K_(table_id));
|
LOG_WARN("fail to check oracle mode", KR(ret), K_(table_id));
|
||||||
} else {
|
} else {
|
||||||
index_arg_.reset();
|
index_arg_.reset();
|
||||||
ObColumnSortItem sort_item;
|
ObColumnSortItem sort_item;
|
||||||
|
|||||||
@ -107,7 +107,7 @@ private:
|
|||||||
const ParseNode* node, ObArray<int> &constraint_position_list);
|
const ParseNode* node, ObArray<int> &constraint_position_list);
|
||||||
int build_partition_key_info(share::schema::ObTableSchema &table_schema,
|
int build_partition_key_info(share::schema::ObTableSchema &table_schema,
|
||||||
const bool is_subpart);
|
const bool is_subpart);
|
||||||
//resolve partitoin option only used in ObCreateTableResolver now.
|
//resolve partition option only used in ObCreateTableResolver now.
|
||||||
int resolve_partition_option(ParseNode *node,
|
int resolve_partition_option(ParseNode *node,
|
||||||
share::schema::ObTableSchema &table_schema,
|
share::schema::ObTableSchema &table_schema,
|
||||||
const bool is_partition_option_node_with_opt);
|
const bool is_partition_option_node_with_opt);
|
||||||
@ -122,7 +122,7 @@ private:
|
|||||||
int add_new_indexkey_for_oracle_temp_table(const int32_t org_key_len);
|
int add_new_indexkey_for_oracle_temp_table(const int32_t org_key_len);
|
||||||
int add_pk_key_for_oracle_temp_table(ObArray<ObColumnResolveStat> &stats, int64_t &pk_data_length);
|
int add_pk_key_for_oracle_temp_table(ObArray<ObColumnResolveStat> &stats, int64_t &pk_data_length);
|
||||||
int set_partition_info_for_oracle_temp_table(share::schema::ObTableSchema &table_schema);
|
int set_partition_info_for_oracle_temp_table(share::schema::ObTableSchema &table_schema);
|
||||||
// following four functions should be used only in oralce mode
|
// following four functions should be used only in oracle mode
|
||||||
int generate_primary_key_name_array(const share::schema::ObTableSchema &table_schema, ObIArray<ObString> &pk_columns_name);
|
int generate_primary_key_name_array(const share::schema::ObTableSchema &table_schema, ObIArray<ObString> &pk_columns_name);
|
||||||
int generate_uk_idx_array(const ObIArray<obrpc::ObCreateIndexArg> &index_arg_list, ObIArray<int64_t> &uk_idx_in_index_arg_list);
|
int generate_uk_idx_array(const ObIArray<obrpc::ObCreateIndexArg> &index_arg_list, ObIArray<int64_t> &uk_idx_in_index_arg_list);
|
||||||
bool is_pk_uk_duplicate(const ObIArray<ObString> &pk_columns_name, const ObIArray<obrpc::ObCreateIndexArg> &index_arg_list, const ObIArray<int64_t> &uk_idx);
|
bool is_pk_uk_duplicate(const ObIArray<ObString> &pk_columns_name, const ObIArray<obrpc::ObCreateIndexArg> &index_arg_list, const ObIArray<int64_t> &uk_idx);
|
||||||
|
|||||||
Reference in New Issue
Block a user