-
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: add support for Dataset.isCaseInsensitive #1671
feat: add support for Dataset.isCaseInsensitive #1671
Conversation
This commit creates a property named is_case_insensitive (in dataset.py) that allows the usage of the isCaseSensitive field in the Dataset REST API. Fixes: googleapis#1670
google/cloud/bigquery/dataset.py
Outdated
@@ -764,6 +765,25 @@ def default_encryption_configuration(self, value): | |||
api_repr = value.to_api_repr() | |||
self._properties["defaultEncryptionConfiguration"] = api_repr | |||
|
|||
@property | |||
def is_case_insensitive(self): | |||
"""Optional[bool]: TRUE if the dataset and its table names are case-insensitive, otherwise FALSE. |
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.
nit: use True
and False
, following Python convention
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.
Changed to True
and False
tests/system/test_client.py
Outdated
_make_dataset_id("create_table"), is_case_insensitive=False | ||
) | ||
table_arg = Table(ci_dataset.table("test_table3"), schema=SCHEMA) | ||
tablemc_arg = Table(ci_dataset.table("Test_taBLe3")) |
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.
another nit: what does mc
stand for in the variable tablemc_arg
? Could we use something easier to understand?
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.
mc
= mixed case; added a comment about that
The PR seems good to me except for a few nits. Also, it needs some additional test coverage for kokoro test to pass. Please let us know if you need any help resolving it :) |
Co-authored-by: Lingqing Gan <[email protected]>
Ping @Linchin & @chalmerlowe :) |
I have been out with COVID. Still recovering and trying to catch up on all the things. I will look at this as soon as possible. Thanks for being patient. |
Thank you @joseignaciorc! |
This commits add the the
is_case_insensitive
property to theDataset
class.This property uses the
isCaseInsensitive
field of the Dataset REST API, allowing the configuration of the case-sensitivity of the BigQuery datasets.Fixes: #1670