Skip to content

Parse text TIME fractions without a double - #1773

Open
sharanggupta wants to merge 1 commit into
eclipse-vertx:masterfrom
sharanggupta:mysql-time-fraction-precision
Open

sharanggupta wants to merge 1 commit into
eclipse-vertx:masterfrom
sharanggupta:mysql-time-fraction-precision

Conversation

@sharanggupta

Copy link
Copy Markdown

The text protocol parses the fractional seconds of a TIME value through Double.parseDouble and truncates the product, so some values come back one nanosecond short: 11:12:00.000065 decodes to PT11H12M0.000064999S. The digits are now parsed as an integer and scaled to nanoseconds. The new test runs for both protocols; only the text one failed before.

Going through Double.parseDouble truncated some fractions by a
nanosecond, so '00:00:00.000065' decoded to 64999 ns.

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