-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-29246: Upgrade derby version to 10.17.1.0 #6116
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
Conversation
db0321f to
08617da
Compare
|
CC @zabetak , if you have bandwidth can you please review this? |
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.
The changes LGTM. One thing that I wanted to clarify is the distinction between derby and derbytools artifacts. Do we need both of them in the project? If the driver is now inside derbytools what does derby contain?
| public class DerbySQLConnectorProvider extends AbstractJDBCConnectorProvider { | ||
| private static Logger LOG = LoggerFactory.getLogger(DerbySQLConnectorProvider.class); | ||
|
|
||
| // private static final String DRIVER_CLASS = "org.apache.derby.jdbc.EmbeddedDriver".intern(); |
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.
nit: Drop the comment
If other changes are needed for the PR then we can also tackle this nit otherwise let's leave it as is. Having a full precommit run just for deleting a comment isn't worth it.
|
Following up on the question about |
Thanks for the review @zabetak , Regarding this question. But without this change the schema initialization fails as the https://github.com/apache/derby/blob/trunk/java/org.apache.derby.tools/org/apache/derby/jdbc/EmbeddedDriver.java looks for JDBCBoot class which is part of derby jar (The screenshot is without derby jar in classpath, only derbytools and derbyshared are present) |
In short, |
|
My interpretation of the Derby changes is that the |
|
Explicitly loading a driver (using |
let me check on this and will update the PR/comment accordingly. Thanks for your input. |
So I tried using AutoloadedDriver in my setup (without derbytools) and it is working nicely. I also replaced all the EmbeddedDriver with AutoloadedDriver in code as well and it's compiling/building well. I read about Service Provider Interface (SPI) and in (derby.jar) META-INF/services/java.sql.Driver contains So, i think we can do the following:
Let me know your thoughts on this: Aggarwal-Raghav@70f740e Will update PR accordingly |
|
I think that Aggarwal-Raghav@70f740e is in the right direction. I am OK with items 1 and 2 but slightly unsure about 3 (removing If possible let's tackle item 3 in a separate ticket/PR and do it in a more holistic way checking for other places where we load JDBC drivers explicitly. We should also verify that all supported drivers can be loaded automatically via the SPI mechanism. |
08617da to
3b73941
Compare
Sure, I have updated the PR and and updated the description "User-facing change" and filed HIVE-29258 for handling [3] |
|
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.
LGTM will merge soon! Please check if there is any of the doc in the Website that needs to be updated.
thanks for the review @zabetak . Yes there are few mention of EmbeddedDriver in Website. Will raise a pr for the same shortly. |
|
Raised apache/hive-site#67. Also, can we please add the following/similar line in the commit message: |






What changes were proposed in this pull request?
HIVE-29246, Upgrade derby version to 10.17.1.0
Derby project has done refactoring:
Why are the changes needed?
This will help with the CVE-2022-46337 and derby 10.17.1.0 uses JDK21, its inline with hive master branch
Does this PR introduce any user-facing change?
If users are using
org.apache.derby.jdbc.EmbeddedDriverthen they need to change the DriverName toorg.apache.derby.iapi.jdbc.AutoloadedDriverHow was this patch tested?
Local setup testing. Will see CI outcome