-
Notifications
You must be signed in to change notification settings - Fork 306
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
feat: support RANGE in schema #1746
Conversation
test failures seem to be api call timeout. |
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.
Probably worth augmenting a system test to create a table with a RANGE type in the schema, but LGTM otherwise.
@shollyman After adding the system test, I also had to make a bunch of other changes. Please take another look, thank you :) |
self._properties["type"] = element_type.upper() | ||
|
||
@property | ||
def element_type(self): |
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.
Do you also need a setter for this property? Or you're only exposing a setter from the containing type?
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 decided to not allow the element type to be altered in order to protect the table schema from being changed unintentionally. As a reference, most of the properties in class SchemaField
don't have setters either.
tests/system/test_client.py
Outdated
@@ -1804,6 +1799,11 @@ def test_dbapi_fetch_w_bqstorage_client_large_result_set(self): | |||
("id", 3), | |||
("timestamp", datetime.datetime(2006, 10, 9, 18, 40, 33, tzinfo=UTC)), | |||
], | |||
[ |
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.
Not clear how the changes in this file relate to the feature. Just a side fixup?
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 expected value was changed because the public table somehow lost the first row of the table (id=1
) around 12/31, so the system test has been failing.
I have also notified the team managing the public datasets.
part of #1724
FieldElementType
to supportRANGE
type in schemaThank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: