sadikovi commented on code in PR #36726:
URL: https://github.com/apache/spark/pull/36726#discussion_r887638039


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala:
##########
@@ -150,6 +150,9 @@ object JdbcUtils extends Logging with SQLConfHelper {
       case StringType => Option(JdbcType("TEXT", java.sql.Types.CLOB))
       case BinaryType => Option(JdbcType("BLOB", java.sql.Types.BLOB))
       case TimestampType => Option(JdbcType("TIMESTAMP", 
java.sql.Types.TIMESTAMP))
+      // Most of the databases either don't support TIMESTAMP WITHOUT TIME 
ZONE or map it to
+      // TIMESTAMP type. This will be overwritten in dialects.
+      case TimestampNTZType => Option(JdbcType("TIMESTAMP", 
java.sql.Types.TIMESTAMP))

Review Comment:
   This is a common use case of treating TIMESTAMP as timestamp without time 
zone. JDBC dialects can override this setting if need be. For example, SQL 
Server uses DATETIME instead. I have verified that most of the jdbc data 
sources work fine with TIMESTAMP. 
   
   I am going to update the comment to elaborate in more detail.



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