Skip to content

Commit e1d5bc9

Browse files
committed
try fix for sqlite & exasol
1 parent c3ae9b7 commit e1d5bc9

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

ibis/backends/sqlite/compiler.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,14 @@ def visit_DayOfWeekIndex(self, op, *, arg):
427427
)
428428

429429
def visit_IsoDayOfWeekIndex(self, op, *, arg):
430-
return self.cast(self.f.strftime("%u", arg), dt.int64)
430+
# return self.cast(self.f.strftime("%u", arg), dt.int64)
431+
return (
432+
self.cast(
433+
self.f.mod(self.cast(self.f.strftime("%w", arg) + 6, dt.int64), 7),
434+
dt.int64,
435+
)
436+
+ 1
437+
)
431438

432439
def visit_DayOfWeekName(self, op, *, arg):
433440
return sge.Case(

ibis/backends/tests/test_temporal.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,7 @@ def test_day_of_week_scalar(
14801480
raises=AttributeError,
14811481
reason="StringColumn' object has no attribute 'day_of_week'",
14821482
)
1483-
@pytest.mark.notimpl(["exasol"], raises=com.OperationNotDefinedError)
1483+
# @pytest.mark.notimpl(["exasol"], raises=com.OperationNotDefinedError)
14841484
@pytest.mark.broken(
14851485
["risingwave"],
14861486
raises=AssertionError,
@@ -1512,9 +1512,9 @@ def test_day_of_week_column(backend, alltypes, df):
15121512
lambda t: t.timestamp_col.day_of_week.index().count(),
15131513
lambda s: s.dt.dayofweek.count(),
15141514
id="day_of_week_index",
1515-
marks=[
1516-
pytest.mark.notimpl(["exasol"], raises=com.OperationNotDefinedError)
1517-
],
1515+
# marks=[
1516+
# pytest.mark.notimpl(["exasol"], raises=com.OperationNotDefinedError)
1517+
# ],
15181518
),
15191519
param(
15201520
lambda t: t.timestamp_col.day_of_week.full_name().length().sum(),

0 commit comments

Comments
 (0)