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

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16668433#comment-16668433 ] 

Apache Spark commented on SPARK-25883:
--------------------------------------

User 'gengliangwang' has created a pull request for this issue:
https://github.com/apache/spark/pull/22890

> 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
>            Priority: Minor
>
> 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