Add aws-java-sdk-core as runtime dependency for Redshift JDBC driver#25265
Conversation
|
|
a549ce6 to
4d667bd
Compare
Redshift JDBC driver internally use com.amazonaws.util.StringUtils at runtime. So added scope of runtime. |
imjalpreet
left a comment
There was a problem hiding this comment.
Minor comment, otherwise LGTM.
If possible, could you attach a screenshot of a successful query to Redshift after adding this fix?
presto-redshift/pom.xml
Outdated
| <dependencyManagement> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.amazonaws</groupId> | ||
| <artifactId>aws-java-sdk-bom</artifactId> | ||
| <version>1.12.782</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| </dependencies> | ||
| </dependencyManagement> |
There was a problem hiding this comment.
We don't need this, aws-java-sdk-core is already included in the root POM.
Lines 1760 to 1778 in 91a8685
|
Thanks for the release note! Just a nit. Should this entry be in |
|
@imjalpreet Correct, aws-java-sdk-core is already included in root pom.xml
I think, Root
|
Correct. Updated |
imjalpreet
left a comment
There was a problem hiding this comment.
Scenario-1: Removing aws-java-sdk-core from presto-redshift/pom.xml causes a runtime error:
Query failed: com/amazonaws/util/StringUtils
I think, Root pom.xml defines it, but not for plugin packaging:
The presto-redshift module produces a plugin (presto-plugin), which requires all needed runtime dependencies to be included explicitly in its own module, even if they exist in the parent pom.xml.
We need to keep the dependency in presto-redshift pom.xml, my comment was about removing the DependencyManagement section, as we don't need it.
removed dep manag from redshift pom
c561715 to
b837afc
Compare
@imjalpreet Done |
|
@ethanyzhang imported this issue as lakehouse/presto #25265 |


Description
Git Issue: #25247
Amazon Redshift JDBC driver version 2.1.0.32 internally depends on com.amazonaws.util.StringUtils class from the AWS SDK v1.
This com.amazonaws.util.StringUtils class is not bundled inside the Redshift JDBC driver jar, and it must be available on the classpath.
Added aws-java-sdk-core as a runtime dependency to resolve this issue.
Motivation and Context
The Presto Redshift connector fails with a NoClassDefFoundError during table operations like CREATE TABLE because it tries to invoke a metadata function that uses this class.
Impact
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.