HeartSaVioR commented on a change in pull request #25830: [SPARK-29140][SQL] 
Handle parameters having "array" of javaType properly in HashAggregateExec
URL: https://github.com/apache/spark/pull/25830#discussion_r325908987
 
 

 ##########
 File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/AggregationQuerySuite.scala
 ##########
 @@ -1018,6 +1018,24 @@ abstract class AggregationQuerySuite extends QueryTest 
with SQLTestUtils with Te
     val agg2 = agg1.groupBy($"text").agg(sum($"avg_res"))
     checkAnswer(agg2, Row("a", BigDecimal("11.9999999994857142860000")))
   }
+
+  test("SPARK-29140: HashAggregateExec aggregating binary type doesn't break 
codegen compilation") {
+    val withDistinct = countDistinct($"c1")
+
+    val schema = new StructType().add("c1", BinaryType, nullable = true)
+    val schemaWithId = StructType(StructField("id", IntegerType, nullable = 
false) +: schema.fields)
 
 Review comment:
   Ah that's missed. I copied the test code from ObjectHashAggregateSuite (as 
the test actually failed there) and tried to minimize the code to reproduce and 
clean up, but missed this. Thanks for pointing out!

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to