Skip to content

Commit

Permalink
chore(flink): fix regex digit escape
Browse files Browse the repository at this point in the history
This might not be sufficient for all regexes, but now sqlgot now stores
unescaped strings and then escapes them during generation, which for the
`Flink(Hive)` case meant doubling up backslashes on `\\d`
  • Loading branch information
gforsyth committed Apr 12, 2024
1 parent 83d7d2e commit a9c7cfc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ibis/backends/sql/dialects.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ def _interval_with_precision(self, e):


class Flink(Hive):
UNESCAPED_SEQUENCES = {"\\\\d": "\\d"}

class Generator(Hive.Generator):
TYPE_MAPPING = Hive.Generator.TYPE_MAPPING.copy() | {
sge.DataType.Type.TIME: "TIME",
Expand Down

0 comments on commit a9c7cfc

Please sign in to comment.