diff --git a/src/sql/optimizer/ob_del_upd_log_plan.cpp b/src/sql/optimizer/ob_del_upd_log_plan.cpp index a20f29ac4b..c19e02ced8 100644 --- a/src/sql/optimizer/ob_del_upd_log_plan.cpp +++ b/src/sql/optimizer/ob_del_upd_log_plan.cpp @@ -364,13 +364,15 @@ int ObDelUpdLogPlan::calculate_table_location_and_sharding(const ObDelUpdStmt &s ret = OB_ALLOCATE_MEMORY_FAILED; LOG_WARN("failed to allocate memory", K(sharding_info), K(ret)); } else { + const ObArray empty_filters; + const ObIArray &real_filters = get_optimizer_context().is_online_ddl() ? empty_filters : filters; sharding_info = new(sharding_info) ObShardingInfo(); table_partition_info = new(table_partition_info) ObTablePartitionInfo(allocator_); ObTableLocationType location_type = OB_TBL_LOCATION_UNINITIALIZED; ObAddr &server = get_optimizer_context().get_local_server_addr(); table_partition_info->get_table_location().set_check_no_partition(stmt.is_merge_stmt()); if (OB_FAIL(calculate_table_location(stmt, - filters, + real_filters, table_id, ref_table_id, part_ids,