MaxGekk commented on a change in pull request #32970:
URL: https://github.com/apache/spark/pull/32970#discussion_r655130755



##########
File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveScriptTransformationSuite.scala
##########
@@ -546,14 +547,41 @@ class HiveScriptTransformationSuite extends 
BaseScriptTransformationSuite with T
             AttributeReference("a", DayTimeIntervalType())(),
             AttributeReference("b", DayTimeIntervalType())(),
             AttributeReference("c", DayTimeIntervalType())(),
-            // TODO(SPARK-35772): Check all year-month interval types in 
HiveInspectors tests
             AttributeReference("d", YearMonthIntervalType())()),
           child = child,
           ioschema = hiveIOSchema),
         df.select($"a", $"b", $"c", $"d").collect())
     }
   }
 
+  test("SPARK-35722: HiveInspectors supports all type of 
YearMonthIntervalType") {
+    assume(TestUtils.testCommandAvailable("/bin/bash"))
+    withTempView("v") {
+      val schema = StructType(Seq(
+        StructField("a", YearMonthIntervalType(YEAR, YEAR)),
+        StructField("b", YearMonthIntervalType(YEAR, MONTH)),
+        StructField("c", YearMonthIntervalType(MONTH, MONTH))
+      ))
+      val df = spark.createDataFrame(sparkContext.parallelize(Seq(
+        Row(Period.ofMonths(13), Period.ofMonths(13), Period.ofMonths(13))
+      )), schema)
+
+      df.show(10, 100)
+      df.printSchema

Review comment:
       Please, remove this.




-- 
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



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

Reply via email to