Repository navigation
fix(cpp): reject reader options that are not key=value - #942
Merged
Merged
Conversation
1 of 4 tasks
new_file_group_reader_with_options dropped any option without '=', so a C++ caller who wrote "hoodie.read.use.read_optimized.mode" without a value, or mistyped the separator, got a reader that silently ignored the option. Return an error naming the malformed option instead. This is a behavior change for C++ callers that relied on the drop. Signed-off-by: codope <sagarsumit09@gmail.com>
codope
force-pushed
the
cpp/strict-reader-options
branch
from
October 30, 2026 18:57
bc81f62 to
cedbc09
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #942 +/- ##
==========================================
- Coverage 90.97% 90.96% -0.01%
==========================================
Files 154 154
Lines 22078 22069 -9
==========================================
- Hits 20085 20075 -10
- Misses 1993 1994 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The doc comment on test_key_values_option_without_equals_is_error now describes what the test holds (an option without `=` is an error, and only the first `=` splits) instead of what the constructor did before.
Contributor
|
Thanks for the contribution! LGTM, with a minor revision pushed in the latest commit that rewords the |
yihua
enabled auto-merge (squash)
November 8, 2026 05:00
yihua
approved these changes
Nov 8, 2026
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.
Description
new_file_group_reader_with_optionsdropped any option without=, so a C++ caller who wrotehoodie.read.use.read_optimized.modewithout a value, or mistyped the separator, got a reader that silently ignored the option. It now throwsrust::Errornaming the malformed option; the header doc says so.Behavior change for C++ callers: an option without
=used to be dropped and is now an error. Split out of #767 at review so it shows up on its own in the release notes.Values may contain
=: only the first one splits (b=x=y→("b", "x=y")).How are the changes test-covered
Unit test on the
key=valueparser the constructor uses (malformed option is an error; a value containing=keeps it). The constructor itself can't be handed such an option from a Rust test, becauseCxxVector<CxxString>cannot be filled from Rust.