spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pawel Skorupinski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-17646) SparkType::add method does not work in 2.0.0 (in Java)
Date Fri, 23 Sep 2016 16:17:22 GMT

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

Pawel Skorupinski commented on SPARK-17646:
-------------------------------------------

[~srowen] Correct. If this is an assumed behaviour, this ticket can be closed.

> SparkType::add method does not work in 2.0.0 (in Java)
> ------------------------------------------------------
>
>                 Key: SPARK-17646
>                 URL: https://issues.apache.org/jira/browse/SPARK-17646
>             Project: Spark
>          Issue Type: Bug
>          Components: Java API
>         Environment: spark-sql_2.11
> version 2.0.0
> Java 8
>            Reporter: Pawel Skorupinski
>            Priority: Minor
>
> Add methods do not work:
> StructType inputStructure = new StructType();
> inputStructure.add("b",new IntegerType(),false);
> inputStructure.add("a","string");
> System.err.println(inputStructure.sql());
> >> STRUCT<>
> System.err.println(inputStructure.length());
> >> 0
> Constructor is working:
> StructField [] structFields = new StructField[1];
> structFields[0] = new StructField("a",new StringType(),false,null);
> inputStructure = new StructType(structFields);
> System.err.println(inputStructure.sql());
> >> STRUCT<`a`: STRING>
> System.err.println(inputStructure.length());
> >> 1



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message