fix insert partition wise plan bug
This commit is contained in:
@ -566,7 +566,8 @@ int ObInsertLogPlan::create_insert_plans(ObIArray<CandidatePlan> &candi_plans,
|
|||||||
lock_row_flag_expr,
|
lock_row_flag_expr,
|
||||||
insert_table_part,
|
insert_table_part,
|
||||||
insert_op_sharding,
|
insert_op_sharding,
|
||||||
is_multi_part_dml))) {
|
is_multi_part_dml,
|
||||||
|
DIST_PARTITION_WISE == distributed_methods))) {
|
||||||
LOG_WARN("failed to allocate insert as top", K(ret));
|
LOG_WARN("failed to allocate insert as top", K(ret));
|
||||||
} else if (OB_FAIL(insert_plans.push_back(candi_plan))) {
|
} else if (OB_FAIL(insert_plans.push_back(candi_plan))) {
|
||||||
LOG_WARN("failed to push back", K(ret));
|
LOG_WARN("failed to push back", K(ret));
|
||||||
@ -579,7 +580,8 @@ int ObInsertLogPlan::allocate_insert_as_top(ObLogicalOperator *&top,
|
|||||||
ObRawExpr *lock_row_flag_expr,
|
ObRawExpr *lock_row_flag_expr,
|
||||||
ObTablePartitionInfo *table_partition_info,
|
ObTablePartitionInfo *table_partition_info,
|
||||||
ObShardingInfo *insert_op_sharding,
|
ObShardingInfo *insert_op_sharding,
|
||||||
bool is_multi_part_dml)
|
bool is_multi_part_dml,
|
||||||
|
bool is_partition_wise)
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
ObLogInsert *insert_op = NULL;
|
ObLogInsert *insert_op = NULL;
|
||||||
@ -608,6 +610,7 @@ int ObInsertLogPlan::allocate_insert_as_top(ObLogicalOperator *&top,
|
|||||||
insert_op->set_table_partition_info(table_partition_info);
|
insert_op->set_table_partition_info(table_partition_info);
|
||||||
insert_op->set_lock_row_flag_expr(lock_row_flag_expr);
|
insert_op->set_lock_row_flag_expr(lock_row_flag_expr);
|
||||||
insert_op->set_has_instead_of_trigger(insert_stmt->has_instead_of_trigger());
|
insert_op->set_has_instead_of_trigger(insert_stmt->has_instead_of_trigger());
|
||||||
|
insert_op->set_is_partition_wise(is_partition_wise);
|
||||||
if (OB_NOT_NULL(insert_stmt->get_table_item(0))) {
|
if (OB_NOT_NULL(insert_stmt->get_table_item(0))) {
|
||||||
insert_op->set_append_table_id(insert_stmt->get_table_item(0)->ref_id_);
|
insert_op->set_append_table_id(insert_stmt->get_table_item(0)->ref_id_);
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,8 @@ protected:
|
|||||||
ObRawExpr *lock_row_flag_expr,
|
ObRawExpr *lock_row_flag_expr,
|
||||||
ObTablePartitionInfo *table_partition_info,
|
ObTablePartitionInfo *table_partition_info,
|
||||||
ObShardingInfo *insert_op_sharding,
|
ObShardingInfo *insert_op_sharding,
|
||||||
bool is_multi_part);
|
bool is_multi_part,
|
||||||
|
bool is_partition_wise);
|
||||||
int candi_allocate_pdml_insert(OSGShareInfo *osg_info);
|
int candi_allocate_pdml_insert(OSGShareInfo *osg_info);
|
||||||
int candi_allocate_optimizer_stats_merge(OSGShareInfo *osg_info);
|
int candi_allocate_optimizer_stats_merge(OSGShareInfo *osg_info);
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ int ObLogInsert::compute_sharding_info()
|
|||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
LOG_WARN("get unexpected null", K(ret));
|
LOG_WARN("get unexpected null", K(ret));
|
||||||
} else if (NULL != get_sharding()) {
|
} else if (NULL != get_sharding()) {
|
||||||
is_partition_wise_ = true;
|
//do nothing
|
||||||
} else if (is_multi_part_dml()) {
|
} else if (is_multi_part_dml()) {
|
||||||
strong_sharding_ = get_plan()->get_optimizer_context().get_local_sharding();
|
strong_sharding_ = get_plan()->get_optimizer_context().get_local_sharding();
|
||||||
} else if (OB_FAIL(ObLogDelUpd::compute_sharding_info())) {
|
} else if (OB_FAIL(ObLogDelUpd::compute_sharding_info())) {
|
||||||
|
Reference in New Issue
Block a user