-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-25616: Hive-24741 backport to 2.3 #2730
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
Conversation
* all the partitions and hence we can attempt to use a directSQL equivalent API which | ||
* is considerably faster. | ||
* @param partVals The partitions values used to filter out the partitions. | ||
* @return true if partVals is empty or if all the values in partVals is empty strings. |
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.
I know this is from the original patch but looks like this javadoc is incorrect. The method actually returns false if partVals is empty. I don't really remember now why that was the case. Perhaps you can look at this if you have some cycles? If not, please fix the java doc.
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.
Will fix the docstring
@@ -2571,8 +2571,8 @@ private Collection getPartitionPsQueryResults(String dbName, String tableName, | |||
* all the partitions and hence we can attempt to use a directSQL equivalent API which | |||
* is considerably faster. | |||
* @param partVals The partitions values used to filter out the partitions. | |||
* @return true if partVals is empty or if all the values in partVals is empty strings. | |||
* other wise false. If user or groups is valid then returns false since the directSQL | |||
* @return false if partVals is empty, true if all the values in partVals are empty strings and |
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.
the comment should be "...and otherwise false for all the other cases" Or more simply, the method returns true only when partVals is non-empty and contains only empty strings, otherwise false.
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.
makes sense. Fixing.
Thanks for addressing the changes. I don't think the precommits are stable for Hive 2.x branch so I am willing to override testing results and do a force merge. |
Thanks @vihangk1 for the review. |
I am overriding the tests failed label in this case. Hive 2.x is a pretty old branch. We don't have a baseline of how stable are the tests on that branch in the first place. |
Thanks @nssalian for your contribution. |
…wed by Vihang Karajgaonkar) Closes (apache#2730)
…wed by Vihang Karajgaonkar) Closes (apache#2730)
…wed by Vihang Karajgaonkar) Closes (apache#2730)
…wed by Vihang Karajgaonkar) Closes (apache#2730)
What changes were proposed in this pull request?
This PR is a backport of #1948 wherein the the performance of get_partitions_ps_with_auth is improved into the Hive-2.3 branch.
Why are the changes needed?
Performance improvement for a HMS API on the Hive-2.3 branch since Spark continues to use Hive 2.3.x.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Same tests as original patch.