Skip to content

Commit

Permalink
feat(sqlalchemy): implement trig functions
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and kszucs committed May 19, 2022
1 parent c56440a commit 34c1514
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ibis/backends/base/sql/alchemy/registry.py
Expand Up @@ -530,6 +530,16 @@ def _string_join(t, expr):
ops.Floor: unary(sa.func.floor),
ops.Power: fixed_arity(sa.func.pow, 2),
ops.FloorDivide: _floor_divide,
ops.Acos: unary(sa.func.acos),
ops.Asin: unary(sa.func.asin),
ops.Atan: unary(sa.func.atan),
ops.Atan2: fixed_arity(sa.func.atan2, 2),
ops.Cos: unary(sa.func.cos),
ops.Sin: unary(sa.func.sin),
ops.Tan: unary(sa.func.tan),
ops.Cot: unary(sa.func.cot),
ops.Pi: fixed_arity(sa.func.pi, 0),
ops.E: fixed_arity(lambda: sa.func.exp(1), 0),
# other
ops.SortKey: _sort_key,
ops.Date: unary(lambda arg: sa.cast(arg, sa.DATE)),
Expand Down

0 comments on commit 34c1514

Please sign in to comment.