Commit 05f8141
committed
fix: prevent default catalog leak into catalog-unsupported gateways (#5748)
When a multi-gateway project uses a default gateway with a catalog
(e.g. Trino), that catalog was silently prepended to model names
targeting secondary gateways that don't support catalogs (e.g.
ClickHouse), causing UnsupportedCatalogOperationError at evaluation.
Root cause: catalog-unsupported adapters return None for
default_catalog and are never added to default_catalog_per_gateway.
The model loader cannot distinguish 'no catalog' from 'not checked',
so the global default_catalog leaks through.
Fix: explicitly register catalog-unsupported gateways with empty
string in the per-gateway dict. The model loader's 'is not None'
check picks this up and overrides default_catalog to '', preventing
the leak.
Signed-off-by: Bruce Arctor <brucearctor@users.noreply.github.com>1 parent 8f092ac commit 05f8141
2 files changed
+66
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7186 | 7186 | | |
7187 | 7187 | | |
7188 | 7188 | | |
| 7189 | + | |
| 7190 | + | |
| 7191 | + | |
| 7192 | + | |
| 7193 | + | |
| 7194 | + | |
| 7195 | + | |
| 7196 | + | |
| 7197 | + | |
| 7198 | + | |
| 7199 | + | |
| 7200 | + | |
| 7201 | + | |
| 7202 | + | |
| 7203 | + | |
| 7204 | + | |
| 7205 | + | |
| 7206 | + | |
| 7207 | + | |
| 7208 | + | |
| 7209 | + | |
| 7210 | + | |
| 7211 | + | |
| 7212 | + | |
| 7213 | + | |
| 7214 | + | |
| 7215 | + | |
| 7216 | + | |
| 7217 | + | |
| 7218 | + | |
| 7219 | + | |
| 7220 | + | |
| 7221 | + | |
| 7222 | + | |
| 7223 | + | |
| 7224 | + | |
| 7225 | + | |
| 7226 | + | |
| 7227 | + | |
| 7228 | + | |
| 7229 | + | |
| 7230 | + | |
| 7231 | + | |
| 7232 | + | |
| 7233 | + | |
| 7234 | + | |
| 7235 | + | |
| 7236 | + | |
| 7237 | + | |
| 7238 | + | |
| 7239 | + | |
| 7240 | + | |
| 7241 | + | |
| 7242 | + | |
| 7243 | + | |
| 7244 | + | |
| 7245 | + | |
| 7246 | + | |
| 7247 | + | |
| 7248 | + | |
| 7249 | + | |
| 7250 | + | |
| 7251 | + | |
| 7252 | + | |
7189 | 7253 | | |
7190 | 7254 | | |
7191 | 7255 | | |
| |||
0 commit comments