yaooqinn commented on code in PR #45418: URL: https://github.com/apache/spark/pull/45418#discussion_r1517155629
########## sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala: ########## @@ -87,17 +87,26 @@ abstract class JdbcDialect extends Serializable with Logging { */ def canHandle(url : String): Boolean + @deprecated("Implement getCatalystType with isTimestampNTZ instead", "4.0.0") + def getCatalystType( + sqlType: Int, typeName: String, size: Int, md: MetadataBuilder): Option[DataType] = None + /** * Get the custom datatype mapping for the given jdbc meta information. * @param sqlType The sql type (see java.sql.Types) * @param typeName The sql type name (e.g. "BIGINT UNSIGNED") * @param size The size of the type. * @param md Result metadata associated with this type. + * @param isTimestampNTZ Use TIMESTAMP_NTZ type or not. * @return The actual DataType (subclasses of [[org.apache.spark.sql.types.DataType]]) * or null if the default type mapping should be used. */ def getCatalystType( - sqlType: Int, typeName: String, size: Int, md: MetadataBuilder): Option[DataType] = None + sqlType: Int, + typeName: String, + size: Int, + md: MetadataBuilder, + isTimestampNTZ: Boolean): Option[DataType] = getCatalystType(sqlType, typeName, size, md) Review Comment: Indeed, the precision is in the method parameters, and the scale is in the meta:) -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org