Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update ghcr.io/risingwavelabs/risingwave docker tag to v2.1.0 #10562

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ services:
- impala

risingwave:
image: ghcr.io/risingwavelabs/risingwave:v2.0.4
image: ghcr.io/risingwavelabs/risingwave:v2.1.0
command: "standalone --meta-opts=\" \
--advertise-addr 0.0.0.0:5690 \
--backend mem \
Expand Down
15 changes: 7 additions & 8 deletions ibis/backends/sql/compilers/risingwave.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import sqlglot as sg
import sqlglot.expressions as sge

import ibis.common.exceptions as com
Expand Down Expand Up @@ -40,25 +41,23 @@
return self.cast(sge.CurrentTimestamp(), dt.date)

def visit_First(self, op, *, arg, where, order_by, include_null):
if include_null:
raise com.UnsupportedOperationError(
"`include_null=True` is not supported by the risingwave backend"
)
if not order_by:
raise com.UnsupportedOperationError(
"RisingWave requires an `order_by` be specified in `first`"
)
if not include_null:
cond = arg.is_(sg.not_(NULL, copy=False))
where = cond if where is None else sge.And(this=cond, expression=where)

Check warning on line 50 in ibis/backends/sql/compilers/risingwave.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/sql/compilers/risingwave.py#L49-L50

Added lines #L49 - L50 were not covered by tests
return self.agg.first_value(arg, where=where, order_by=order_by)

def visit_Last(self, op, *, arg, where, order_by, include_null):
if include_null:
raise com.UnsupportedOperationError(
"`include_null=True` is not supported by the risingwave backend"
)
if not order_by:
raise com.UnsupportedOperationError(
"RisingWave requires an `order_by` be specified in `last`"
)
if not include_null:
cond = arg.is_(sg.not_(NULL, copy=False))
where = cond if where is None else sge.And(this=cond, expression=where)

Check warning on line 60 in ibis/backends/sql/compilers/risingwave.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/sql/compilers/risingwave.py#L59-L60

Added lines #L59 - L60 were not covered by tests
return self.agg.last_value(arg, where=where, order_by=order_by)

def visit_Correlation(self, op, *, left, right, how, where):
Expand Down
14 changes: 4 additions & 10 deletions ibis/backends/tests/test_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,23 +647,16 @@ def test_first_last(alltypes, method, filtered, include_null):
raises=com.OperationNotDefinedError,
)
@pytest.mark.parametrize("method", ["first", "last"])
@pytest.mark.parametrize("filtered", [False, True])
@pytest.mark.parametrize("filtered", [False, True], ids=["not-filtered", "filtered"])
@pytest.mark.parametrize(
"include_null",
[
False,
param(False, id="exclude-null"),
param(
True,
marks=[
pytest.mark.notimpl(
[
"clickhouse",
"exasol",
"flink",
"postgres",
"risingwave",
"snowflake",
],
["clickhouse", "exasol", "flink", "postgres", "snowflake"],
raises=com.UnsupportedOperationError,
reason="`include_null=True` is not supported",
),
Expand All @@ -674,6 +667,7 @@ def test_first_last(alltypes, method, filtered, include_null):
strict=False,
),
],
id="include-null",
),
],
)
Expand Down
Loading