Skip to content

Commit

Permalink
[GLUTEN-4831][VL] Support StructType in HashAggregate (#4832)
Browse files Browse the repository at this point in the history
  • Loading branch information
WangGuangxin authored Mar 7, 2024
1 parent 32b492d commit f9daf49
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1145,4 +1145,15 @@ class TestOperator extends VeloxWholeStageTransformerSuite {
|""".stripMargin
)(df => checkFallbackOperators(df, 0))
}

test("Support StructType in HashAggregate") {
runQueryAndCompare("""
|select s, count(1) from (
| select named_struct('id', cast(id as int),
| 'id_str', cast(id as string)) as s from range(100)
|) group by s
|""".stripMargin) {
checkOperatorMatch[HashAggregateExecTransformer]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ abstract class HashAggregateExecBaseTransformer(
true
case _: NumericType => true
case _: ArrayType => true
case _: StructType => true
case _: NullType => true
case _ => false
}
Expand Down

0 comments on commit f9daf49

Please sign in to comment.