Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1115,16 +1115,10 @@ public static ReadEntity getParentViewInfo(String alias_id,
currentAlias = currentAlias.replace(SemanticAnalyzer.SUBQUERY_TAG_1, "")
.replace(SemanticAnalyzer.SUBQUERY_TAG_2, "");
ReadEntity input = viewAliasToInput.get(currentAlias);
if (input == null && currentInput != null) {
// To handle the case of - select * from (select * from V1) A;
// the currentInput != null check above is needed.
// the alias list that case would be A:V1:T. Lookup on A would return null,
// we need to go further to find the view inside it.
return currentInput;
if (input != null) {
currentInput = input;
}
currentInput = input;
}

return currentInput;
}

Expand Down
Loading