cloud-fan commented on code in PR #44538:
URL: https://github.com/apache/spark/pull/44538#discussion_r1440557569


##########
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/ObjectHashAggregateSuite.scala:
##########
@@ -457,4 +458,31 @@ class ObjectHashAggregateSuite
       )
     }
   }
+
+  test("SPARK-46536 Support GROUP BY CalendarIntervalType") {
+    withSQLConf(
+      SQLConf.USE_OBJECT_HASH_AGG.key -> "true",
+      SQLConf.OBJECT_AGG_SORT_BASED_FALLBACK_THRESHOLD.key -> "1"
+    ) {
+      val numRows = 50
+
+      assert(
+        (1 to numRows)
+          .map(_ => Tuple1(new CalendarInterval(1, 2, 3)))
+          .toDF("c0")
+          .groupBy("c0")
+          .agg(count("*"))

Review Comment:
   This isn't clear to me that we end up with object hash aggregate. Can you 
verify it with `.explain(true)`?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to