Skip to content

Fix componentreflection test #328

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

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

susodapop
Copy link
Contributor

Description

This is a quick fix follow-up to #306 which fixes the ComponentReflectionTest. Since SQLAlchemy expects an empty column to be a NoneType rather than ''. In actual usage, this doesn't change user behaviour since both '' and NoneType evaluate false-y.

Databricks returns an empty string in the REMARKS column rather than a
`NoneType`.

Signed-off-by: Jesse Whitehouse <[email protected]>
@susodapop susodapop changed the base branch from main to sqlalchemy-staging January 23, 2024 20:56
@susodapop susodapop merged commit a7f4773 into sqlalchemy-staging Jan 23, 2024
@susodapop susodapop deleted the fix-componentreflection-test branch January 23, 2024 20:57
susodapop pushed a commit to cbornet/databricks-sql-python that referenced this pull request Jan 23, 2024
susodapop pushed a commit to cbornet/databricks-sql-python that referenced this pull request Jan 23, 2024
This was missed in databricks#328

Signed-off-by: Jesse Whitehouse <[email protected]>
susodapop pushed a commit that referenced this pull request Jan 23, 2024
* Add support for table comments

Signed-off-by: Christophe Bornet <[email protected]>

* Use per-table DTE to get the table comments

Signed-off-by: Christophe Bornet <[email protected]>

* Revert pytest.ini change

Signed-off-by: Jesse Whitehouse <[email protected]>

* Fix typo in test name for columns. Move .engine and .compile into a base
class. Scaffold in the Table Comment unit tests.

Signed-off-by: Jesse Whitehouse <[email protected]>

* Add unit tests for table comments

Signed-off-by: Jesse Whitehouse <[email protected]>

* Revert overrides since these aren't needed after #328

Signed-off-by: Jesse Whitehouse <[email protected]>

* Stop skipping table comment portions of ComponentReflectionTest

Signed-off-by: Jesse Whitehouse <[email protected]>

* Move DTE parsing into _parse.py

Signed-off-by: Jesse Whitehouse <[email protected]>

* Add e2e test using inspector

Signed-off-by: Jesse Whitehouse <[email protected]>

* Add unit test for new method in _parse.py

Signed-off-by: Jesse Whitehouse <[email protected]>

* Fix assertion in column comment test

This was missed in #328

Signed-off-by: Jesse Whitehouse <[email protected]>

---------

Signed-off-by: Christophe Bornet <[email protected]>
Signed-off-by: Jesse Whitehouse <[email protected]>
Co-authored-by: Jesse Whitehouse <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant