summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/presto.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-24 08:03:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-24 08:03:48 +0000
commit36db14f4c6c28209371d563d76697df0172e337f (patch)
tree527347be54a38fc9b14fe1fa04c27a4bbae44016 /sqlglot/dialects/presto.py
parentReleasing debian version 17.4.1-1. (diff)
downloadsqlglot-36db14f4c6c28209371d563d76697df0172e337f.tar.xz
sqlglot-36db14f4c6c28209371d563d76697df0172e337f.zip
Merging upstream version 17.7.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/presto.py')
-rw-r--r--sqlglot/dialects/presto.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/sqlglot/dialects/presto.py b/sqlglot/dialects/presto.py
index 7d35c67..265c6e5 100644
--- a/sqlglot/dialects/presto.py
+++ b/sqlglot/dialects/presto.py
@@ -5,6 +5,7 @@ import typing as t
from sqlglot import exp, generator, parser, tokens, transforms
from sqlglot.dialects.dialect import (
Dialect,
+ binary_from_function,
date_trunc_to_time,
format_time_lambda,
if_sql,
@@ -198,6 +199,10 @@ class Presto(Dialect):
**parser.Parser.FUNCTIONS,
"APPROX_DISTINCT": exp.ApproxDistinct.from_arg_list,
"APPROX_PERCENTILE": _approx_percentile,
+ "BITWISE_AND": binary_from_function(exp.BitwiseAnd),
+ "BITWISE_NOT": lambda args: exp.BitwiseNot(this=seq_get(args, 0)),
+ "BITWISE_OR": binary_from_function(exp.BitwiseOr),
+ "BITWISE_XOR": binary_from_function(exp.BitwiseXor),
"CARDINALITY": exp.ArraySize.from_arg_list,
"CONTAINS": exp.ArrayContains.from_arg_list,
"DATE_ADD": lambda args: exp.DateAdd(