Skip to content
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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

Ananya2
Copy link
Contributor

@Ananya2 Ananya2 commented Dec 6, 2024

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

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.
@Ananya2 Ananya2 changed the title Stored procedure call returns wrong BigDecimal scale. Stored procedure call returns wrong BigDecimal scale. https://github.com/microsoft/mssql-jdbc/issues/2534 Dec 6, 2024
@Ananya2 Ananya2 changed the title Stored procedure call returns wrong BigDecimal scale. https://github.com/microsoft/mssql-jdbc/issues/2534 Stored procedure call returns wrong BigDecimal scale. Dec 6, 2024
@Jeffery-Wasty Jeffery-Wasty linked an issue Dec 6, 2024 that may be closed by this pull request
Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 51.06%. Comparing base (ae462f9) to head (222dddc).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...oft/sqlserver/jdbc/SQLServerCallableStatement.java 57.14% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2559      +/-   ##
============================================
+ Coverage     50.99%   51.06%   +0.07%     
- Complexity     3911     3920       +9     
============================================
  Files           147      147              
  Lines         33456    33463       +7     
  Branches       5604     5605       +1     
============================================
+ Hits          17060    17088      +28     
+ Misses        13992    13966      -26     
- Partials       2404     2409       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Ananya2 Ananya2 self-assigned this Dec 7, 2024
Copy link
Contributor

@machavan machavan left a 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

@Ananya2 Ananya2 requested review from machavan and divang December 9, 2024 11:51
@Ananya2 Ananya2 requested a review from lilgreenbird December 9, 2024 17:06
@Jeffery-Wasty Jeffery-Wasty added this to the 12.11.0 milestone Dec 9, 2024
@tkyc
Copy link
Member

tkyc commented Dec 9, 2024

pinged you about an internal test fail

Copy link
Contributor

@lilgreenbird lilgreenbird left a 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

@Ananya2 Ananya2 requested review from tkyc and lilgreenbird December 10, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

Stored procedure call return wrong BigDecimal scale.
6 participants