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.
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
DBZ-1413 Support PostgreSQL Domain and Enum types #1079
DBZ-1413 Support PostgreSQL Domain and Enum types #1079
Changes from 2 commits
d5d0aa5
774f2ed
222fdf9
c788b47
3efef48
36e1b06
ad97bd3
630c849
a9a39a5
9f43d96
4389c16
53939f8
c0482ff
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
What is a "base type"? Can you clarify in the JavaDoc?
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.
In the recent commits, I decided to expand on this with the notion that a
PostgresType
has both a base type, which is documented but also allows for fetching a type's root type, the top most type in the type hierarchy. This proved nice to abstract the iterative nature away where we needed this as part of the type.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 avoid such empty comments. But could you add one to the method in the base class, describing its purpose?
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.
By moving associating the right jdbc type and native type to a column at construction time, these
Types.DISTINCT
specific handler methods were removed as they're no longer needed.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.
Hum, this side-effect of the
get...
method is unexpected. Could this be moved to the construction time?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.
Quite possibly, I'll look and let you know my findings.
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.
Another option I explored as well was to instead make a small change to
JdbcValueConverters
where we move what the switch statements are based upon to a method argument and then delegate to those as needed, e.g.This allows
PostgresValueConverter
to actually call those new resolve methods directly and rather than create a newColumn
instance solely for the sake of controlling the switch argument, we can instead change those methods like so:I am still going to test your suggestion with Column construction to be sure there are no side in the event you don't particularly care for all this method delegation here.
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.
I decided to go with your construction approach as it seemed to solve all the corner nuances without introducing any additional side effects.