Commit 2604ad5
Fix information_schema views for DuckLake mode
The previous implementation tried to create views in ducklake.main after
USE ducklake was set, but this caused the views to persist in the shared
DuckLake catalog. When the transpiler referenced these views, they couldn't
be found because:
1. Views in ducklake.main were stale from previous runs
2. Per-connection views in memory.main weren't accessible via memory.main.
prefix after USE ducklake
This fix:
1. Splits attachDuckLake into two phases:
- attachDuckLake: just attaches the catalog (no USE)
- setDuckLakeDefault: runs USE ducklake
2. Creates views BEFORE USE ducklake so they go into memory.main
3. Views query from unqualified "information_schema" which resolves to
the default catalog's information_schema at query time
4. Transpiler rewrites to memory.main.information_schema_*_compat which
finds the per-connection views created during connection setup
The views now work as temporary per-connection views that query from
the DuckLake information_schema after USE ducklake is set.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 8de3845 commit 2604ad5
File tree
4 files changed
+43
-35
lines changed- server
- transpiler
- transform
4 files changed
+43
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
322 | | - | |
| 321 | + | |
| 322 | + | |
323 | 323 | | |
324 | | - | |
325 | | - | |
326 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
327 | 327 | | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | 328 | | |
332 | 329 | | |
333 | | - | |
| 330 | + | |
334 | 331 | | |
335 | 332 | | |
336 | 333 | | |
| |||
351 | 348 | | |
352 | 349 | | |
353 | 350 | | |
354 | | - | |
| 351 | + | |
355 | 352 | | |
356 | 353 | | |
357 | 354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
299 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
300 | 301 | | |
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
305 | 314 | | |
306 | 315 | | |
307 | 316 | | |
| |||
333 | 342 | | |
334 | 343 | | |
335 | 344 | | |
336 | | - | |
| 345 | + | |
| 346 | + | |
337 | 347 | | |
338 | 348 | | |
339 | 349 | | |
| |||
355 | 365 | | |
356 | 366 | | |
357 | 367 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 368 | + | |
362 | 369 | | |
363 | 370 | | |
364 | 371 | | |
| |||
398 | 405 | | |
399 | 406 | | |
400 | 407 | | |
401 | | - | |
402 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
403 | 415 | | |
404 | 416 | | |
405 | 417 | | |
406 | | - | |
407 | | - | |
| 418 | + | |
408 | 419 | | |
409 | 420 | | |
410 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
0 commit comments