cty123 commented on code in PR #52947:
URL: https://github.com/apache/spark/pull/52947#discussion_r2507331444


##########
sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/util/JdbcTypeUtils.scala:
##########
@@ -96,7 +96,12 @@ private[jdbc] object JdbcTypeUtils {
     case DoubleType => 24
     case StringType =>
       getPrecision(field)
-    case DecimalType.Fixed(p, s) => p + (if (s == 0) 0 else 1)
+    // precision + sign(+/-) + leading zero + decimal point, like DECIMAL(5,5) 
= -0.12345

Review Comment:
   I updated the comment to make it more clear that the bit is for negative 
sign.



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