You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2018/11/16 00:36:00 UTC

[jira] [Updated] (SPARK-25883) Override method `prettyName` in `from_avro`/`to_avro`

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

Hyukjin Kwon updated SPARK-25883:
---------------------------------
    Fix Version/s: 2.4.1

> Override method `prettyName` in `from_avro`/`to_avro`
> -----------------------------------------------------
>
>                 Key: SPARK-25883
>                 URL: https://issues.apache.org/jira/browse/SPARK-25883
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Gengliang Wang
>            Assignee: Gengliang Wang
>            Priority: Minor
>             Fix For: 2.4.1, 3.0.0
>
>
> Previously in from_avro/to_avro, we override the method `simpleString` and `sql` for the string output. However, the override only affects the alias naming:
> ```
> Project [from_avro('col, 
> ...
>     , (mode,PERMISSIVE)) AS from_avro(col, struct<col1:bigint,col2:double>, Map(mode -> PERMISSIVE))#11]
> ```
> It only makes the alias name quite long.
> We should follow `from_csv`/`from_json` here, to override the method prettyName only,  and we will get a clean alias name
> ```
> ... AS from_avro(col)#11
> ```



--
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