Skip to content

Decode SMALLMONEY with four decimal places - #1775

Open
sharanggupta wants to merge 1 commit into
eclipse-vertx:masterfrom
sharanggupta:mssql-smallmoney-scale
Open

sharanggupta wants to merge 1 commit into
eclipse-vertx:masterfrom
sharanggupta:mssql-smallmoney-scale

Conversation

@sharanggupta

Copy link
Copy Markdown

SMALLMONEY is stored in ten-thousandths, but the decoder rounds it up to two decimals, so 214748.3647 is returned as 214748.37 and 0.0001 as 0.01. It now uses four decimals like MONEY, which changes the scale of returned values (12.34 becomes 12.3400); the tests expecting two decimals are updated. Verified against the SQL Server engine (Azure SQL Edge, as the amd64 image does not run on this ARM machine) with the module's init.sql: all data type tests pass apart from the JSON ones, which need SQL Server 2025.

SMALLMONEY is stored in ten-thousandths, but the decoder rounded it up
to two decimals, so 214748.3647 was returned as 214748.37. MONEY
already uses four.

Signed-off-by: Sharang Gupta <sharang@sharanggupta.dev>
Assisted-by: Anthropic Claude (claude-opus-5-5)
@vietj vietj added this to the 5.3.0 milestone Oct 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants