[CP] Fix wrong merge type between set and char
Co-authored-by: Larry955 <1412857955@qq.com>
This commit is contained in:
@ -1299,7 +1299,7 @@ static ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = {
|
|||||||
ObLongTextType, /* CharType=>ObLongTextType */
|
ObLongTextType, /* CharType=>ObLongTextType */
|
||||||
ObVarcharType, /* CharType=>ObBitType */
|
ObVarcharType, /* CharType=>ObBitType */
|
||||||
ObVarcharType, /* CharType=>ObEnumType */
|
ObVarcharType, /* CharType=>ObEnumType */
|
||||||
ObCharType, /* CharType=>ObSetType */
|
ObVarcharType, /* CharType=>ObSetType */
|
||||||
ObMaxType, /* CharType=>ObEnumInnerType */
|
ObMaxType, /* CharType=>ObEnumInnerType */
|
||||||
ObMaxType, /* CharType=>ObSetInnerType */
|
ObMaxType, /* CharType=>ObSetInnerType */
|
||||||
ObCharType, /*CharType=>ObTimestampTZType */
|
ObCharType, /*CharType=>ObTimestampTZType */
|
||||||
@ -1834,7 +1834,7 @@ static ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = {
|
|||||||
ObVarcharType, /*ObSetType=>TimeType */
|
ObVarcharType, /*ObSetType=>TimeType */
|
||||||
ObVarcharType, /*ObSetType=>YearType */
|
ObVarcharType, /*ObSetType=>YearType */
|
||||||
ObVarcharType, /*ObSetType=>VarcharType */
|
ObVarcharType, /*ObSetType=>VarcharType */
|
||||||
ObCharType, /*ObSetType=>CharType */
|
ObVarcharType, /*ObSetType=>CharType */
|
||||||
ObVarcharType, /*ObSetType=>HexStringType */
|
ObVarcharType, /*ObSetType=>HexStringType */
|
||||||
ObMaxType, /*ObSetType=>ExtendType */
|
ObMaxType, /*ObSetType=>ExtendType */
|
||||||
ObVarcharType, /*ObSetType=>UnknownType */
|
ObVarcharType, /*ObSetType=>UnknownType */
|
||||||
|
@ -175,7 +175,20 @@ int ObRawExprWrapEnumSet::analyze_all_expr(ObDMLStmt &stmt)
|
|||||||
LOG_WARN("get relation exprs failed", K(ret));
|
LOG_WARN("get relation exprs failed", K(ret));
|
||||||
} else if (OB_FAIL(stmt.get_child_stmts(child_stmts))) {
|
} else if (OB_FAIL(stmt.get_child_stmts(child_stmts))) {
|
||||||
LOG_WARN("get child stmt failed", K(ret));
|
LOG_WARN("get child stmt failed", K(ret));
|
||||||
} else {/*do nothing*/}
|
} else {
|
||||||
|
for (int64_t i = 0; OB_SUCC(ret) && i < stmt.get_table_size(); ++i) {
|
||||||
|
const TableItem *table_item = stmt.get_table_item(i);
|
||||||
|
if (OB_ISNULL(table_item)) {
|
||||||
|
ret = OB_ERR_UNEXPECTED;
|
||||||
|
LOG_WARN("table_item is null", K(i));
|
||||||
|
} else if (table_item->is_temp_table()) {
|
||||||
|
if (OB_FAIL(child_stmts.push_back(table_item->ref_query_))) {
|
||||||
|
LOG_WARN("store child stmt failed", K(ret));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int64_t i = 0; OB_SUCC(ret) && i < relation_exprs.count(); ++i) {
|
for (int64_t i = 0; OB_SUCC(ret) && i < relation_exprs.count(); ++i) {
|
||||||
if (OB_FAIL(analyze_expr(relation_exprs.at(i)))) {
|
if (OB_FAIL(analyze_expr(relation_exprs.at(i)))) {
|
||||||
LOG_WARN("failed to analyze expr", K(ret));
|
LOG_WARN("failed to analyze expr", K(ret));
|
||||||
@ -618,6 +631,7 @@ int ObRawExprWrapEnumSet::visit_right_expr(ObRawExpr &right_expr, int64_t row_di
|
|||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
LOG_ERROR("should not come here", K(right_expr), K(ret));
|
LOG_ERROR("should not come here", K(right_expr), K(ret));
|
||||||
}
|
}
|
||||||
|
LOG_TRACE("succeed to visit right expr", K(root_type), K(row_dimension), K(right_expr));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -777,6 +791,7 @@ bool ObRawExprWrapEnumSet::can_wrap_type_to_str(const ObRawExpr &expr) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LOG_TRACE("succeed to check can wrap type to str", K(bret), K(expr));
|
||||||
return bret;
|
return bret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user