Repository navigation
skdb: test high-precision FLOAT round-trip through the text protocol - #1710
Merged
Merged
Conversation
Adds unit_float_roundtrip.sql covering values that need more than 9 significant digits to round-trip (0.1+0.2, 17-digit literals), extreme magnitudes (max double, min normal, min subnormal), the fixed/scientific notation boundary, -0.0, and insert/select through a FLOAT column. The pre-Ryu 9-digit formatter lost digits on these. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> Co-Authored-By: Claude Opus 5.5 (Anthropic, via Mistral Vibe; thinking: high) <noreply@anthropic.com>
test_sql.sh runs every test/*.sql through skdb and diffs the output against sqlite3, whose float formatting differs from skdb's shortest round-trip form (e.g. 1e+308 vs 1.0e+308, 0.3 vs 0.30000000000000004), so the new unit_float_roundtrip.sql failed there. Move it under test/unit/, which only unit_tests.sh runs explicitly. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> Co-Authored-By: Claude Opus 5.5 (Anthropic, via Mistral Vibe; thinking: high) <noreply@anthropic.com>
mbouaziz
force-pushed
the
skdb-float-roundtrip
branch
from
November 19, 2026 12:05
e7fdfc9 to
12689ba
Compare
mbouaziz
enabled auto-merge
November 19, 2026 12:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
sql/test/unit/unit_float_roundtrip.sql+ aFLOAT ROUNDTRIPcheck insql/unit_tests.sh, pinning full round-trip precision of FLOAT values throughskdb's text protocol (SQL literal -> Float -> storage ->
Float.toString->parseFloatin JS -> print).Cases: values needing >9 significant digits (
0.1+0.2->0.30000000000000004, 17-digit literals), extreme magnitudes (max double1.7976931348623157e+308, min normal, min subnormal5.0e-324), thefixed/scientific notation boundary,
-0.0, and insert/select through aFLOAT column. The pre-Ryu 9-digit formatter lost digits on all of these.
The SQL lives under
test/unit/(nottest/) on purpose:test_sql.shruns every
test/*.sqlthrough skdb and diffs against sqlite3, whose floatformatting differs from skdb's shortest round-trip form (
1e+308vs1.0e+308,0.3vs0.30000000000000004), so a precision test cannot livein that glob.
Validation
--release --bin skdb) from this branch with the CI baseimage's toolchain in a container;
unit_float_roundtrip.sqloutput matchesthe
FLOAT ROUNDTRIPgrep exactly, and the file is no longer matched bytest/*.sql.(matches precedent).
Notes
trailer); validation performed in-session as described above.