[to 49511006] fix select complex type value core
This commit is contained in:
parent
b8ce00f94c
commit
8dc9ed868a
@ -2052,8 +2052,7 @@ int ObSelectResolver::resolve_field_list(const ParseNode &node)
|
||||
}
|
||||
} else if (is_oracle_mode()
|
||||
&& T_QUESTIONMARK == sel_expr->get_expr_type()
|
||||
&& T_OBJ_ACCESS_REF == project_node->type_
|
||||
&& T_IDENT == project_node->children_[0]->type_) {
|
||||
&& is_colum_without_alias(project_node)) {
|
||||
while (OB_SUCC(ret) && NULL != project_node->children_[1]) {
|
||||
project_node = project_node->children_[1];
|
||||
}
|
||||
@ -2198,6 +2197,21 @@ int ObSelectResolver::resolve_field_list(const ParseNode &node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline bool ObSelectResolver::is_colum_without_alias(ParseNode *project_node) {
|
||||
bool bret = OB_NOT_NULL(project_node);
|
||||
ParseNode *cur_node = project_node;
|
||||
while (bret && OB_NOT_NULL(cur_node)) {
|
||||
if (T_OBJ_ACCESS_REF != cur_node->type_
|
||||
|| OB_ISNULL(cur_node->children_[0])
|
||||
|| T_IDENT != cur_node->children_[0]->type_) {
|
||||
bret = false;
|
||||
} else {
|
||||
cur_node = cur_node->children_[1];
|
||||
}
|
||||
}
|
||||
return bret;
|
||||
}
|
||||
|
||||
int ObSelectResolver::expand_target_list(
|
||||
const TableItem &table_item, ObIArray<SelectItem> &target_list)
|
||||
{
|
||||
|
@ -129,6 +129,7 @@ protected:
|
||||
int add_parent_cte_table_item(TableItem *table_item);
|
||||
int resolve_from_clause(const ParseNode *node);
|
||||
int resolve_field_list(const ParseNode &node);
|
||||
inline bool is_colum_without_alias(ParseNode *project_node);
|
||||
int resolve_star(const ParseNode *node);
|
||||
int resolve_group_clause(const ParseNode *node);
|
||||
int resolve_groupby_node(const ParseNode *group_node,
|
||||
|
Loading…
x
Reference in New Issue
Block a user