Can you pastebin the full error with all column types ?

There should be a difference between some column(s).

Cheers

> On Feb 11, 2016, at 2:12 AM, Zsolt Tóth <toth.zsolt....@gmail.com> wrote:
> 
> Hi,
> 
> I'd like to append a column of a dataframe to another DF (using Spark 1.5.2):
> 
> DataFrame outputDF = unlabelledDF.withColumn("predicted_label", 
> predictedDF.col("predicted"));
> 
> I get the following exception:
> 
> java.lang.IllegalArgumentException: requirement failed: DataFrame must have 
> the same schema as the relation to which is inserted.
> DataFrame schema: StructType(StructField(predicted_label,DoubleType,true), 
> ...<other 700 numerical (ByteType/ShortType) columns>
> Relation schema: StructType(StructField(predicted_label,DoubleType,true), 
> ...<the same 700 columns>
> 
> The interesting part is that the two schemas in the exception are exactly the 
> same.
> The same code with other input data (with fewer, both numerical and 
> non-numerical column) succeeds.
> Any idea why this happens?
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to