xuejianbest created SPARK-25108:
-----------------------------------

             Summary: Dataset.show() generates incorrect padding for Unicode 
Character
                 Key: SPARK-25108
                 URL: https://issues.apache.org/jira/browse/SPARK-25108
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 2.3.1, 2.3.0
         Environment: spark-shell on Xshell
            Reporter: xuejianbest


The Dataset.show() method generates incorrect space padding since column name 
or column value has Unicode Character.
{code:java}
val df = spark.createDataset(Seq(
"γύρος",
"pears",
"linguiça",
"xoriço",
"hamburger",
"éclair",
"smørbrød",
"spätzle",
"包子",
"jamón serrano",
"pêches",
"シュークリーム",
"막걸리",
"寿司",
"おもち",
"crème brûlée",
"fideuà",
"pâté",
"お好み焼き")).toDF("value")

before:
+-------------+
| value|
+-------------+
| γύρος|
| pears|
| linguiça|
| xoriço|
| hamburger|
| éclair|
| smørbrød|
| spätzle|
| 包子|
|jamón serrano|
| pêches|
| シュークリーム|
| 막걸리|
| 寿司|
| おもち|
| crème brûlée|
| fideuà|
| pâté|
| お好み焼き|
+-------------+

after fix:
+--------------+
| value|
+--------------+
| γύρος|
| pears|
| linguiça|
| xoriço|
| hamburger|
| éclair|
| smørbrød|
| spätzle|
| 包子|
| jamón serrano|
| pêches|
|シュークリーム|
| 막걸리|
| 寿司|
| おもち|
| crème brûlée|
| fideuà|
| pâté|
| お好み焼き|
+--------------+

{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to