-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stored procedure call returns wrong BigDecimal scale. #2559
base: main
Are you sure you want to change the base?
Conversation
Set scale value dynamically for DECIMAL output parameters in registerOutParameter method. This change retrieves the scale from the ParameterMetaData and applies it to the DECIMAL output parameter. This provides a more flexible approach for handling DECIMAL data types. As an alternative, users can directly call registerOutParameter(index, sqlType, scale) to specify the scale explicitly.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2559 +/- ##
============================================
+ Coverage 50.99% 51.10% +0.11%
- Complexity 3911 3927 +16
============================================
Files 147 147
Lines 33456 33463 +7
Branches 5604 5605 +1
============================================
+ Hits 17060 17102 +42
+ Misses 13992 13964 -28
+ Partials 2404 2397 -7 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let us also add a test that resembles the two customer reported scenarios
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerCallableStatement.java
Outdated
Show resolved
Hide resolved
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerCallableStatement.java
Outdated
Show resolved
Hide resolved
src/test/java/com/microsoft/sqlserver/jdbc/unit/statement/StatementTest.java
Outdated
Show resolved
Hide resolved
pinged you about an internal test fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this failed tests in internal test lab
src/test/java/com/microsoft/sqlserver/jdbc/unit/statement/BigDecimalPrecisionTest.java
Show resolved
Hide resolved
There should be significant comments in code, so that a new person can understand the code. |
#2534 - Set scale value dynamically for DECIMAL output parameters in registerOutParameter method.
This change retrieves the scale from the ParameterMetaData and applies it to the DECIMAL output parameter. This provides a more flexible approach for handling DECIMAL data types.
As an alternative, users can directly call registerOutParameter(index, sqlType, scale) to specify the scale explicitly.