You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(clickhouse): complete virtual-catalog stripping across all overrides
Address reviewer feedback on PR #5826:
- Add _strip_virtual_catalog helper to ClickhouseEngineAdapter; apply to
delete_from, insert_overwrite_by_partition, and alter_table overrides
that previously bypassed both the @set_catalog decorator and the
create_schema manual strip — preventing __gateway__ prefix leaking
into DELETE/INSERT OVERWRITE/ALTER TABLE SQL sent to ClickHouse
- Deduplicate catalog-stripping logic in create_schema via the helper
- Rename inject_virtual_catalog param catalog→gateway in base class and
align docstring (adapter decides the final catalog name)
- Reject virtual_catalog values containing '.' to prevent 4-level FQN
- Add unit tests verifying SQL output is free of the virtual catalog
prefix for each newly covered method
- Add integration test exercising get_default_catalog_per_gateway +
FQN uniformity + create_schema stripping end-to-end
- Fix clickhouse.md trailing newline
Signed-off-by: Michael Day <michael.day@cloudkitchens.com>
Signed-off-by: mday-io <mdaytn@gmail.com>
Copy file name to clipboardExpand all lines: docs/integrations/engines/clickhouse.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -486,4 +486,4 @@ With this configuration, ClickHouse models will appear as `ch_virtual.mydb.mytab
486
486
| `tls_mode` | Controls advanced TLS behavior. proxy and strict do not invoke ClickHouse mutual TLS connection, but do send client cert and key. mutual assumes ClickHouse mutual TLS auth with a client certificate. | string | N |
| `connection_pool_options` | Additional [options](https://clickhouse.com/docs/integrations/python#customizing-the-http-connection-pool) for the HTTP connection pool | dict | N |
489
-
| `virtual_catalog` | Override the virtual catalog name used when ClickHouse runs alongside a catalog-aware gateway (e.g. Trino). Defaults to `__{gateway_name}__`. See [Multi-gateway setup](#multi-gateway-setup) for details. | string | N |
489
+
| `virtual_catalog` | Override the virtual catalog name used when ClickHouse runs alongside a catalog-aware gateway (e.g. Trino). Defaults to `__{gateway_name}__`. See [Multi-gateway setup](#multi-gateway-setup) for details. | string | N |
0 commit comments