Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions tests/cql/CqlAggregateTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,25 @@
<output>37</output>
<!-- 1 + (1+1+1)+(1+1+2)+(1+2+1)+(1+2+2)+(2+1+1)+(2+1+2)+(2+2+1)+(2+2+2) -->
</test>
<test name="AggregateEmptySourceWithStart" version="1.5">
<capability code="single-source-query"/>
<capability code="aggregate-clause-query"/>
<!-- empty source: no iterations, so the accumulator keeps its starting value -->
<expression>({ } as List&lt;Integer&gt;) Num aggregate Result starting 5: Result + Num</expression>
<output>5</output>
</test>
<test name="AggregateEmptySourceNoStart" version="1.5">
<capability code="single-source-query"/>
<capability code="aggregate-clause-query"/>
<!-- empty source with no starting clause: accumulator stays at its initial null -->
<expression>({ } as List&lt;Integer&gt;) Num aggregate Result: Coalesce(Result, 0) + Num</expression>
<output>null</output>
</test>
<test name="AggregateDecimal" version="1.5">
<capability code="single-source-query"/>
<capability code="aggregate-clause-query"/>
<expression>({ 1.0, 2.0, 3.0 }) Num aggregate Result starting 0.0: Result + Num</expression>
<output>6.0</output>
</test>
</group>
</tests>
Loading