teeyog commented on a change in pull request #25287: 
[SPARK-28552][SQL]Identification of different dialects insensitive to case by 
JDBC URL prefix
URL: https://github.com/apache/spark/pull/25287#discussion_r339867825
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala
 ##########
 @@ -56,13 +57,26 @@ case class JdbcType(databaseTypeDefinition : String, 
jdbcNullType : Int)
  */
 @DeveloperApi
 abstract class JdbcDialect extends Serializable {
+  /**
+   * The tag of the database, it must be lowercase, the subsequent will match
+   * the corresponding dialect through this tag, so it must be strictly 
one-to-one
+   * correspondence with jdbc url,such as:
+   * mysql  url:  jdbc:mysql://localhost/db  dbTag: mysql
+   * oracle url:  jdbc:oracle://localhost/db dbTag: oracle
+   * db2    url:  jdbc:db2://localhost/db    dbTag: db2
+   * ......
+   */
+  def dbTag: String
 
 Review comment:
   Not lowercase is not standard, but the uppercase url can read data correctly 
from mysql, I think it needs to be compatible here.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to