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 support for 'None' on response data #443

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

avibhstarburst
Copy link
Contributor

@avibhstarburst avibhstarburst commented Jan 30, 2024

Description

Add support for 'None' on response data

Non-technical explanation

Release notes

( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text:

* Fix possible failures when retrieving query results if the server returns empty data. ({issue}`443`)

@cla-bot cla-bot bot added the cla-signed label Jan 30, 2024
Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

@hovaesco can you guide with how to add a unit test for this (using mocking since not easy to have isolated test case).

trino/client.py Outdated Show resolved Hide resolved
@hovaesco
Copy link
Member

To write a unit test here please create mock like

def sample_get_response_data():
and then see how it's used in tests
def test_trino_fetch_request(mock_requests, sample_get_response_data):

tests/unit/conftest.py Outdated Show resolved Hide resolved
Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

LGTM % comment.

Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

Thanks. Will merge after CI is done.

@hashhar hashhar merged commit 191cd79 into trinodb:master Jan 31, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants