-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
BigQuery Storage: Add more in-depth system tests #8992
Conversation
# Compare datetime separately, AVRO and PYARROW return different object types, | ||
# although they should both represent the same value. | ||
expected_pattern = re.compile(r"2005-10-26( |T)19:49:41") | ||
assert expected_pattern.match(str(rows[0]["datetime_field"])) |
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.
Sanity check - is this expected, or should both AVRO and PYARROW return the exact same type?
Right now one returns a plain ISO datetime string, while the other returns a Timestamp
object..
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.
Answer:
"Expected" is a datetime.datetime
object with no timezone. Actual is a string. That's an open issue.
FWIW, a system test failure with STRUCT records will be fixed in #9001. |
e7b1ed2
to
c5f5867
Compare
@plamut System tests are failing in setup with the error, |
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.
Looking good! A few questions.
A similar method is planned to be added to the library itself, and when done, the _add_rows() will not be needed anymore.
Creating a client once per system tests session avoids the overhead of authenticating before each test case.
Creating a client just once avoids the auth overhead on every system test case.
I've filed https://github.com/googleapis/google-cloud-python/issues/9066 for the Avro DATETIME issue. |
* Add additional BQ storage system test fixtures * Add reader column selection system test * Add basic reader system test * Add reader with row filter system test * Add reading data with snapshot system test * Add reading column partitioned table system test * Add system test for column types data conversions * Add ingestion time partitioned table system test * Add system test for resuming a read at an offset * Remove unnecessary protobuf install in noxfile * Add TODO comment to replace a test helper method A similar method is planned to be added to the library itself, and when done, the _add_rows() will not be needed anymore. * Extract BQ client to session fixture in tests Creating a client once per system tests session avoids the overhead of authenticating before each test case. * Only create BQ storage client once per test run Creating a client just once avoids the auth overhead on every system test case. * Add common credentials fixture for system tests
* Add additional BQ storage system test fixtures * Add reader column selection system test * Add basic reader system test * Add reader with row filter system test * Add reading data with snapshot system test * Add reading column partitioned table system test * Add system test for column types data conversions * Add ingestion time partitioned table system test * Add system test for resuming a read at an offset * Remove unnecessary protobuf install in noxfile * Add TODO comment to replace a test helper method A similar method is planned to be added to the library itself, and when done, the _add_rows() will not be needed anymore. * Extract BQ client to session fixture in tests Creating a client once per system tests session avoids the overhead of authenticating before each test case. * Only create BQ storage client once per test run Creating a client just once avoids the auth overhead on every system test case. * Add common credentials fixture for system tests
Closes #8983.
This PR adds additional system tests for BigQuery Storage. It does not include the last item from the issue description, i.e. the long-running test, at least not until decided otherwise.
Things to mind
(see the comment below) There is currently an inconsistent type returned for datetime columns (string instead of adatetime
instance), affecting the same test.Created #9066 for that.