-
Notifications
You must be signed in to change notification settings - Fork 168
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
Type mapping related improvements and refactoring #440
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one comment regarding removed values from map.
# 'qdigest': QDIGEST, | ||
# 'tdigest': TDIGEST, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two don't exist in SQLAlchemy as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for HyperLogLog types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just skimmed.
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.