Oh, and add a flag to CalciteAssert.ResultCollector() saying whether the results have to be in the same order.
On Thu, Jun 8, 2017 at 10:59 AM, Julian Hyde <[email protected]> wrote: > Maybe something like this. In your test case: > > @Test public void testMyStatements() { > final String sql1 = "...", > sql2 = "..."; > final CalciteAssert.ResultCollector c = new > CalciteAssert.ResultCollector(); > sql(sql1).collect(c); > sql(sql2).returns(c.checker()); > } > > In CalciteAssert: > > public static class ResultCollector { > ... > > public Function<ResultSet, Void> checker() { > ... > } > } > > In CalciteAssert.AssertQuery: > > public AssertQuery collect(ResultCollector c) { > ... > return this; > } > > Julian > > On Thu, Jun 8, 2017 at 10:44 AM, Zain Humayun > <[email protected]> wrote: >> Hi, >> I'm wondering what the best way to test that two queries produce the same >> final result. As far as I can see, CalciteAssert.AssertQuery doesn't contain >> such functionality. >> Zain.
