aaron-congo opened a new pull request, #53902:
URL: https://github.com/apache/spark/pull/53902

   ### What changes were proposed in this pull request?
   Add support for the 
[aws-advanced-jdbc-wrapper](https://github.com/aws/aws-advanced-jdbc-wrapper/blob/main/docs/using-the-jdbc-driver/UsingTheJdbcDriver.md#wrapper-protocol)
 URL protocols to MysqlDialect and PostgresDialect.
   
   
   ### Why are the changes needed?
   The 
[aws-advanced-jdbc-wrapper](https://github.com/aws/aws-advanced-jdbc-wrapper) 
is a wrapper driver for the existing community mysql and postgres drivers. It 
uses a slightly different URL protocol to ensure it is selected as the driver 
instead of the regular mysql and postgres drivers when desired. Because 
MySQLDialect and PostgresDialect do not recognize this protocol, they are not 
selected as the dialect despite the underlying connection being a MySQL or 
Postgres connection. Some users have reported issues due to this dialect 
mismatch, [see here for an 
example.](https://github.com/aws/aws-advanced-jdbc-wrapper/issues/1370)
   
   
   ### Does this PR introduce _any_ user-facing change?
   This PR adds Spark compatibility with the 
[aws-advanced-jdbc-wrapper](https://github.com/aws/aws-advanced-jdbc-wrapper). 
Before these changes, Spark could technically be used with the 
aws-advanced-jdbc-wrapper, but NoopDialect was being selected, resulting in 
some bugs such as unrecognized SQL type errors. After these changes, the 
correct dialects will be selected when using the aws-advanced-jdbc-wrapper, 
which solves these errors.
   
   ### How was this patch tested?
   Added some asserts to test "Default jdbc dialect registration" to verify 
that the correct dialect is being selected when "aws-wrapper" protocols are in 
use.
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to