From 33518e9dd69fcd95719238182954b49d6507e493 Mon Sep 17 00:00:00 2001 From: Deepyaman Datta Date: Thu, 7 Sep 2023 19:26:45 -0600 Subject: [PATCH] refactor(flink): use built-in `DEGREES`, `RADIANS` --- ibis/backends/flink/registry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ibis/backends/flink/registry.py b/ibis/backends/flink/registry.py index 8e6bf3cf605b..2e0a8ebe397c 100644 --- a/ibis/backends/flink/registry.py +++ b/ibis/backends/flink/registry.py @@ -7,6 +7,7 @@ from ibis.backends.base.sql.registry import ( fixed_arity, helpers, + unary, window, ) from ibis.backends.base.sql.registry import ( @@ -192,6 +193,8 @@ def _window(translator: ExprTranslator, op: ops.Node) -> str: ops.ExtractMinute: _extract_field("minute"), # equivalent to MINUTE(timestamp) ops.ExtractSecond: _extract_field("second"), # equivalent to SECOND(timestamp) ops.Literal: _literal, + ops.Degrees: unary("degrees"), + ops.Radians: unary("radians"), ops.RegexSearch: fixed_arity("regexp", 2), ops.TimestampFromUNIX: _timestamp_from_unix, ops.Where: _filter,