Skip to content

[MSSQL] Decode SMALLMONEY with four decimal places - #1775

Merged
tsegismont merged 1 commit into
eclipse-vertx:masterfrom
sharanggupta:mssql-smallmoney-scale
Nov 12, 2026
Merged

tsegismont merged 1 commit into
eclipse-vertx:masterfrom
sharanggupta:mssql-smallmoney-scale

Conversation

@sharanggupta

Copy link
Copy Markdown
Contributor

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.

@vietj vietj added this to the 5.3.0 milestone Oct 29, 2026
@tsegismont tsegismont changed the title Decode SMALLMONEY with four decimal places [MSSQL] Decode SMALLMONEY with four decimal places Nov 12, 2026
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)
@tsegismont
tsegismont force-pushed the mssql-smallmoney-scale branch from bfdd805 to 4fc0f05 Compare November 12, 2026 15:16

@tsegismont tsegismont left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @sharanggupta

@tsegismont
tsegismont merged commit c78de45 into eclipse-vertx:master Nov 12, 2026
20 checks passed
tsegismont added a commit that referenced this pull request Nov 12, 2026
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.

Assisted-by: Anthropic Claude (claude-opus-5-5)


(cherry picked from commit c78de45)

Signed-off-by: Sharang Gupta <sharang@sharanggupta.dev>
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
Co-authored-by: Sharang Gupta <sharang@sharanggupta.dev>
tsegismont added a commit that referenced this pull request Nov 12, 2026
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.

Assisted-by: Anthropic Claude (claude-opus-5-5)


(cherry picked from commit c78de45)

Signed-off-by: Sharang Gupta <sharang@sharanggupta.dev>
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
Co-authored-by: Sharang Gupta <sharang@sharanggupta.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants