kasakrisz commented on code in PR #3891:
URL: https://github.com/apache/hive/pull/3891#discussion_r1083790819
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/RowResolver.java:
##########
@@ -481,11 +492,16 @@ public static RowResolver getCombinedRR(RowResolver
leftRR,
public RowResolver duplicate() {
RowResolver resolver = new RowResolver();
resolver.rowSchema = new RowSchema(rowSchema);
- resolver.rslvMap.putAll(rslvMap);
+ for (Map.Entry<String, Map<String, ColumnInfo>> entry :
rslvMap.entrySet()) {
+ resolver.rslvMap.put(entry.getKey(), new
LinkedHashMap<>(entry.getValue()));
+ }
resolver.invRslvMap.putAll(invRslvMap);
resolver.altInvRslvMap.putAll(altInvRslvMap);
resolver.expressionMap.putAll(expressionMap);
resolver.isExprResolver = isExprResolver;
+ for (Map.Entry<String, Map<String, String>> entry :
ambiguousColumns.entrySet()) {
+ resolver.ambiguousColumns.put(entry.getKey(), new
LinkedHashMap<>(entry.getValue()));
+ }
resolver.ambiguousColumns.putAll(ambiguousColumns);
Review Comment:
It's a bug. Good catch.
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/RowResolver.java:
##########
@@ -101,17 +104,25 @@ public ASTNode getExpressionSource(ASTNode node) {
}
public void put(String tab_alias, String col_alias, ColumnInfo colInfo) {
+ if (!putInternal(tab_alias, col_alias, colInfo)) {
+ return;
+ }
+ if (col_alias != null) {
+ colInfo.setAlias(col_alias.toLowerCase());
+ }
+ }
+
+ public boolean putInternal(String tab_alias, String col_alias, ColumnInfo
colInfo) {
Review Comment:
done
--
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]