summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/drill.py
diff options
context:
space:
mode:
Diffstat (limited to 'sqlglot/dialects/drill.py')
-rw-r--r--sqlglot/dialects/drill.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlglot/dialects/drill.py b/sqlglot/dialects/drill.py
index afcf4d0..208e2ab 100644
--- a/sqlglot/dialects/drill.py
+++ b/sqlglot/dialects/drill.py
@@ -9,7 +9,6 @@ from sqlglot.dialects.dialect import (
create_with_partitions_sql,
datestrtodate_sql,
format_time_lambda,
- no_pivot_sql,
no_trycast_sql,
rename_func,
str_position_sql,
@@ -136,16 +135,17 @@ class Drill(Dialect):
exp.ILike: lambda self, e: f" {self.sql(e, 'this')} `ILIKE` {self.sql(e, 'expression')}",
exp.Levenshtein: rename_func("LEVENSHTEIN_DISTANCE"),
exp.PartitionedByProperty: lambda self, e: f"PARTITION BY {self.sql(e, 'this')}",
- exp.Pivot: no_pivot_sql,
exp.RegexpLike: rename_func("REGEXP_MATCHES"),
exp.StrPosition: str_position_sql,
exp.StrToDate: _str_to_date,
+ exp.Pow: rename_func("POW"),
exp.StrToTime: lambda self, e: f"TO_TIMESTAMP({self.sql(e, 'this')}, {self.format_time(e)})",
exp.TimeStrToDate: lambda self, e: f"CAST({self.sql(e, 'this')} AS DATE)",
exp.TimeStrToTime: timestrtotime_sql,
exp.TimeStrToUnix: rename_func("UNIX_TIMESTAMP"),
exp.TimeToStr: lambda self, e: f"TO_CHAR({self.sql(e, 'this')}, {self.format_time(e)})",
exp.TimeToUnix: rename_func("UNIX_TIMESTAMP"),
+ exp.ToChar: lambda self, e: self.function_fallback_sql(e),
exp.TryCast: no_trycast_sql,
exp.TsOrDsAdd: lambda self, e: f"DATE_ADD(CAST({self.sql(e, 'this')} AS DATE), {self.sql(exp.Interval(this=e.expression, unit=exp.Var(this='DAY')))})",
exp.TsOrDsToDate: ts_or_ds_to_date_sql("drill"),