Repository navigation
Conversation
…operty JsonOutput.describe_refs() emitted a separate JSON object for every retention property of a snapshot reference. Merge the retention properties into a single object per reference, consistent with ConsoleOutput which renders one row per reference. Add regression tests covering a single reference with multiple retention properties and multiple references. Generated-by: Instinct (AI-assisted) Closes apache#4098
This branch has not been deployed
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.
Closes #4098
Rationale for this change
JsonOutput.describe_refs()emitted one JSON object per retention property instead of one per snapshot reference, sopyiceberg --output=json list-refscould return three objects for a table with a single ref. This merges the retention properties into a single object per reference, consistent withConsoleOutput, which renders one row per reference.Are these changes tested?
Yes. Two new regression tests in
tests/cli/test_output.py: one ref with multiple retention properties, and multiple refs including one with no retention properties. Both fail without the fix; the fulltests/cli/suite (103 tests) passes.Are there any user-facing changes?
Yes. The JSON output of
list-refschanges shape: one object per ref instead of one object per retention property. This matches the expected output described in #4098.AI disclosure: this PR was prepared with AI assistance; the commit carries a
Generated-bynote in line with the ASF guidance on generated contributions.