Skip to content

Commit c90e41f

Browse files
committed
[SPARK-43063][SQL][FOLLOWUP] Add ToPrettyString expression for Dataset.show
### What changes were proposed in this pull request? This is a followup of apache#40699 to avoid changing the Cast behavior. It pulls out the cast-to-string code into a base trait, and add a new Expression `ToPrettyString` to extend this trait with a little customization. It also handles binary value inside array/struct/map to also print hex format, for `df.show` only, not `Cast`. ### Why are the changes needed? avoid behavior change ### Does this PR introduce _any_ user-facing change? change back the behavior of casting array/map/struct to string regarding null elements. It was `null`, then changed to `NULL` in apache#40699 , and is `null` again after this PR. ### How was this patch tested? existing tests Closes apache#40922 from cloud-fan/pretty. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
1 parent a2ae89e commit c90e41f

File tree

6 files changed

+519
-380
lines changed

6 files changed

+519
-380
lines changed

0 commit comments

Comments
 (0)