[SPARK-57524][SQL] Correct SHOW TABLE EXTENDED property formatting#56587
Open
huangxiaopingRD wants to merge 1 commit into
Open
[SPARK-57524][SQL] Correct SHOW TABLE EXTENDED property formatting#56587huangxiaopingRD wants to merge 1 commit into
huangxiaopingRD wants to merge 1 commit into
Conversation
MaxGekk
reviewed
Jun 18, 2026
MaxGekk
left a comment
Member
There was a problem hiding this comment.
0 blocking, 2 non-blocking, 0 nits.
A correct, minimal bug fix. The root cause diagnosis is right: properties was collapsed into a single String by the early .mkString("[", ",", "]"), so the later properties.mkString(...) iterated that string character-by-character. Keeping it a List[String] until the final mkString is the right fix, and it matches the existing getTablePartitionDetails pattern in the same file.
Correctness (1)
ShowTablesSuiteBase.scala:424: no regression test pins this fix. The sharedreplace()helper masks the value wholesale (case s"Table Properties:$_" => "Table Properties: <table properties>"), so everyshow table extendedassertion compares the masked string — the pre-fix garbage output would have masked to the same<table properties>and passed, and a future regression would stay invisible too. Please add a v2ShowTablesSuitecase that creates a table withTBLPROPERTIES ('p1'='v1','p2'='v2')and asserts the unmaskedTable Properties: [p1=v1, p2=v2]line (or stop masking Table Properties for the v2 suite).
Suggestions (1)
ShowTablesExtendedExec.scala:105(pre-existing, out of scope): theif (!table.properties().isEmpty)guard tests the raw properties while the displayed list is filtered, so an all-reserved-properties table printsTable Properties: [].
PR description suggestions
- Document: "How was this patch tested?" is empty — please state whether a test was added (and if not, why).
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.
What changes were proposed in this pull request?
The purpose of this change is to fix how
SHOW TABLE EXTENDEDformats table properties for v2 tables.Why are the changes needed?
Fix a bug.Before this change, the code converted the redacted property entries into a single string too early, and the later
mkStringcall operated on that string character by character. As a result, theTable Propertiesoutput could be formatted incorrectly. This update keeps the properties as a list ofkey=valueentries until the final formatting step, so the command produces the expected bracketed, comma-separated property list.Does this PR introduce any user-facing change?
Yes.
Execute show table extended:
show table extended in paimon.dev_xxxlike 'test_show_table_extended';Before this PR, the output result is:

After this PR:

How was this patch tested?
Was this patch authored or co-authored using generative AI tooling?
No