Closed awal11 closed 5 years ago
Probably the best approach would be to always set the atttypemod in all queries in PgDatabaseMetaData to -1 as this is a value expected by class TypeInfoCache.
Awesome feedback! I think you are right that _unknownLength is the best solution since in fact is is unknown.
Should I create pull requests for the issues I encounter or you plan any major refactoring to the code and it does not make bigger sense?
Please take a look at the new CONTRIBUTING for the pull request
Before we can merge your changes, you need to sign a Contributor License Agreement. You only need to do this once. This license is for your protection as well as the protection of MarkLogic and its licensees. This Agreement does not otherwise change your rights to use your own Contributions for any other purpose.
I agree this is the correct fix. -1 (vs 0). case Oid.BIT: in TypeInfoCache is a special case for later. The query should be "-1 as atttypmod" to match the typmod handling in TypeInfoCache. Please try to become a contributor. And thank you very much for continuing to move these issues forward.
I have sent the CLA to the indicated email address On Tue, 5 Feb 2019 at 01:52, bobstarbird notifications@github.com wrote:
I agree this is the correct fix. -1 (vs 0). case Oid.BIT: in TypeInfoCache is a special case for later. The query should be "-1 as atttypmod" to match the typmod handling in TypeInfoCache. Please try to become a contributor.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/marklogic-community/ml-jdbc-driver/issues/1#issuecomment-460472921, or mute the thread https://github.com/notifications/unsubscribe-auth/AGQQxLA0dc0BRTAmu28qr7Jx_eYHxV9yks5vKNW4gaJpZM4Z3X3z .
I am trying to use the driver together with PrestoDB. Presto needs to analyze the metadata returned by ML jdbc driver and I encountered few issues, this would be the first of them.
The metadata for VARCHAR set the columnSize to value -4 - I think this is happening because:
To address this issue I would suggest either
I can create a pull request for the latter case for PgDatabaseMetaData class if you support this solution