morningman commented on a change in pull request #4621:
URL: https://github.com/apache/incubator-doris/pull/4621#discussion_r491253944
##########
File path:
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadingTaskPlanner.java
##########
@@ -127,7 +127,12 @@ public void plan(TUniqueId loadId,
List<List<TBrokerFileStatus>> fileStatusesLis
// 2. Olap table sink
List<Long> partitionIds = getAllPartitionIds();
- OlapTableSink olapTableSink = new OlapTableSink(table, tupleDesc,
partitionIds);
+ OlapTableSink olapTableSink;
+ try {
+ olapTableSink = new OlapTableSink(table, tupleDesc, partitionIds);
+ } catch (IllegalStateException e) {
Review comment:
This is not a good way to catch `IllegalStateException` here. Because it
is a "Assertion" check in OlapTableSink.
We should check if `partitionIds` is empty before creating new
`OlapTableSink`.
And by the way, there are severval place where the OlapTableSink's
constructor is called, we should modify them too.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]