Skip to content

Commit

Permalink
feat(bigquery): implement ops.ExtractWeekOfYear
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztof-kwitt authored and gforsyth committed Jan 9, 2023
1 parent f5bacad commit 477d287
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ibis/backends/bigquery/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ def _nth_value(t, op):
ops.ExtractYear: _extract_field("year"),
ops.ExtractQuarter: _extract_field("quarter"),
ops.ExtractMonth: _extract_field("month"),
ops.ExtractWeekOfYear: _extract_field("isoweek"),
ops.ExtractDay: _extract_field("day"),
ops.ExtractDayOfYear: _extract_field("dayofyear"),
ops.ExtractHour: _extract_field("hour"),
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 @@ -126,7 +126,7 @@ def test_timestamp_extract_epoch_seconds(backend, alltypes, df):
backend.assert_series_equal(result, expected)


@pytest.mark.notimpl(["bigquery", "datafusion"])
@pytest.mark.notimpl(["datafusion"])
def test_timestamp_extract_week_of_year(backend, alltypes, df):
expr = alltypes.timestamp_col.week_of_year().name('tmp')
result = expr.execute()
Expand Down

0 comments on commit 477d287

Please sign in to comment.