603a7fd7b6
### What changes were proposed in this pull request? Similar to SPARK-33690, this PR improves the output layout of `printSchema` for the case column names contain meta characters. Here is an example. Before: ``` scala> val df1 = spark.sql("SELECT 'aaa\nbbb\tccc\rddd\feee\bfff\u000Bggg\u0007hhh'") scala> df1.printSchema root |-- aaa ddd ccc eefff ggghhh: string (nullable = false) ``` After: ``` scala> df1.printSchema root |-- aaa\nbbb\tccc\rddd\feee\bfff\vggg\ahhh: string (nullable = false) ``` ### Why are the changes needed? To avoid breaking the layout of `Dataset#printSchema` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? New test. Closes #31412 from sarutak/escape-meta-printSchema. Authored-by: Kousuke Saruta <sarutak@oss.nttdata.com> Signed-off-by: HyukjinKwon <gurwls223@apache.org> |
||
---|---|---|
.. | ||
benchmarks | ||
src | ||
pom.xml |