Do not convert to string when skipping unused fields. #203
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.
Hi. This is reopening of #198, but with just one of the two commits. Turns out that this is still needed for the suggested solution to work.
If some fields are not required by serde, the
ByteRecord::deserialize
will attempt to skip them by callingnext_field
, which will fail if the skipped field is not valid utf-8. So instead lets skip unused fields usingnext_field_bytes
. This affects alsoStringRecord::deserialize
, but getting byte slice from string should have no cost. I didn't see any changes in the included benchmarks.