Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/20277#discussion_r162536737
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/VectorizedHashMapGenerator.scala
---
@@ -127,8 +127,14 @@ class VectorizedHashMapGenerator(
def genEqualsForKeys(groupingKeys: Seq[Buffer]): String = {
groupingKeys.zipWithIndex.map { case (key: Buffer, ordinal: Int) =>
- s"""(${ctx.genEqual(key.dataType,
ctx.getValue(s"vectors[$ordinal]", "buckets[idx]",
- key.dataType), key.name)})"""
+ // `ColumnVector.getStruct` is different from
`InternalRow.getStruct`, it only takes an
+ // `ordinal` parameter.
+ val value = if (key.dataType.isInstanceOf[StructType]) {
+ s"vectors[$ordinal].getStruct(buckets[idx])"
+ } else {
+ ctx.getValue(s"vectors[$ordinal]", "buckets[idx]", key.dataType)
--- End diff --
ditto.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]