You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2018/09/06 14:19:00 UTC

[jira] [Assigned] (SPARK-25108) Dataset.show() generates incorrect padding for Unicode Character

     [ https://issues.apache.org/jira/browse/SPARK-25108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen reassigned SPARK-25108:
---------------------------------

    Assignee: xuejianbest

> 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.0, 2.3.1
>         Environment: spark-shell on Xshell5
>            Reporter: xuejianbest
>            Assignee: xuejianbest
>            Priority: Critical
>             Fix For: 2.4.0
>
>         Attachments: show.bmp
>
>
> The Dataset.show() method generates incorrect space padding since column name or column value has Unicode Character.
> {code:scala}
> 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")
> df.show
> /*
> +-------------+
> | 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}
>  
> Before and after fix, see attached pictures please .
> ![show](https://issues.apache.org/jira/secure/attachment/12935462/show.bmp)



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org