cloud-fan commented on PR #53902:
URL: https://github.com/apache/spark/pull/53902#issuecomment-4848937326

   The problem of option A is we don't really know if it's correct. AWS claims 
that `"jdbc:aws-wrapper:mysql"` should be exactly the same dialect of vanilla 
mysql, but other vendors may not, it's risky to blindly assume 
`"jdbc:(.*:)?mysql.*"` is the same as mysql dialect.
   
   I think the core problem is for users to easily reuse the code of builtin 
dialects. You are right that case class can not be extended, how about we add a 
delegate dialect for easy reuse? The idea is similar to 
https://github.com/apache/spark/blob/master/sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/DelegatingCatalogExtension.java
 
   ```
   case class AuroraMySQLDialect extends DelegatingDialect {
     def delegate = MySQLDialect() // builtin dialects should be public classes
   
     override def canHandle = ... 
   }
   ``` 


-- 
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