You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Pawel Skorupinski (JIRA)" <ji...@apache.org> on 2016/09/23 10:05:20 UTC
[jira] [Created] (SPARK-17646) SparkType::add method does not work
in 2.0.0 (in Java)
Pawel Skorupinski created SPARK-17646:
-----------------------------------------
Summary: 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