Skip to content

Commit

Permalink
feat(exasol): add support for ExtractDayOfYear (#8578)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoretti authored Mar 7, 2024
1 parent 1847f1c commit df2b69e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ibis/backends/exasol/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class ExasolCompiler(SQLGlotCompiler):
ops.DayOfWeekIndex,
ops.DayOfWeekName,
ops.ElementWiseVectorizedUDF,
ops.ExtractDayOfYear,
ops.ExtractEpochSeconds,
ops.ExtractQuarter,
ops.ExtractWeekOfYear,
Expand Down Expand Up @@ -178,3 +177,6 @@ def visit_DateDelta(self, op, *, part, left, right):
# * part = hour -> hours_between
# * ...
return self.f.days_between(left, right)

def visit_ExtractDayOfYear(self, op, *, arg):
return self.cast(self.f.to_char(arg, "DDD"), op.dtype)
4 changes: 1 addition & 3 deletions ibis/backends/tests/test_temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ def test_date_extract(backend, alltypes, df, attr, expr_fn):
param(
"day_of_year",
marks=[
pytest.mark.notimpl(
["exasol", "impala"], raises=com.OperationNotDefinedError
),
pytest.mark.notimpl(["impala"], raises=com.OperationNotDefinedError),
pytest.mark.notyet(["oracle"], raises=com.OperationNotDefinedError),
],
),
Expand Down

0 comments on commit df2b69e

Please sign in to comment.