Type mapping related improvements and refactoring#440
Merged
hashhar merged 8 commits intotrinodb:masterfrom Jan 23, 2024
Merged
Type mapping related improvements and refactoring#440hashhar merged 8 commits intotrinodb:masterfrom
hashhar merged 8 commits intotrinodb:masterfrom
Conversation
165bd61 to
2104c8a
Compare
84542a7 to
f4c94a0
Compare
This helps keep the result parsing related logic isolated from client module.
The value being compared is the rawType from the Trino type-signatures. The raw-type is always just the type name without any type parameters so there's no need to use `startswith` or `contains` and instead values can be checked for equality.
This makes it easier to identify missing types for example.
Member
Author
hovaesco
approved these changes
Jan 22, 2024
Member
hovaesco
left a comment
There was a problem hiding this comment.
Looks good, just one comment regarding removed values from map.
Comment on lines
172
to
173
| # 'qdigest': QDIGEST, | ||
| # 'tdigest': TDIGEST, |
Member
There was a problem hiding this comment.
These two don't exist in SQLAlchemy as well.
Member
Author
There was a problem hiding this comment.
Let's still keep those in the map. It's useful to have it to show what types are mapped to what.
Note that some databases for example map their custom types to a custom SQLA type - we can do this too in future if we ever want to.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
A follow-up PR will come which adds more tests for MAP and ROW types and fixes some bugs that exist there.
Release notes
(x) This is not user-visible or docs only and no release notes are required.