Skip to content

Commit 78e16e4

Browse files
committed
test(clickhouse): add test for invalid catalog argument
1 parent 648a410 commit 78e16e4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ibis/backends/clickhouse/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ def get_schema(
512512
"""
513513
if catalog is not None:
514514
raise com.UnsupportedOperationError(
515-
"`catalog` namespaces are not supported by clickhouse"
515+
"`catalog` namespaces are not supported by ClickHouse"
516516
)
517517
query = sge.Describe(this=sg.table(table_name, db=database))
518518
try:

ibis/backends/clickhouse/tests/test_client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from pytest import param
1111

1212
import ibis
13+
import ibis.common.exceptions as exc
1314
import ibis.expr.datatypes as dt
1415
import ibis.expr.types as ir
1516
from ibis import config, udf
@@ -458,3 +459,10 @@ def test_query_cache(con, method_name):
458459
method(settings={"ooze_query_cash": True})
459460

460461
assert result == expected
462+
463+
464+
def test_invalid_catalog_argument(con):
465+
with pytest.raises(
466+
exc.UnsupportedOperationError, match="`catalog` namespaces are not supported"
467+
):
468+
con.get_schema("t", catalog="a", database="b")

0 commit comments

Comments
 (0)