summaryrefslogtreecommitdiffstats
path: root/sqlglot/executor/env.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-24 18:46:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-24 18:46:57 +0000
commitcaf48491ccffa709546a473d36df6a4444164ad1 (patch)
treee803e4a815a9a39695e6161ec4feb55f295f4942 /sqlglot/executor/env.py
parentReleasing debian version 16.4.0-1. (diff)
downloadsqlglot-caf48491ccffa709546a473d36df6a4444164ad1.tar.xz
sqlglot-caf48491ccffa709546a473d36df6a4444164ad1.zip
Merging upstream version 16.4.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/executor/env.py')
-rw-r--r--sqlglot/executor/env.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sqlglot/executor/env.py b/sqlglot/executor/env.py
index d2c4e72..5300224 100644
--- a/sqlglot/executor/env.py
+++ b/sqlglot/executor/env.py
@@ -163,6 +163,7 @@ ENV = {
"IF": lambda predicate, true, false: true if predicate else false,
"INTDIV": null_if_any(lambda e, this: e // this),
"INTERVAL": interval,
+ "LEFT": null_if_any(lambda this, e: this[:e]),
"LIKE": null_if_any(
lambda this, e: bool(re.match(e.replace("_", ".").replace("%", ".*"), this))
),
@@ -176,6 +177,7 @@ ENV = {
"ORD": null_if_any(ord),
"ORDERED": ordered,
"POW": pow,
+ "RIGHT": null_if_any(lambda this, e: this[-e:]),
"STRPOSITION": str_position,
"SUB": null_if_any(lambda e, this: e - this),
"SUBSTRING": substring,