// runtime statistics should have Distinct Scan in it
assertRowCount(6, s.executeQuery("select distinct a, b, b, a from (select y as a, x as b from (select id as x, name as y from names) as n) as m"));
rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
assertFalse(rtsp.usedTableScan());
assertTrue(rtsp.usedDistinctScan());
// runtime statistics should not have Distinct Scan in it
assertRowCount(3, s.executeQuery("select distinct a, a from (select y as a from (select id as x, name as y from names) as n) as m"));
rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
assertTrue(rtsp.usedTableScan());