Skip to content
Merged
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
16 changes: 15 additions & 1 deletion tests/integration/test_database_glue/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,6 @@ def test_create_table_engine_backend_mismatch_rejected(started_cluster):
"IcebergAzure('http://acc.blob.core.windows.net/cont/tbl/', 'acc', 'key')",
"IcebergLocal('/var/lib/clickhouse/user_files/tbl/')",
"IcebergHDFS('hdfs://namenode:9000/tbl/')",
"Iceberg('/var/lib/clickhouse/user_files/tbl/') SETTINGS disk = 'local_blob_disk'",
]:
error = node.query_and_get_error(
f"CREATE TABLE {CATALOG_NAME}.`{root_namespace}.mismatch` (x String) ENGINE = {engine}",
Expand All @@ -1064,6 +1063,21 @@ def test_create_table_engine_backend_mismatch_rejected(started_cluster):
), error
assert "stores tables on S3" in error, error

# A table-level `disk` setting that differs from the catalog's value is rejected
# earlier, by the per-setting validation in DatabaseDataLake::validateCreateTableEngine,
# before the storage backend mismatch is checked.
error = node.query_and_get_error(
f"CREATE TABLE {CATALOG_NAME}.`{root_namespace}.mismatch` (x String) ENGINE = Iceberg('/var/lib/clickhouse/user_files/tbl/') SETTINGS disk = 'local_blob_disk'",
settings={
"allow_experimental_database_glue_catalog": 1,
"allow_database_glue_catalog": 1,
},
)
assert (
"Table setting `disk` differs from its value in this DataLakeCatalog" in error
), error
assert "would be lost" in error, error


def test_schema_evolution(started_cluster):
node = started_cluster.instances["node1"]
Expand Down
Loading