Ratandeep Ratti created HIVE-14351: -------------------------------------- Summary: Minor improvement in genUnionPlan method Key: HIVE-14351 URL: https://issues.apache.org/jira/browse/HIVE-14351 Project: Hive Issue Type: Improvement Affects Versions: 2.1.0 Reporter: Ratandeep Ratti Assignee: Ratandeep Ratti
{{org.apache.hadoop.hive.ql.parse.SemanticAnalyzer#genUnionPlan}} method can trip new users reading the code. Specifically on line 8979 {code} HashMap<String, ColumnInfo> leftmap = leftRR.getFieldMap(leftalias); HashMap<String, ColumnInfo> rightmap = rightRR.getFieldMap(rightalias); {code} These column maps are actually LinkedHashMaps and the code relies on this fact when iterating the two union branches in order. This was not clear immediately and left me wondering how is it that traversal order is consistent. I've updated the code with this simple fix. -- This message was sent by Atlassian JIRA (v6.3.4#6332)