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 2017/10/13 09:15:00 UTC

[jira] [Commented] (SPARK-22273) Fix key/value schema field names in HashMapGenerators.

    [ https://issues.apache.org/jira/browse/SPARK-22273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16203277#comment-16203277 ] 

Apache Spark commented on SPARK-22273:
--------------------------------------

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

> Fix key/value schema field names in HashMapGenerators.
> ------------------------------------------------------
>
>                 Key: SPARK-22273
>                 URL: https://issues.apache.org/jira/browse/SPARK-22273
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.1.1, 2.2.0
>            Reporter: Takuya Ueshin
>            Priority: Minor
>
> When fixing schema field names using escape characters with {{addReferenceMinorObj()}} at SPARK-18952, double-quotes around the names were remained and the names become something like {{"((java.lang.String) references\[1\])"}}.
> {code}
> /* 055 */     private int maxSteps = 2;
> /* 056 */     private int numRows = 0;
> /* 057 */     private org.apache.spark.sql.types.StructType keySchema = new org.apache.spark.sql.types.StructType().add("((java.lang.String) references[1])", org.apache.spark.sql.types.DataTypes.StringType);
> /* 058 */     private org.apache.spark.sql.types.StructType valueSchema = new org.apache.spark.sql.types.StructType().add("((java.lang.String) references[2])", org.apache.spark.sql.types.DataTypes.LongType);
> /* 059 */     private Object emptyVBase;
> {code}
> We should remove the double-quotes to refer the values in {{references}} properly:
> {code}
> /* 055 */     private int maxSteps = 2;
> /* 056 */     private int numRows = 0;
> /* 057 */     private org.apache.spark.sql.types.StructType keySchema = new org.apache.spark.sql.types.StructType().add(((java.lang.String) references[1]), org.apache.spark.sql.types.DataTypes.StringType);
> /* 058 */     private org.apache.spark.sql.types.StructType valueSchema = new org.apache.spark.sql.types.StructType().add(((java.lang.String) references[2]), org.apache.spark.sql.types.DataTypes.LongType);
> /* 059 */     private Object emptyVBase;
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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