Minor JDBC driver improvements#6979
Merged
electrum merged 5 commits intoprestodb:masterfrom Feb 28, 2017
electrum:jdbc-driver
Merged
Minor JDBC driver improvements#6979electrum merged 5 commits intoprestodb:masterfrom electrum:jdbc-driver
electrum merged 5 commits intoprestodb:masterfrom
electrum:jdbc-driver
Conversation
ebd2
reviewed
Jan 3, 2017
Contributor
There was a problem hiding this comment.
2 minor comments/questions:
- Will this return 0 for every snapshot version when
getDatabaseMinorVersion()is called? If so, that seems like a pain for us or anybody doing testing. - For end users, it seems likely that the only reason you'd hit this is because the presto versioning scheme has radically changed and the driver version parsing code is out of date. It seems like a good bet that the user needs to update the driver. How about throwing an SQLException containing the full version string like "Driver version x.y could not parse server version string '%s'. Try updating the driver"
Please feel free to ignore if this is spec-compliant behavior as-is.
Contributor
Author
There was a problem hiding this comment.
- If the driver JAR is built from Maven, it will work correctly, since the snapshot JAR will have the correct manifest. I just tested this out (and fixed a bug). The version for snapshots is a bit weird -- it's the output of
git describe HEAD. So, for this branch on0.162-SNAPSHOT, the version is0.161-115-gea22394b5(and that depends on having fetched the tags to the local Git repo). Thus, you get 0/161 for major/minor, and the full string forgetDriverVersion(). - I considered that, but it will break for stuff like
presto.version=testversionthat we have in the developmentconfig.propertiesfile. I'd rather be conservative for now.
Contributor
Author
There was a problem hiding this comment.
I just realized my comment for #1 is actually about the JDBC driver version, not the server version. However, the answer is nearly the same. The server version is determined the same way, from the package manifest, unless explicitly overridden with presto.version.
Contributor
|
Looks basically reasonable to me % usability nit. Somebody who is more up to date with what is supported should probably look over those changes. |
The driver supports JDBC 4.2, which is part of Java SE 8.
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.
Fixes #6929