Skip to content

[SPARK-51034][SQL] Reformat Describe As JSON statistics dict for parse-ability #49728

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

Closed
wants to merge 6 commits into from

Conversation

asl3
Copy link
Contributor

@asl3 asl3 commented Jan 29, 2025

What changes were proposed in this pull request?

Reformat Describe As JSON statistics table metadata into a dict rather than string for improved parse-ability

Why are the changes needed?

Existing Describe formats table statistics into a string xxx bytes, xxx rows which is not conducive to parsing. This PR stores the table statistics metadata in raw format and delegates the formatting to the caller of toJsonLinkedHashmap, for improved parsing of the JSON statistics.

Does this PR introduce any user-facing change?

Yes, it affects the output of Describe As JSON.

How was this patch tested?

Added to test suite DescribeTableSuite

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the SQL label Jan 29, 2025
@cloud-fan
Copy link
Contributor

thanks, merging to master/4.0!

@cloud-fan cloud-fan closed this in 9d6fb58 Feb 4, 2025
cloud-fan pushed a commit that referenced this pull request Feb 4, 2025
…e-ability

### What changes were proposed in this pull request?

Reformat `Describe As JSON` statistics table metadata into a dict rather than string for improved parse-ability

### Why are the changes needed?

Existing `Describe` formats table statistics into a string `xxx bytes, xxx rows` which is not conducive to parsing. This PR stores the table statistics metadata in raw format and delegates the formatting to the caller of toJsonLinkedHashmap, for improved parsing of the JSON statistics.

### Does this PR introduce _any_ user-facing change?

Yes, it affects the output of `Describe As JSON`.

### How was this patch tested?

Added to test suite `DescribeTableSuite`

### Was this patch authored or co-authored using generative AI tooling?

No

Closes #49728 from asl3/asl3/describetable-statistics.

Authored-by: Amanda Liu <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit 9d6fb58)
Signed-off-by: Wenchen Fan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants