Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
snuyanzin committed Feb 29, 2024
1 parent f262641 commit dc9aeb6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ class ImperativeAggCodeGen(
needEmitValue: Boolean = false): Unit = {

val functionName = String.valueOf(aggInfo.agg.getAggregation)
System.out.println(aggInfo)
val argumentClasses = aggInfo.externalArgTypes.map(_.getConversionClass)
val accumulatorClass = aggInfo.externalAccTypes.map(_.getConversionClass)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2807,6 +2807,31 @@ class OverAggregateITCase extends BatchTestBase {
)
}

@Test
def testMode(): Unit = {
checkResult(
"SELECT h, d, MODE(d) over(partition by h)" +
" FROM Table5",
Seq(
row(1, 1, 4),
row(1, 2, 4),
row(1, 4, 4),
row(1, 4, 4),
row(1, 5, 4),
row(2, 2, 3),
row(2, 3, 3),
row(2, 3, 3),
row(2, 4, 3),
row(2, 4, 3),
row(2, 5, 3),
row(2, 5, 3),
row(3, 3, 5),
row(3, 5, 5),
row(3, 5, 5)
)
)
}

@Test
def testPercentRank(): Unit = {
checkResult(
Expand Down

0 comments on commit dc9aeb6

Please sign in to comment.