Skip to content

Commit

Permalink
lowercase tables and sql for comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanrdoherty committed Oct 24, 2023
1 parent 5cb94ef commit 3c1d169
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static void main(String[] args) throws Exception {
int numSqlQueries = 0;
for (SqlQuery query : IteratorUtil.toIterable(queries.iterator())) {
numSqlQueries++;
String sql = query.getSql();
String sql = query.getSql().toLowerCase();
for (String table : tables.keySet()) {
if (sql.contains(table)) {
tables.get(table).add(query.getFullName());
Expand All @@ -72,7 +72,7 @@ private static Map<String, List<String>> readTablesFile(Path dbTableFile) throws
try (BufferedReader in = new BufferedReader(new FileReader(dbTableFile.toFile()))) {
Map<String, List<String>> tables = new LinkedHashMap<>();
while (in.ready()) {
tables.put(in.readLine().trim(), new ArrayList<>());
tables.put(in.readLine().trim().toLowerCase(), new ArrayList<>());
}
return tables;
}
Expand Down

0 comments on commit 3c1d169

Please sign in to comment.