Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat end-of-stream as a potential unstarted, incomplete value in StreamingRawReader #846

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

popematt
Copy link
Contributor

@popematt popematt commented Oct 29, 2024

Issue #, if available:

amazon-ion/ion-cli#162

Description of changes:

Updates the StreamingRawReader to treat end-of-stream as a potential (not yet started) incomplete value.
I have verified that this does actually fix the problem mentioned in amazon-ion/ion-cli#162.

This might be improved by separating the end-of-stream condition from the incomplete value condition so that we can find a way to discard the "non-value" data. That way we don't need to keep holding e.g. a 2000 word comment in memory just to read the next top-level value.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@popematt popematt force-pushed the input-fix-2 branch 2 times, most recently from 570b0f2 to 771ff07 Compare October 30, 2024 19:29
@popematt popematt marked this pull request as ready for review October 30, 2024 19:54
@popematt popematt requested a review from zslayton October 30, 2024 19:54
@popematt popematt merged commit 8a6a09d into amazon-ion:main Oct 30, 2024
26 of 27 checks passed
@popematt popematt deleted the input-fix-2 branch October 30, 2024 21:38
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