Skip to content

Fix componentreflection test - #328

Merged
susodapop merged 1 commit into
sqlalchemy-stagingfrom
fix-componentreflection-test
Jan 23, 2024
Merged

Fix componentreflection test#328
susodapop merged 1 commit into
sqlalchemy-stagingfrom
fix-componentreflection-test

Conversation

@susodapop

Copy link
Copy Markdown
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 <jesse.whitehouse@databricks.com>
@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
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
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 <jesse.whitehouse@databricks.com>
susodapop pushed a commit that referenced this pull request Jan 23, 2024
* Add support for table comments

Signed-off-by: Christophe Bornet <cbornet@hotmail.com>

* Use per-table DTE to get the table comments

Signed-off-by: Christophe Bornet <cbornet@hotmail.com>

* Revert pytest.ini change

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

* 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 <jesse.whitehouse@databricks.com>

* Add unit tests for table comments

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

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

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

* Stop skipping table comment portions of ComponentReflectionTest

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

* Move DTE parsing into _parse.py

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

* Add e2e test using inspector

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

* Add unit test for new method in _parse.py

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

* Fix assertion in column comment test

This was missed in #328

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

---------

Signed-off-by: Christophe Bornet <cbornet@hotmail.com>
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
Co-authored-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
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