-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HIVE-28620: Query result is cached in case of IOWD if the subquery is not trivial #5537
Conversation
eb313fc
to
d560636
Compare
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Outdated
Show resolved
Hide resolved
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Outdated
Show resolved
Hide resolved
It seems to me that this could be done with fewer code changes, however, I could be completely wrong, but to be safe I think we should ask review from @kasakrisz |
I was thinking about the same I believe the worst thing that's currently happening is this:
a field variable is changed while running a recursive method, with all due respect, but without knowing the context, this looks awful :( however, I wasn't brave enough to touch it for the sake of this fix |
wait, maybe I have to revise what I said
looks like the original qb is passed to the method, so I can reuse it, let me try :D |
pushed 392c9b9 new test case passed with the latest change |
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
// if any filters are present in the join tree, push them on top of the | ||
// table | ||
pushJoinFilters(qb, qb.getQbJoinTree(), aliasToOpInfo); | ||
srcOpInfo = genJoinPlan(qb, aliasToOpInfo); | ||
pushJoinFilters(qpParam, qpParam.getQbJoinTree(), aliasToOpInfo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing qpParam.getQbJoinTree()
is not necessary if qpParam
is also passed.
392c9b9
to
e95d34c
Compare
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Outdated
Show resolved
Hide resolved
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Outdated
Show resolved
Hide resolved
sonar reported number of new findings |
checked, most of them are not introduced now, I was only able to fix one exception in the unit test |
… not trivial - failing testcase
… not trivial - fix Change-Id: Ia32bcdec3085aa8e8be3048b5c48db862592045a
074f9cf
to
a15d69e
Compare
Quality Gate passedIssues Measures |
is this ready for a +1 guys? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM +1
What changes were proposed in this pull request?
Pass the root QB object to different operator tree generation paths. Behavior change is not expected because the root QB is only used in getDestinationFilePath with this patch.
Why are the changes needed?
To reach flags that were set on the root QB and apply the whole query. Otherwise, a lot of bad things can happen, details in jira.
Does this PR introduce any user-facing change?
No.
Is the change a dependency upgrade?
No.
How was this patch tested?
Tested on cluster, unit test added.
The patch is uploaded in 2 commits (will be squashed of course), the first commit contains the unit test case which fails without the fix, which is in the second commit.