Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/8374#discussion_r43359247
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala ---
@@ -82,6 +82,14 @@ abstract class JdbcDialect {
def getJDBCType(dt: DataType): Option[JdbcType] = None
/**
+ * Retrieve the jdbc / sql type for a given datatype.
+ * @param dt The datatype (e.g.
[[org.apache.spark.sql.types.StringType]])
+ * @param md The metadata
+ * @return The new JdbcType if there is an override for this DataType
+ */
+ def getJDBCType(dt: DataType, md: Metadata): Option[JdbcType] = None
--- End diff --
How about calling `getJDBCType(dt,Metadata.empty)` instead of `None` in
`getJDBCType(dt: DataType)`, because the classes that extends `JdbcDialect`
possibly implement one of them and then the behaviours of the two function
totally different?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]