Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0
-
None
Description
The following code in that function doesn't work properly.
int startIndex = 0; int endIndex = -1; // retrieve the tables from the metastore in batches to alleviate memory constraints while (endIndex < allTables.size() - 1) { startIndex = endIndex + 1; endIndex = endIndex + tableBatchSize; if (endIndex >= allTables.size()) { endIndex = allTables.size() - 1; }
e.g.: if we have 5 tables and tableBatchSize is 10, startIndex will be 0 and endIndex will be 4. We only drop 4 tables since sublist(startIndex, endIndex) is inclusive on startIndex and exclusive on endIndex.
If total tables is larger tableBatchSize, we also have similar issues.
This is discovered when I work on HIVE-11255.
Attachments
Attachments
Issue Links
- links to