[xml bugfix] coalesce expr adapt xml and nvl expr adapt xml
This commit is contained in:
@ -72,6 +72,15 @@ int ObExprNvlUtil::calc_result_type(ObExprResType &type,
|
||||
type.set_result_flag(NOT_NULL_FLAG);
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret) && ob_is_user_defined_sql_type(type.get_type())) {
|
||||
if (type1.is_xml_sql_type() || type2.is_xml_sql_type()) {
|
||||
type.set_subschema_id(ObXMLSqlType);
|
||||
} else {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("unsupported udt failed", K(ret), K(type1), K(type2));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@ -699,6 +699,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObRawType, /*Raw*/
|
||||
ObIntervalYMType, /*Interval*/
|
||||
ObURowIDType, /*Rowid*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObUserDefinedSQLType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
// treat int as number, because const 1 will be parsed to bigint 1, not number 1 now.
|
||||
@ -724,6 +728,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObNumberType,/*Raw*/
|
||||
ObMaxType, /*Interval*/
|
||||
ObMaxType, /*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*uint -> XXX*/
|
||||
@ -748,6 +756,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObMaxType,/*Raw*/
|
||||
ObMaxType, /*Interval*/
|
||||
ObMaxType, /*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*float -> XXX*/
|
||||
@ -772,6 +784,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObFloatType,/*Raw*/
|
||||
ObMaxType, /*Interval*/
|
||||
ObMaxType, /*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*double -> XXX*/
|
||||
@ -796,6 +812,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObDoubleType,/*Raw*/
|
||||
ObMaxType, /*Interval*/
|
||||
ObMaxType, /*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*number -> XXX*/
|
||||
@ -820,6 +840,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObNumberType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObMaxType, /*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*datetime -> XXX*/
|
||||
@ -844,6 +868,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObDateTimeType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObMaxType, /*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*date -> XXX*/
|
||||
@ -868,6 +896,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObMaxType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObMaxType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*time -> XXX*/
|
||||
@ -892,6 +924,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObMaxType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObMaxType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*year -> XXX*/
|
||||
@ -916,6 +952,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObMaxType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObMaxType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*string -> XXX*/
|
||||
@ -940,6 +980,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObVarcharType,/*Raw*/
|
||||
ObVarcharType,/*Interval*/
|
||||
ObVarcharType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObVarcharType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*extend -> XXX*/
|
||||
@ -964,6 +1008,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObMaxType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObMaxType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObUserDefinedSQLType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*unknown -> XXX*/
|
||||
@ -988,6 +1036,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObMaxType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObMaxType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*text -> XXX*/
|
||||
@ -1012,6 +1064,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObLongTextType,/*Raw*/
|
||||
ObLongTextType,/*Interval*/
|
||||
ObMaxType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*bit -> XXX*/
|
||||
@ -1036,6 +1092,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObMaxType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObMaxType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*EnumSet -> XXX*/
|
||||
@ -1060,6 +1120,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObMaxType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObMaxType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*EnumSetInner -> XXX*/
|
||||
@ -1084,6 +1148,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObMaxType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObMaxType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*otimestamp-> XXX*/
|
||||
@ -1108,6 +1176,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObMaxType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObMaxType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*Raw-> XXX*/
|
||||
@ -1132,6 +1204,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObRawType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObMaxType, /*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*Interval-> XXX*/
|
||||
@ -1156,6 +1232,10 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObMaxType,/*Raw*/
|
||||
ObIntervalYMType,/*Interval*/
|
||||
ObMaxType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*RowID-> XXX*/
|
||||
@ -1180,5 +1260,121 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] =
|
||||
ObMaxType,/*Raw*/
|
||||
ObMaxType,/*Interval*/
|
||||
ObURowIDType,/*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*Lob -> XXX*/
|
||||
ObMaxType, /*null*/
|
||||
ObMaxType, /*int*/
|
||||
ObMaxType, /*uint*/
|
||||
ObMaxType, /*float*/
|
||||
ObMaxType, /*double*/
|
||||
ObMaxType, /*number*/
|
||||
ObMaxType, /*datetime*/
|
||||
ObMaxType, /*date*/
|
||||
ObMaxType, /*time*/
|
||||
ObMaxType, /*year*/
|
||||
ObMaxType, /*string*/
|
||||
ObMaxType, /*extend*/
|
||||
ObMaxType, /*unknown*/
|
||||
ObMaxType, /*text*/
|
||||
ObMaxType, /*bit*/
|
||||
ObMaxType, /*EnumSet*/
|
||||
ObMaxType, /*EnumSetInner*/
|
||||
ObMaxType, /*OTimestamp*/
|
||||
ObMaxType, /*Raw*/
|
||||
ObMaxType, /*Interval*/
|
||||
ObMaxType, /*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*Json -> XXX*/
|
||||
ObJsonType, /*null*/
|
||||
ObJsonType, /*int*/
|
||||
ObJsonType, /*uint*/
|
||||
ObJsonType, /*float*/
|
||||
ObJsonType, /*double*/
|
||||
ObJsonType, /*number*/
|
||||
ObJsonType, /*datetime*/
|
||||
ObJsonType, /*date*/
|
||||
ObJsonType, /*time*/
|
||||
ObJsonType, /*year*/
|
||||
ObJsonType, /*string*/
|
||||
ObMaxType, /*extend*/
|
||||
ObJsonType, /*unknown*/
|
||||
ObJsonType, /*text*/
|
||||
ObJsonType, /*bit*/
|
||||
ObJsonType, /*EnumSet*/
|
||||
ObMaxType, /*EnumSetInner*/
|
||||
ObJsonType, /*OTimestamp*/
|
||||
ObMaxType, /*Raw*/
|
||||
ObMaxType, /*Interval*/
|
||||
ObMaxType, /*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObJsonType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*Geometry -> XXX*/
|
||||
ObMaxType, /*null*/
|
||||
ObMaxType, /*int*/
|
||||
ObMaxType, /*uint*/
|
||||
ObMaxType, /*float*/
|
||||
ObMaxType, /*double*/
|
||||
ObMaxType, /*number*/
|
||||
ObMaxType, /*datetime*/
|
||||
ObMaxType, /*date*/
|
||||
ObMaxType, /*time*/
|
||||
ObMaxType, /*year*/
|
||||
ObMaxType, /*string*/
|
||||
ObMaxType, /*extend*/
|
||||
ObMaxType, /*unknown*/
|
||||
ObMaxType, /*text*/
|
||||
ObMaxType, /*bit*/
|
||||
ObMaxType, /*EnumSet*/
|
||||
ObMaxType, /*EnumSetInner*/
|
||||
ObMaxType, /*OTimestamp*/
|
||||
ObMaxType, /*Raw*/
|
||||
ObMaxType, /*Interval*/
|
||||
ObMaxType, /*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObMaxType, /*User Defined Type*/
|
||||
},
|
||||
{
|
||||
/*User Defined Type -> XXX*/
|
||||
ObMaxType, /*null*/
|
||||
ObMaxType, /*int*/
|
||||
ObMaxType, /*uint*/
|
||||
ObMaxType, /*float*/
|
||||
ObMaxType, /*double*/
|
||||
ObMaxType, /*number*/
|
||||
ObMaxType, /*datetime*/
|
||||
ObMaxType, /*date*/
|
||||
ObMaxType, /*time*/
|
||||
ObMaxType, /*year*/
|
||||
ObUserDefinedSQLType, /*string*/
|
||||
ObUserDefinedSQLType, /*extend*/
|
||||
ObMaxType, /*unknown*/
|
||||
ObMaxType, /*text*/
|
||||
ObMaxType, /*bit*/
|
||||
ObMaxType, /*EnumSet*/
|
||||
ObMaxType, /*EnumSetInner*/
|
||||
ObMaxType, /*OTimestamp*/
|
||||
ObMaxType, /*Raw*/
|
||||
ObMaxType, /*Interval*/
|
||||
ObMaxType, /*RowID*/
|
||||
ObMaxType, /*Lob*/
|
||||
ObMaxType, /*Json*/
|
||||
ObMaxType, /*Geometry*/
|
||||
ObUserDefinedSQLType, /*User Defined Type*/
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user