Skip to content

Commit

Permalink
fix new test
Browse files Browse the repository at this point in the history
  • Loading branch information
KeXiangWang committed Jan 23, 2024
1 parent 9ff50fa commit bf5cb57
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
10 changes: 5 additions & 5 deletions ci/schema/risingwave.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CREATE TABLE diamonds (
) WITH (
connector = 'posix_fs',
match_pattern = 'diamonds.csv',
posix_fs.root = '/data',
posix_fs.root = '/Users/kexiang/workspace/ibis-rw/ci/ibis-testing-data/csv',
) FORMAT PLAIN ENCODE CSV ( without_header = 'false', delimiter = ',' );

DROP TABLE IF EXISTS astronauts CASCADE;
Expand Down Expand Up @@ -49,7 +49,7 @@ CREATE TABLE astronauts (
) WITH (
connector = 'posix_fs',
match_pattern = 'astronauts.csv',
posix_fs.root = '/data',
posix_fs.root = '/Users/kexiang/workspace/ibis-rw/ci/ibis-testing-data/csv',
) FORMAT PLAIN ENCODE CSV ( without_header = 'false', delimiter = ',' );

DROP TABLE IF EXISTS batting CASCADE;
Expand Down Expand Up @@ -80,7 +80,7 @@ CREATE TABLE batting (
) WITH (
connector = 'posix_fs',
match_pattern = 'batting.csv',
posix_fs.root = '/data',
posix_fs.root = '/Users/kexiang/workspace/ibis-rw/ci/ibis-testing-data/csv',
) FORMAT PLAIN ENCODE CSV ( without_header = 'false', delimiter = ',' );

DROP TABLE IF EXISTS awards_players CASCADE;
Expand All @@ -95,7 +95,7 @@ CREATE TABLE awards_players (
) WITH (
connector = 'posix_fs',
match_pattern = 'awards_players.csv',
posix_fs.root = '/data',
posix_fs.root = '/Users/kexiang/workspace/ibis-rw/ci/ibis-testing-data/csv',
) FORMAT PLAIN ENCODE CSV ( without_header = 'false', delimiter = ',' );

DROP TABLE IF EXISTS functional_alltypes CASCADE;
Expand All @@ -117,7 +117,7 @@ CREATE TABLE functional_alltypes (
) WITH (
connector = 'posix_fs',
match_pattern = 'functional_alltypes.csv',
posix_fs.root = '/data',
posix_fs.root = '/Users/kexiang/workspace/ibis-rw/ci/ibis-testing-data/csv',
) FORMAT PLAIN ENCODE CSV ( without_header = 'false', delimiter = ',' );

DROP TABLE IF EXISTS tzone CASCADE;
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/risingwave/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def _range(t, op):
# array operations
ops.ArrayLength: unary(sa.func.cardinality),
ops.ArrayCollect: reduction(sa.func.array_agg),
ops.ArrayColumn: (lambda t, op: pg.array(list(map(t.translate, op.cols)))),
ops.Array: (lambda t, op: pg.array(list(map(t.translate, op.exprs)))),
ops.ArraySlice: _array_slice(
index_converter=_neg_idx_to_pos,
array_length=sa.func.cardinality,
Expand Down
5 changes: 5 additions & 0 deletions ibis/backends/tests/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,11 @@ def test_repr_timestamp_array(con, monkeypatch):
["dask", "datafusion", "flink", "pandas", "polars"],
raises=com.OperationNotDefinedError,
)
@pytest.mark.broken(
["risingwave"],
raises=sa.exc.OperationalError,
reason="Refer to https://github.com/risingwavelabs/risingwave/issues/14734",
)
def test_unnest_range(con):
expr = ibis.range(2).unnest().name("x").as_table().mutate({"y": 1.0})
result = con.execute(expr)
Expand Down
1 change: 1 addition & 0 deletions ibis/backends/tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def test_load_examples(con, example, columns):
"pandas",
"polars",
"postgres",
"risingwave",
"pyspark",
"snowflake",
"sqlite",
Expand Down
1 change: 1 addition & 0 deletions ibis/backends/tests/test_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,7 @@ def test_try_cast_expected_null(con, from_val, to_type):
"mysql",
"oracle",
"postgres",
"risingwave",
"pyspark",
"snowflake",
"sqlite",
Expand Down
5 changes: 5 additions & 0 deletions ibis/backends/tests/test_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,11 @@ def test_rank_followed_by_over_call_merge_frames(backend, alltypes, df):
@pytest.mark.broken(
["pyspark"], reason="pyspark requires CURRENT ROW", raises=PySparkAnalysisException
)
@pytest.mark.notimpl(
["risingwave"],
raises=sa.exc.InternalError,
reason="Feature is not yet implemented: Window function with empty PARTITION BY is not supported yet",
)
def test_ordering_order(con):
table = ibis.memtable({"bool_col": [True, False, False, None, True]})
window = ibis.window(
Expand Down

0 comments on commit bf5cb57

Please sign in to comment.