-
Notifications
You must be signed in to change notification settings - Fork 176
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
Row.decode(…) fails for enum type with IllegalArgumentException: 72093 is not a valid object id #301
Comments
@mp911de I would like to claim this issue. I have the the repository locally set up and I'm able to run the tests. Can you please point me in the right direction to mocking As user, calling Row.get(…)? |
You're welcome @AlbertMMM. I would suggest starting with a test for Let us know if you need any further details. |
Since the submitted pull request had to be closed due to inactivity, this ticket is up for grabs again. |
Hi, I would like to give it a shot. |
You're welcome @govi20. |
@mp911de Thanks, Mark. How do I test it? could you please explain so that I can write test cases. |
Take a look at an earlier comment: #301 (comment). Let me know if that helps or your need further guidance. Happy to help. |
…om type. [resolves pgjdbc#301]
Hi, I just raise a pr based on the conversion, can you please have a look? |
Hi! I have same issue using HStore data type. Both AbstractTemporalCodec and AbstractNumericCodec need to return false instead throwing an exception. |
@mp911de sure thing! let me close my pr first, and looking for others issues. |
Let's wait for a response from @govi20 before we proceed. |
Hello All, there is same bug in |
Thanks for pointing it out. Fixed it locally. @mp911de Should I push it on the same branch? |
Yes, please. Please also note that I'll be back on Aug 31. |
Hi, this is a
first-timers-only
issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before or even folks who haven't contributed to open source before.If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open-source software!
If you have contributed before, consider leaving this one for someone new, and looking through our general
ideal-for-contribution
issues. Thanks!Problem
AbstractTemporalCodec.canDecode
fails as it tries to create aPostgresqlObjectId
to verify whether it can decode a timestamp. OID72093
is a custom type that isn't known byPostgresqlObjectId
andAbstractTemporalCodec.canDecode
should not fail, it should rather report that it cannot decode the value by returningfalse
.As user, calling
Row.get(…)
leads to:Solution
AbstractTemporalCodec.canDecode(…)
should make use ofPostgresqlObjectId.isValid(dataType)
before looking up the default type fromPostgresqlObjectId
. Other codecs such asAbstractCodec
are performing the check correctly.Steps to Fix
The text was updated successfully, but these errors were encountered: