diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-25 16:01:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-25 16:01:43 +0000 |
commit | 29f9a15cce138301cd5a84a1fd4060494a3a65b6 (patch) | |
tree | c593be2f0b0fdc60a43983aa547b34a441170e59 /sqlglot/dialects/starrocks.py | |
parent | Adding upstream version 9.0.1. (diff) | |
download | sqlglot-29f9a15cce138301cd5a84a1fd4060494a3a65b6.tar.xz sqlglot-29f9a15cce138301cd5a84a1fd4060494a3a65b6.zip |
Adding upstream version 9.0.3.upstream/9.0.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/starrocks.py')
-rw-r--r-- | sqlglot/dialects/starrocks.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sqlglot/dialects/starrocks.py b/sqlglot/dialects/starrocks.py index ef8c82d..0cba6fe 100644 --- a/sqlglot/dialects/starrocks.py +++ b/sqlglot/dialects/starrocks.py @@ -1,5 +1,5 @@ from sqlglot import exp -from sqlglot.dialects.dialect import rename_func +from sqlglot.dialects.dialect import arrow_json_extract_sql, rename_func from sqlglot.dialects.mysql import MySQL @@ -14,6 +14,8 @@ class StarRocks(MySQL): TRANSFORMS = { **MySQL.Generator.TRANSFORMS, + exp.JSONExtractScalar: arrow_json_extract_sql, + exp.JSONExtract: arrow_json_extract_sql, exp.DateDiff: rename_func("DATEDIFF"), exp.StrToUnix: lambda self, e: f"UNIX_TIMESTAMP({self.sql(e, 'this')}, {self.format_time(e)})", exp.TimeStrToDate: rename_func("TO_DATE"), |