xvrl commented on a change in pull request #11363:
URL: https://github.com/apache/druid/pull/11363#discussion_r652150327



##########
File path: 
server/src/main/java/org/apache/druid/segment/realtime/appenderator/SinkQuerySegmentWalker.java
##########
@@ -152,9 +152,9 @@ public SinkQuerySegmentWalker(
     final DataSourceAnalysis analysis = 
DataSourceAnalysis.forDataSource(query.getDataSource());
 
     // Sanity check: make sure the query is based on the table we're meant to 
handle.
-    analysis.getBaseTableDataSource()
-            .filter(ds -> dataSource.equals(ds.getName()))
-            .orElseThrow(() -> new ISE("Cannot handle datasource: %s", 
analysis.getDataSource()));
+    if (!analysis.getBaseTableDataSource().filter(ds -> 
dataSource.equals(ds.getName())).isPresent()) {

Review comment:
       it was a fight between error-prone complaining about unused return 
values, and spotbugs complaining about `DLS_DEAD_LOCAL_STORE`




-- 
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]

Reply via email to