okumin commented on code in PR #5037:
URL: https://github.com/apache/hive/pull/5037#discussion_r1467141935
##########
ql/src/java/org/apache/hadoop/hive/ql/plan/mapper/PlanMapper.java:
##########
@@ -200,54 +199,30 @@ public void merge(Object o1, Object o2) {
}
private void link(Object o1, Object o2, boolean mayMerge) {
-
- Set<Object> keySet = Collections.newSetFromMap(new IdentityHashMap<Object,
Boolean>());
- keySet.add(o1);
- keySet.add(o2);
- keySet.add(getKeyFor(o1));
- keySet.add(getKeyFor(o2));
-
- Set<EquivGroup> mGroups = Collections.newSetFromMap(new
IdentityHashMap<EquivGroup, Boolean>());
-
- for (Object object : keySet) {
- EquivGroup group = objectMap.get(object);
- if (group != null) {
- mGroups.add(group);
- }
- }
- if (mGroups.size() > 1) {
+ final EquivGroup group1 = objectMap.get(o1);
+ final EquivGroup group2 = objectMap.get(o2);
+ if (group1 != null && group2 != null && group1 != group2) {
Review Comment:
Thanks for your review but you may not need to review this PR yet.
I'm still investigating the issue and trying several approaches. I created
this PR to trigger CI as I can't know which test cases could be affected
because of the complexity of SemanticAnalyzer. It turned out that the current
approach would break something else, and I am trying another approach.
See also https://gist.github.com/okumin/b111fe0a911507bdf6a7204f49b9cb72 to
trace the current findings and my activity logs.
--
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]