Skip to content

Commit

Permalink
feat(trino): implement ops.Strftime
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztof-kwitt authored and cpcloud committed Dec 27, 2022
1 parent 9fa7304 commit a436823
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ibis/backends/tests/test_temporal.py
Expand Up @@ -544,7 +544,7 @@ def test_interval_add_cast_column(backend, alltypes, df):
),
],
)
@pytest.mark.notimpl(["datafusion", "mssql", "trino"])
@pytest.mark.notimpl(["datafusion", "mssql"])
def test_strftime(backend, alltypes, df, expr_fn, pandas_pattern):
expr = expr_fn(alltypes)
expected = df.timestamp_col.dt.strftime(pandas_pattern).rename("formatted")
Expand Down
1 change: 1 addition & 0 deletions ibis/backends/trino/registry.py
Expand Up @@ -178,5 +178,6 @@ def _timestamp_from_ymdhms(t, op):
ops.DateFromYMD: _date_from_ymd,
ops.TimeFromHMS: _time_from_hms,
ops.TimestampFromYMDHMS: _timestamp_from_ymdhms,
ops.Strftime: fixed_arity(sa.func.date_format, 2),
}
)

0 comments on commit a436823

Please sign in to comment.