shauryachats commented on code in PR #15760: URL: https://github.com/apache/pinot/pull/15760#discussion_r2082644155
########## pinot-query-planner/src/main/java/org/apache/pinot/query/planner/physical/v2/opt/rules/LeafStageWorkerAssignmentRule.java: ########## @@ -326,6 +345,53 @@ static TableScanWorkerAssignmentResult attemptPartitionedDistribution(String tab return new TableScanWorkerAssignmentResult(dataDistribution, workerIdToSegmentsMap); } + /** + * Infers partition from invalid segments if the passed flag is set to true. + */ + @VisibleForTesting + static Map<Integer, List<String>> getInvalidSegmentsByInferredPartition(@Nullable List<String> invalidSegments, + boolean inferPartitionsForInvalidSegments, String tableNameWithType) { + if (CollectionUtils.isEmpty(invalidSegments)) { + return Map.of(); + } else if (!Objects.equals(TableNameBuilder.getTableTypeFromTableName(tableNameWithType), TableType.REALTIME) Review Comment: Can remove else if here since we are `return`ing above. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org