kfaraz commented on code in PR #14639:
URL: https://github.com/apache/druid/pull/14639#discussion_r1271234076


##########
server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java:
##########
@@ -1780,11 +1795,16 @@ public void deleteSegments(final Set<DataSegment> 
segments)
           public Void inTransaction(Handle handle, TransactionStatus 
transactionStatus)
           {
             int segmentSize = segments.size();
-            String dataSource = "";
+            String dataSource = 
segments.stream().findAny().map(DataSegment::getDataSource).orElse("?");
+
+            final String deleteFrom = StringUtils.format("DELETE from %s WHERE 
id = :id", dbTables.getSegmentsTable());

Review Comment:
   ```suggestion
               final String deleteSql = StringUtils.format("DELETE from %s 
WHERE id = :id", dbTables.getSegmentsTable());
   ```



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

To unsubscribe, e-mail: [email protected]

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