Skip to content

Commit

Permalink
Add Decimal256 sqllogictests for SUM, MEDIAN and COUNT aggregate expr…
Browse files Browse the repository at this point in the history
…essions (#7889)

* Add Decimal256 sqllogictests test for SUM aggregate

* Add median and avg sqllogictests tests

* Remove duplicate

* Add count test
  • Loading branch information
viirya authored Oct 21, 2023
1 parent 2e12d14 commit d6d3244
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions datafusion/sqllogictest/test_files/decimal.slt
Original file line number Diff line number Diff line change
Expand Up @@ -701,5 +701,24 @@ select arrow_typeof(max(c1)), max(c1) from decimal256_simple where c4=false;
----
Decimal256(50, 6) 0.00005

query TR
select arrow_typeof(sum(c1)), sum(c1) from decimal256_simple;
----
Decimal256(60, 6) 0.00055

query TR
select arrow_typeof(median(c1)), median(c1) from decimal256_simple;
----
Decimal256(50, 6) 0.00004

query IR
select count(*),c1 from decimal256_simple group by c1 order by c1;
----
1 0.00001
2 0.00002
3 0.00003
4 0.00004
5 0.00005

statement ok
drop table decimal256_simple;

0 comments on commit d6d3244

Please sign in to comment.