Add test case

This commit is contained in:
jilen 2025-07-15 14:39:25 +08:00
parent 5ed56e4009
commit 14f15da10c
2 changed files with 10 additions and 0 deletions

View file

@ -179,6 +179,8 @@ object Query {
inline def max: Agg[Long] = Aggregation(AggregationOperator.max, e)
inline def sum: Agg[Option[E]] = Aggregation(AggregationOperator.sum, e)
}
}

View file

@ -177,4 +177,12 @@ class MirrorSqlContextSuite extends munit.FunSuite {
"SELECT MAX(f.age) FROM foo f"
)
}
test("Aggregations - max") {
val o = testContext.io(Foos.map(f => f.age).sum)
assertEquals(
o.sql,
"SELECT SUM(f.age) FROM foo f"
)
}
}