deniskuzZ commented on code in PR #5492: URL: https://github.com/apache/hive/pull/5492#discussion_r2010470825
########## ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java: ########## @@ -251,6 +254,31 @@ public ParseContext transform(ParseContext pctx) throws SemanticException { return pctx; } + private static List<List<TableScanOperator>> groupTableScanOperators(List<Entry<String, Long>> sortedTables, + ArrayListMultimap<String, TableScanOperator> tableNameToOps, int batchSize) { + if (batchSize == -1) { + return sortedTables.stream().map(entry -> tableNameToOps.get(entry.getKey())).collect(Collectors.toList()); + } + + final List<List<TableScanOperator>> batches = new ArrayList<>(); + for (Entry<String, Long> tablePair : sortedTables) { + final String tableName = tablePair.getKey(); + final List<TableScanOperator> scans = tableNameToOps.get(tableName); + + final int limit = scans.size(); Review Comment: why not use `scans.size()` directly? -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org