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

Fixes incremental reading of FlexSyms. #891

Merged

Conversation

tgregg
Copy link
Contributor

@tgregg tgregg commented Jun 26, 2024

Description of changes:
Before this PR, FlexSyms could not be read incrementally (i.e., without all bytes available up front) because the relevant methods did not distinguish between the signed integer value -1 and the -1 commonly used to convey that the end of the input has been reached. This PR fixes that defect by using Marker to store the FlexSym's value, and a boolean return to convey whether the end of input was reached.

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

@tgregg tgregg requested a review from popematt June 26, 2024 00:37
return consumer -> consumer.accept(new Expectation<>(
String.format("field(%d, %d)", expectedStartIndex, expectedEndIndex),
cursor -> {
//assertNotNull(cursor.fieldTextMarker.typeId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be uncommented or removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@tgregg tgregg force-pushed the cursor-read-tagless-reorder branch from bce90be to a6a6a37 Compare June 28, 2024 19:45
Base automatically changed from cursor-read-tagless-reorder to ion-11-encoding June 28, 2024 19:51
@tgregg tgregg force-pushed the cursor-read-tagless-reorder-flexsym-incremental branch from 9a4b970 to 5674e82 Compare June 28, 2024 19:54
@tgregg tgregg force-pushed the cursor-read-tagless-reorder-flexsym-incremental branch from 5674e82 to c985cf4 Compare June 28, 2024 19:56
@tgregg tgregg merged commit b4c8ad3 into ion-11-encoding Jun 28, 2024
16 of 17 checks passed
@tgregg tgregg deleted the cursor-read-tagless-reorder-flexsym-incremental branch June 28, 2024 19:56
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