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` 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: [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]