[PECO-1297] sqlalchemy: fix: can't read columns for tables containing a TIMESTAMP_NTZ column #296
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Our sqlalchemy dialect contains a method that parses the contents of a Thrift
TGetColumnsResponse
and maps column types from Databricks → sqlalchemy types. This uses a dictionary, which prior to this PR didn't include an entry forTIMESTAMP_NTZ
types. This was not caught by sqlalchemy's reusable dialect compliance tests because TIMESTAMP_NTZ is specific to Databricks and was therefore not covered. For this PR, I added an e2e test to capture this and wrote the fix to make the test pass.This change only affects the sqlalchemy codepath. I reran the
ComponentReflectionTest
portion of the sqlalchemy dialect compliance test suite (which is the only test suite that uses the dialect'sget_columns
method). All tests pass.All non sqlalchemy e2e tests pass as well.
Related Tickets and Documents
Closes #295