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

Allows symbol table boundaries to be preserved when converting from Ion 1.0 to Ion 1.1. #64

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

tgregg
Copy link
Contributor

@tgregg tgregg commented Jun 5, 2024

Issue #, if available:

Fixes #62

Description of changes:

This allows more direct performance comparisons between Ion 1.0 and Ion 1.1. Note: ion-java's 1.1 writer needs to flush upon encountering a system value in order to achieve comparable performance to the Ion 1.0 writer (see amazon-ion/ion-java#873).


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 5, 2024 20:53
@@ -419,8 +447,9 @@ static void rewriteIonFile(Path input, Path output, OptionsCombinationBase optio
options.importsForInputFile == null &&
options.importsForBenchmarkFile == null &&
options.format == Format.ION_BINARY &&
options.ionMinorVersion != 1 && // TODO remove once support for writing system values via the Ion 1.1 writer is added.
IonUtilities.minorVersionsEqual(options.ionMinorVersion, input.toFile())
// Minor versions may add new kinds of system values, so it is not possible to maintain system value
Copy link

Choose a reason for hiding this comment

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

Minor versions could also add new symbols to the system symbol table. Do we need to account for that somehow to make sure that the transcoded SIDs still point to the correct text?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oof, yeah... looking into whether this is feasible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Proposed update to ion-java to enable this here: amazon-ion/ion-java#876
And I updated this PR to perform the transcoding. We'll have to make a minor update to ion-java once the 1.1 system symbol table is finalized.

@tgregg tgregg merged commit da4c3d7 into ion-1-1 Jun 7, 2024
@tgregg tgregg deleted the ion-1-1-preserve-symbol-table-boundaries branch June 7, 2024 23:16
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