Skip to content

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

Merged
merged 4 commits into from
Oct 19, 2021
Merged

HIVE-25616: Hive-24741 backport to 2.3 #2730

merged 4 commits into from
Oct 19, 2021

Conversation

nssalian
Copy link

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.

@nssalian nssalian changed the title Hive-24741 backport to 2.3 HIVE-25616: Hive-24741 backport to 2.3 Oct 18, 2021
@nssalian
Copy link
Author

CC: @nrg4878 , @vihangk1

* 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.
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix the docstring

@nssalian nssalian requested a review from vihangk1 October 18, 2021 20:59
@@ -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
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. Fixing.

@vihangk1
Copy link
Contributor

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.

@nssalian
Copy link
Author

Thanks @vihangk1 for the review.

@vihangk1
Copy link
Contributor

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.

@vihangk1 vihangk1 merged commit 8e7f23f into apache:branch-2.3 Oct 19, 2021
@vihangk1
Copy link
Contributor

Thanks @nssalian for your contribution.

@nssalian nssalian deleted the hive23-25616 branch October 19, 2021 20:02
PACordonnier pushed a commit to TOSIT-IO/hive that referenced this pull request Nov 9, 2023
rpignolet pushed a commit to TOSIT-IO/hive that referenced this pull request Nov 10, 2023
Pierrotws pushed a commit to TOSIT-IO/hive that referenced this pull request Jan 13, 2024
Pierrotws pushed a commit to TOSIT-IO/hive that referenced this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants