Skip to content

Conversation

joseignaciorc
Copy link
Contributor

This commits add the the is_case_insensitive property to the Dataset 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

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
@joseignaciorc joseignaciorc requested review from a team as code owners October 3, 2023 20:55
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery API. labels Oct 3, 2023
@Linchin Linchin added the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 9, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 9, 2023
@@ -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.
Copy link
Contributor

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

Copy link
Contributor Author

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

_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"))
Copy link
Contributor

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?

Copy link
Contributor Author

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

@Linchin
Copy link
Contributor

Linchin commented Oct 9, 2023 β€’

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 :)
cc @chalmerlowe to double check.

@Linchin Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 19, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 19, 2023
Co-authored-by: Lingqing Gan <lingqing.gan@gmail.com>
@Linchin Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 24, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 24, 2023
@joseignaciorc
Copy link
Contributor Author

Ping @Linchin & @chalmerlowe :)

@chalmerlowe
Copy link
Collaborator

@joseignaciorc

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.

@Linchin Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 1, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 1, 2023
@Linchin Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 1, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 1, 2023
@Linchin
Copy link
Contributor

Linchin commented Nov 1, 2023

Thank you @joseignaciorc!

@Linchin Linchin self-requested a review November 1, 2023 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Dataset class lacks an is_case_insensitive property
4 participants