You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/06/23 02:32:29 UTC

[GitHub] [spark] AngersZhuuuu commented on a change in pull request #32993: [SPARK-35776][SQL] Check all year-month interval types in arrow

AngersZhuuuu commented on a change in pull request #32993:
URL: https://github.com/apache/spark/pull/32993#discussion_r656714382



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/arrow/ArrowWriterSuite.scala
##########
@@ -30,7 +30,11 @@ class ArrowWriterSuite extends SparkFunSuite {
 
   test("simple") {
     def check(dt: DataType, data: Seq[Any], timeZoneId: String = null): Unit = {
-      val schema = new StructType().add("value", dt, nullable = true)
+      val avroDatatype = dt match {
+        case _: YearMonthIntervalType => YearMonthIntervalType()

Review comment:
       > Sorry, I didn't get this. Do you always test only `YearMonthIntervalType()`?
   
   We can write different field of YearMonthIntervalType tp arrow, but in arrow's type it only support year_to_month
   ![image](https://user-images.githubusercontent.com/46485123/123025989-09901400-d40e-11eb-8581-5e9dfe4f9a33.png)
   And the IntervalUnit only support year_to_month, 
   ![image](https://user-images.githubusercontent.com/46485123/123026045-20cf0180-d40e-11eb-940c-24ab76aa9a79.png)
   
   So when we read data from Arrow, it only can be default YearMonthIntervalType()




-- 
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:
users@infra.apache.org



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