stefanbuk-db commented on code in PR #46642:
URL: https://github.com/apache/spark/pull/46642#discussion_r1606922807


##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala:
##########
@@ -155,7 +162,8 @@ private case class PostgresDialect() extends JdbcDialect 
with SQLConfHelper {
       getJDBCType(et).map(_.databaseTypeDefinition)
         .orElse(JdbcUtils.getCommonJDBCType(et).map(_.databaseTypeDefinition))
         .map(typeName => JdbcType(s"$typeName[]", java.sql.Types.ARRAY))
-    case _ => None
+    case LongType => Some(JdbcType("BIGINT", Types.BIGINT))
+    case _ => JdbcUtils.getCommonJDBCType(dt)

Review Comment:
   Not sure if this is what you mean but in visitCast we have 
`getJDBCType(dataType).map(_.databaseTypeDefinition).getOrElse(dataType.typeName)`,
 so if we return None, `JdbcUtils.getCommonJDBCType` won't be called 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.

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

Reply via email to