Fokko commented on a change in pull request #26644: [SPARK-30004][SQL] Allow 
merge UserDefinedType into a native DataType
URL: https://github.com/apache/spark/pull/26644#discussion_r350672550
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/UserDefinedTypeSuite.scala
 ##########
 @@ -287,4 +293,63 @@ class UserDefinedTypeSuite extends QueryTest with 
SharedSparkSession with Parque
     checkAnswer(spark.createDataFrame(data, schema).selectExpr("typeof(a)"),
       Seq(Row("array<double>")))
   }
+
+  test("Allow merge UserDefinedType into a native DataType") {
 
 Review comment:
   Perfect, much cleaner. Thanks for suggesting.
   
   I'm pretty sure that it will fail without the fix. It will fail when it will 
write the second time. Since we've saved the `XMLGregorianCalendarImpl` as a 
timestamp (this is why we've overwritten the `jvalue`), Spark will recognize it 
as a regular timestamp. At then next append we're trying to merge an 
XMLGregorianCalendar into a timestamp, which isn't allowed with the additional 
rule. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to