Skip to content

Commit

Permalink
feat(exasol): add support for ExtractQuarter (#8587)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoretti authored Mar 8, 2024
1 parent 16e8b95 commit 0d9b676
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ibis/backends/exasol/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class ExasolCompiler(SQLGlotCompiler):
ops.DayOfWeekName,
ops.ElementWiseVectorizedUDF,
ops.ExtractEpochSeconds,
ops.ExtractQuarter,
ops.ExtractWeekOfYear,
ops.First,
ops.IntervalFromInteger,
Expand Down Expand Up @@ -180,3 +179,6 @@ def visit_DateDelta(self, op, *, part, left, right):

def visit_ExtractDayOfYear(self, op, *, arg):
return self.cast(self.f.to_char(arg, "DDD"), op.dtype)

def visit_ExtractQuarter(self, op, *, arg):
return self.cast(self.f.to_char(arg, "Q"), op.dtype)
1 change: 0 additions & 1 deletion ibis/backends/tests/test_temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ def test_date_extract(backend, alltypes, df, attr, expr_fn):
"quarter",
marks=[
pytest.mark.notyet(["oracle"], raises=OracleDatabaseError),
pytest.mark.notimpl(["exasol"], raises=com.OperationNotDefinedError),
],
),
"hour",
Expand Down

0 comments on commit 0d9b676

Please sign in to comment.