From 8b7415f3d9b709b426b058b6231c2e22e62b0305 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Fri, 20 May 2022 07:30:29 -0700 Subject: [PATCH] feat(sqlalchemy): add degrees and radians --- ibis/backends/base/sql/alchemy/registry.py | 3 ++- ibis/backends/tests/test_numeric.py | 8 -------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/ibis/backends/base/sql/alchemy/registry.py b/ibis/backends/base/sql/alchemy/registry.py index 096b4c9ae278..2a3d79362ac3 100644 --- a/ibis/backends/base/sql/alchemy/registry.py +++ b/ibis/backends/base/sql/alchemy/registry.py @@ -554,9 +554,10 @@ def _string_join(t, expr): ops.TimestampFromYMDHMS: lambda t, expr: sa.func.make_timestamp( *map(t.translate, expr.op().args[:6]) # ignore timezone ), + ops.Degrees: unary(sa.func.degrees), + ops.Radians: unary(sa.func.radians), } - # TODO: unit tests for each of these _binary_ops = { # Binary arithmetic diff --git a/ibis/backends/tests/test_numeric.py b/ibis/backends/tests/test_numeric.py index c310a02e6f54..c78f1ba11acf 100644 --- a/ibis/backends/tests/test_numeric.py +++ b/ibis/backends/tests/test_numeric.py @@ -160,13 +160,9 @@ def test_isnan_isinf( "clickhouse", "dask", "datafusion", - "duckdb", "impala", - "mysql", "pandas", - "postgres", "pyspark", - "sqlite", ] ), ), @@ -179,13 +175,9 @@ def test_isnan_isinf( "clickhouse", "dask", "datafusion", - "duckdb", "impala", - "mysql", "pandas", - "postgres", "pyspark", - "sqlite", ] ), ),