okumin commented on code in PR #5452:
URL: https://github.com/apache/hive/pull/5452#discussion_r1804695815
##########
ql/src/java/org/apache/hadoop/hive/ql/plan/mapper/PlanMapper.java:
##########
@@ -256,20 +277,15 @@ public <T> List<T> getAll(Class<T> clazz) {
return ret;
}
- public void runMapper(GroupTransformer mapper) {
- for (EquivGroup equivGroup : groups) {
- mapper.map(equivGroup);
- }
- }
-
- public <T> List<T> lookupAll(Class<T> clazz, Object key) {
+ private <T> List<T> lookupAll(Class<T> clazz, Object key) {
EquivGroup group = objectMap.get(key);
if (group == null) {
throw new NoSuchElementException(Objects.toString(key));
}
return group.getAll(clazz);
}
+ @VisibleForTesting
Review Comment:
This is used only by unit tests.
P.S. We have to ensure every usage must check preconditions before all read
operations of PlanMapper. I removed unused methods and I marked paths unused
from production code as VisibleForTesting so that we can focus on reviewing
production codes
--
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]