Skip to content

Commit

Permalink
feat(clickhouse): implement strftime
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and kszucs committed May 23, 2022
1 parent 0c25c61 commit 222f2b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ibis/backends/clickhouse/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ def compile(translator, expr):
ops.BitXor: _bit_agg("groupBitXor"),
ops.Degrees: _unary("degrees"),
ops.Radians: _unary("radians"),
ops.Strftime: _fixed_arity("formatDateTime", 2),
}


Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/tests/test_temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def test_interval_add_cast_column(backend, alltypes, df):
@pytest.mark.parametrize(
('ibis_pattern', 'pandas_pattern'), [('%Y%m%d', '%Y%m%d')]
)
@pytest.mark.notimpl(["clickhouse", "datafusion", "duckdb", "impala"])
@pytest.mark.notimpl(["datafusion", "duckdb", "impala"])
def test_strftime(backend, con, alltypes, df, ibis_pattern, pandas_pattern):
expr = alltypes.timestamp_col.strftime(ibis_pattern)
expected = df.timestamp_col.dt.strftime(pandas_pattern)
Expand Down

0 comments on commit 222f2b5

Please sign in to comment.