Skip to content

Commit

Permalink
test(clickhouse): add test for clickhouse-specific create_table par…
Browse files Browse the repository at this point in the history
…ameters
  • Loading branch information
cpcloud committed Oct 11, 2023
1 parent 1bc6cee commit 7e1ece7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ibis/backends/clickhouse/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,21 @@ def test_create_table_data(con, data, engine, temp_table):
assert len(t.execute()) == 3


def test_create_table_with_properties(con, temp_table):
data = pd.DataFrame({"a": list("abcde" * 20), "b": [1, 2, 3, 4, 5] * 20})
n = len(data)
t = con.create_table(
temp_table,
data,
schema=ibis.schema(dict(a="string", b="!uint32")),
order_by=["a", "b"],
partition_by=["a"],
sample_by=["b"],
settings={"allow_nullable_key": "1"},
)
assert t.count().execute() == n


@pytest.mark.parametrize(
"engine",
[
Expand Down

0 comments on commit 7e1ece7

Please sign in to comment.