scan_start_time: float -> double - #18
Merged
Merged
Conversation
Should actually be float64. See: HUPO-PSI/mzPeak-specification#22
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
okohlbacher
added a commit
to okohlbacher/mzpeak-openms
that referenced
this pull request
Sep 12, 2026
… write The specification example schema moved scan_start_time from float32 to double in spec d0c16b3, following the same change upstream made in PR OpenMS#18. Two sites here were still pinned to the narrower width. On READ the column was fetched through opt_float, which narrows to float32 before the caller widens it back to double for the x60 conversion to seconds. Reading a file that stores the column as double therefore discarded precision for no reason -- exactly the precision the upstream change set out to keep. opt_double is already width-agnostic (it dispatches on the Arrow type and accepts DOUBLE, FLOAT and the integer widths), so switching to it is a no-op on a float32 column -- widening a value that came from float32 is exact -- and lossless on a float64 one. The two earliest_scan maps widen to match. On WRITE both scans facets emitted arrow::float32(). They now emit arrow::float64(), which is what the specification prefers and what the reference writer produces. Verified rather than assumed: the archive written by scripts/e2e.sh now carries scan_start_time as `double`, and T2 confirms the Rust reference still reads it. The comments claiming "scan_start_time is float32 while spectrum.time is float64" are corrected; that premise no longer holds. The agreement tolerance deliberately stays at float32 scale, because the specification only prefers double and a conformant file may still store either column narrow. 40/40 in debug, release and tsan; scripts/e2e.sh green with T2 and T5 PASS. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Should actually be float64.
See: HUPO-PSI/mzPeak-specification#22