Skip to content

Commit 0b9ca54

Browse files
committed
test(clickhouse): add test for invalid catalog argument
1 parent b8dfa70 commit 0b9ca54

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
@@ -518,7 +518,7 @@ def get_schema(
518518
"""
519519
if catalog is not None:
520520
raise com.UnsupportedOperationError(
521-
"`catalog` namespaces are not supported by clickhouse"
521+
"`catalog` namespaces are not supported by ClickHouse"
522522
)
523523
query = sge.Describe(this=sg.table(table_name, db=database))
524524
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
@@ -453,3 +454,10 @@ def test_query_cache(con, method_name):
453454
method(settings={"ooze_query_cash": True})
454455

455456
assert result == expected
457+
458+
459+
def test_invalid_catalog_argument(con):
460+
with pytest.raises(
461+
exc.UnsupportedOperationError, match="`catalog` namespaces are not supported"
462+
):
463+
con.get_schema("t", catalog="a", database="b")

0 commit comments

Comments
 (0)