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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to