to issue<50708864>:fix mutilset nested table containg complex type core
This commit is contained in:
@ -105,9 +105,15 @@ int ObExprMultiSet::calc_result_type2(ObExprResType &type,
|
|||||||
if (OB_SUCC(ret)) { \
|
if (OB_SUCC(ret)) { \
|
||||||
elem = static_cast<ObObj *>(ca->get_data()) + i; \
|
elem = static_cast<ObObj *>(ca->get_data()) + i; \
|
||||||
if (OB_NOT_NULL(elem)) { \
|
if (OB_NOT_NULL(elem)) { \
|
||||||
if (OB_FAIL(deep_copy_obj(*coll_allocator, *elem, dst[cnt + offset]))) { \
|
if (elem->is_pl_extend() && \
|
||||||
|
elem->get_meta().get_extend_type() != pl::PL_REF_CURSOR_TYPE) { \
|
||||||
|
if (OB_FAIL(pl::ObUserDefinedType::deep_copy_obj(*coll_allocator, *elem, dst[cnt + offset], true))) { \
|
||||||
LOG_WARN("fail to fill obobj", K(*elem), K(ret)); \
|
LOG_WARN("fail to fill obobj", K(*elem), K(ret)); \
|
||||||
} else { \
|
} \
|
||||||
|
} else if (OB_FAIL(deep_copy_obj(*coll_allocator, *elem, dst[cnt + offset]))) { \
|
||||||
|
LOG_WARN("fail to fill obobj", K(*elem), K(ret)); \
|
||||||
|
} \
|
||||||
|
if (OB_SUCC(ret)) { \
|
||||||
cnt++; \
|
cnt++; \
|
||||||
} \
|
} \
|
||||||
} else { \
|
} else { \
|
||||||
@ -247,7 +253,12 @@ int ObExprMultiSet::calc_ms_one_distinct(common::ObIAllocator *coll_allocator,
|
|||||||
LOG_WARN("allocate result obobj array failed, size is: ", K(res_cnt));
|
LOG_WARN("allocate result obobj array failed, size is: ", K(res_cnt));
|
||||||
} else {
|
} else {
|
||||||
for (int64_t i = 0; i < res_cnt; ++i) {
|
for (int64_t i = 0; i < res_cnt; ++i) {
|
||||||
if (OB_FAIL(deep_copy_obj(*coll_allocator, objs[i], data_arr[i]))) {
|
if (objs[i].is_pl_extend() &&
|
||||||
|
objs[i].get_meta().get_extend_type() != pl::PL_REF_CURSOR_TYPE) {
|
||||||
|
if (OB_FAIL(pl::ObUserDefinedType::deep_copy_obj(*coll_allocator, objs[i], data_arr[i], true))) {
|
||||||
|
LOG_WARN("copy obobj failed.", K(ret));
|
||||||
|
}
|
||||||
|
} else if (OB_FAIL(deep_copy_obj(*coll_allocator, objs[i], data_arr[i]))) {
|
||||||
LOG_WARN("copy obobj failed.", K(ret));
|
LOG_WARN("copy obobj failed.", K(ret));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -339,7 +350,11 @@ int ObExprMultiSet::calc_ms_all_impl(common::ObIAllocator *coll_allocator,
|
|||||||
#define COPY_ELEM(iscopy) \
|
#define COPY_ELEM(iscopy) \
|
||||||
do{ \
|
do{ \
|
||||||
if (iscopy) { \
|
if (iscopy) { \
|
||||||
|
if (elem->is_pl_extend() && elem->get_meta().get_extend_type() != pl::PL_REF_CURSOR_TYPE) { \
|
||||||
|
OZ (pl::ObUserDefinedType::deep_copy_obj(*coll_allocator, *elem, data_arr[index], true)); \
|
||||||
|
} else { \
|
||||||
OZ (common::deep_copy_obj(*coll_allocator, *elem, data_arr[index])); \
|
OZ (common::deep_copy_obj(*coll_allocator, *elem, data_arr[index])); \
|
||||||
|
} \
|
||||||
++index; \
|
++index; \
|
||||||
}\
|
}\
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user