Source:
<code>public void testColumnNameContainsTableName() { int daysSinceEpoch = 16138; long secondsSinceEpoch = 16138 * 24 * 60 * 60; List<String> baseQueries = Arrays.asList("SELECT * FROM mytable", "SELECT DaysSinceEpoch, timeConvert(DaysSinceEpoch,'DAYS','SECONDS') FROM mytable", "SELECT DaysSinceEpoch, timeConvert(DaysSinceEpoch,'DAYS','SECONDS') FROM mytable order by DaysSinceEpoch limit 10000", "SELECT DaysSinceEpoch, timeConvert(DaysSinceEpoch,'DAYS','SECONDS') FROM mytable order by timeConvert(DaysSinceEpoch,'DAYS','SECONDS') DESC limit 10000", "SELECT count(*) FROM mytable WHERE DaysSinceEpoch = " + daysSinceEpoch, "SELECT count(*) FROM mytable WHERE timeConvert(DaysSinceEpoch,'DAYS','SECONDS') = " + secondsSinceEpoch, "SELECT count(*) FROM mytable WHERE timeConvert(DaysSinceEpoch,'DAYS','SECONDS') = " + daysSinceEpoch, "SELECT MAX(timeConvert(DaysSinceEpoch,'DAYS','SECONDS')) FROM mytable", "SELECT COUNT(*) FROM mytable GROUP BY dateTimeConvert(DaysSinceEpoch,'1:DAYS:EPOCH','1:HOURS:EPOCH','1:HOURS')"); List<String> queries = new ArrayList<>(); <START> baseQueries.stream().forEach(q -> queries.add(q.replace("DaysSinceEpoch", "mytable.DAYSSinceEpOch"))); <END> baseQueries.stream().forEach(q -> queries.add(q.replace("DaysSinceEpoch", "mytable.DAYSSinceEpOch"))); TestUtils.waitForCondition(aVoid -> { try { for (String query : queries) { JsonNode response = postQuery(query); return response.get("exceptions").size() == 0 && response.get("numSegmentsProcessed").asInt() > 0; } } catch (Exception e) { throw new RuntimeException(e); } return true; }, 10_000L, "Failed to get results for case-insensitive queries"); }</code><technical_language>suggestion baseQueries.forEach(q -> queries.add(q.replace("DaysSinceEpoch", "mytable.DAYSSinceEpOch")));</technical_language>

Target:
public void testColumnNameContainsTableName() { int daysSinceEpoch = 16138; long secondsSinceEpoch = 16138 * 24 * 60 * 60; List<String> baseQueries = Arrays.asList("SELECT * FROM mytable", "SELECT DaysSinceEpoch, timeConvert(DaysSinceEpoch,'DAYS','SECONDS') FROM mytable", "SELECT DaysSinceEpoch, timeConvert(DaysSinceEpoch,'DAYS','SECONDS') FROM mytable order by DaysSinceEpoch limit 10000", "SELECT DaysSinceEpoch, timeConvert(DaysSinceEpoch,'DAYS','SECONDS') FROM mytable order by timeConvert(DaysSinceEpoch,'DAYS','SECONDS') DESC limit 10000", "SELECT count(*) FROM mytable WHERE DaysSinceEpoch = " + daysSinceEpoch, "SELECT count(*) FROM mytable WHERE timeConvert(DaysSinceEpoch,'DAYS','SECONDS') = " + secondsSinceEpoch, "SELECT count(*) FROM mytable WHERE timeConvert(DaysSinceEpoch,'DAYS','SECONDS') = " + daysSinceEpoch, "SELECT MAX(timeConvert(DaysSinceEpoch,'DAYS','SECONDS')) FROM mytable", "SELECT COUNT(*) FROM mytable GROUP BY dateTimeConvert(DaysSinceEpoch,'1:DAYS:EPOCH','1:HOURS:EPOCH','1:HOURS')"); List<String> queries = new ArrayList<>(); baseQueries.forEach(q -> queries.add(q.replace("DaysSinceEpoch", "mytable.DAYSSinceEpOch"))); baseQueries.forEach(q -> queries.add(q.replace("DaysSinceEpoch", "mytable.DAYSSinceEpOch"))); for (String query : queries) { try { postQuery(query); } catch (Exception e) { throw new RuntimeException("Got Exceptions from query - " + query); } } }