Skip to content

Conversation

@yaooqinn
Copy link
Member

What changes were proposed in this pull request?

This PR abbreviated the header/schema row for the show function to align the value rows

scala> spark.sql("select INTERVAL '10000' MONTH").show

+----------------------+
|INTERVAL '10000' MONTH|
+----------------------+
|  INTERVAL '10000' ...|
+----------------------+
scala> spark.sql("select typeof(INTERVAL '2021-07' YEAR TO MONTH)").show
+---------------------------------------+
|typeof(INTERVAL '2021-7' YEAR TO MONTH)|
+---------------------------------------+
|                   interval year to ...|
+---------------------------------------+


scala> spark.sql("select typeof(INTERVAL '2021-07' YEAR TO MONTH)").show(20, false)
+---------------------------------------+
|typeof(INTERVAL '2021-7' YEAR TO MONTH)|
+---------------------------------------+
|interval year to month                 |
+---------------------------------------+

Why are the changes needed?

Fix display issue when schema with long names

Does this PR introduce any user-facing change?

yes, but we have function parameters and configs to restore

How was this patch tested?

new tests

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

no

Copy link
Contributor

@allisonwang-db allisonwang-db left a comment

Choose a reason for hiding this comment

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

This might be useful, but I think this is a very big behavior change. Can we add a flag for this and disable it by default?

@yaooqinn
Copy link
Member Author

Thank you @allisonwang-db for your advice.

The behavior change is limited in the scope of our REPLs, does it sound overdesign to add a configuration for df.show() -> df.show(false)?

@zhengruifeng
Copy link
Contributor

Instead of a configuration, what about a new parameter in dataframe.show()?
also cc @cloud-fan and @HyukjinKwon

@github-actions
Copy link

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Oct 10, 2024
@github-actions github-actions bot closed this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants