// Try same query, but with an order by at the end. This will use the sort for
// the "order by" to do the distinct and not do a "DISTINCT SCAN".
assertRowCount(3, s.executeQuery("select distinct c2, c3 from two order by c2, c3"));
rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
assertFalse(rtsp.usedDistinctScan());
// more than one table in the select list
// Following runtime statistics output should have Eliminate duplicates = true
assertRowCount(3, s.executeQuery("select distinct a.c1, b.c1 from one a, two b where a.c1 = b.c1 and b.c2 =1"));
rtsp = SQLUtilities.getRuntimeStatisticsParser(s);