sarutak commented on a change in pull request #31262:
URL: https://github.com/apache/spark/pull/31262#discussion_r561048913



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala
##########
@@ -306,19 +306,14 @@ object JdbcUtils extends Logging {
       }
       val metadata = new MetadataBuilder()
       // SPARK-33888
-      // - include scale in metadata for only DECIMAL & NUMERIC
       // - 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.TIME    => 
metadata.putBoolean("logical_time_type", true)
-        case _                      =>
-        // scalastyle:on
+      if (dataType == java.sql.Types.TIME) {
+        metadata.putBoolean("logical_time_type", true)
       }
+
       val columnType =
-        dialect.getCatalystType(dataType, typeName, fieldSize, 
metadata).getOrElse(

Review comment:
       For reviewers: This is the main change of this PR.
   `fieldScale` is passed to `getCatalystType` directly rather than done 
through `metadata`.
   




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

Reply via email to