cty123 commented on code in PR #52947:
URL: https://github.com/apache/spark/pull/52947#discussion_r2507332437
##########
sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/util/JdbcTypeUtils.scala:
##########
@@ -90,6 +96,7 @@ private[jdbc] object JdbcTypeUtils {
case DoubleType => 24
case StringType =>
getPrecision(field)
+ case DecimalType.Fixed(p, s) => p + (if (s == 0) 0 else 1)
Review Comment:
Update the logic for the edge cases, and added a few test cases to cover
them.
##########
sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/util/JdbcTypeUtils.scala:
##########
@@ -90,6 +96,7 @@ private[jdbc] object JdbcTypeUtils {
case DoubleType => 24
case StringType =>
getPrecision(field)
+ case DecimalType.Fixed(p, s) => p + (if (s == 0) 0 else 1)
Review Comment:
Updated the logic for the edge cases, and added a few test cases to cover
them.
--
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]