From a9c7cfcf257eb8e8c43e8af5fcc64e12e2dea4a6 Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Fri, 12 Apr 2024 16:57:41 -0400 Subject: [PATCH] chore(flink): fix regex digit escape 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` --- ibis/backends/sql/dialects.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ibis/backends/sql/dialects.py b/ibis/backends/sql/dialects.py index f1aadc4d64e35..3e01e80bf1d53 100644 --- a/ibis/backends/sql/dialects.py +++ b/ibis/backends/sql/dialects.py @@ -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",