Skip to content

Commit

Permalink
Change test query to operate on BIGINT values
Browse files Browse the repository at this point in the history
With previous  query assertion was failing for connectors which exposed totalprice as
double value due to different double rounding behaviour in Trino and H2.
  • Loading branch information
losipiuk committed Apr 16, 2021
1 parent ed91910 commit 270ef1c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ public void testLimit()
@Test
public void testLimitWithAggregation()
{
MaterializedResult actual = computeActual("SELECT custkey, SUM(CAST(totalprice * 100 AS BIGINT)) FROM orders GROUP BY custkey LIMIT 10");
MaterializedResult all = computeExpected("SELECT custkey, SUM(CAST(totalprice * 100 AS BIGINT)) FROM orders GROUP BY custkey", actual.getTypes());
MaterializedResult actual = computeActual("SELECT custkey, SUM(orderkey) FROM orders GROUP BY custkey LIMIT 10");
MaterializedResult all = computeExpected("SELECT custkey, SUM(orderkey) FROM orders GROUP BY custkey", actual.getTypes());

assertEquals(actual.getMaterializedRows().size(), 10);
assertContains(all, actual);
Expand Down

0 comments on commit 270ef1c

Please sign in to comment.