Skip to content

Commit

Permalink
Update sql.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxHalford committed Dec 1, 2023
1 parent 1d5f9c1 commit 9f77eec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lea/views/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def rename_table_references(self, table_reference_mapping: dict[str, str]) -> Ge
# TODO: could be done faster with Aho–Corasick algorithm
# Maybe try out https://github.com/vi3k6i5/flashtext
for k, v in table_reference_mapping.items():
query = re.sub(rf'\b{k}\b', v, query)
query = re.sub(rf"\b{k}\b", v, query)
return GenericSQLView(query=query, sqlglot_dialect=self.sqlglot_dialect, key=self.key)


Expand Down

0 comments on commit 9f77eec

Please sign in to comment.