Skip to content
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

Add raw query response to cursor class #103

Conversation

piby180
Copy link
Contributor

@piby180 piby180 commented Jul 4, 2024

As of now with this client, we do not have access to rich stats returned by the Pinot API as mentioned in #88

This PR will store the raw query response json returned by Pinot API. I have stored the raw json directly instead of parsing each statistic into a separate variable. This is to prevent any side effects due to future breaking changes in Pinot API.

@@ -395,7 +396,15 @@ def finalize_query_payload(
def normalize_query_response(self, input_query, query_response):
try:
payload = query_response.json()
self.raw_query_response = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add a test using normal query response and failure results.

As well as v1/v2 query engine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xiangfu0 I have added the tests. Please review.

@xiangfu0 xiangfu0 merged commit e3f4822 into python-pinot-dbapi:master Jul 13, 2024
10 checks passed
@xiangfu0
Copy link
Contributor

Thanks for your contribution! this should be included in the release 5.5.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants