saikocat commented on a change in pull request #31252:
URL: https://github.com/apache/spark/pull/31252#discussion_r560731834
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala
##########
@@ -306,13 +306,14 @@ object JdbcUtils extends Logging {
}
val metadata = new MetadataBuilder()
// SPARK-33888
- // - include scale in metadata for only DECIMAL & NUMERIC
+ // - include scale in metadata for only DECIMAL & NUMERIC as well as
ARRAY (for Postgres)
// - include TIME type metadata
// - always build the metadata
dataType match {
// scalastyle:off
case java.sql.Types.NUMERIC => metadata.putLong("scale", fieldScale)
case java.sql.Types.DECIMAL => metadata.putLong("scale", fieldScale)
+ case java.sql.Types.ARRAY => metadata.putLong("scale", fieldScale)
// PostgresDialect.scala wants this information
Review comment:
I've explained a few more rationale regarding this change proposed by
@skestle in the comment below
https://github.com/apache/spark/pull/31252#discussion_r560730953
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]