refactor(cli): use dialect display parsing for warehouse catalog

This commit is contained in:
Andrey Avtomonov 2026-05-25 00:33:52 +02:00
parent 70a59c8c01
commit 47f3206979
2 changed files with 43 additions and 49 deletions

View file

@ -156,6 +156,17 @@ describe('WarehouseCatalogService', () => {
});
});
it('keeps one-part table display fallback for loose catalog resolution', async () => {
await seedLiveDatabaseScan();
const catalog = new WarehouseCatalogService({ fileStore: project.fileStore });
await expect(catalog.resolveDisplay('warehouse', 'orders')).resolves.toMatchObject({
resolved: { catalog: null, db: 'public', name: 'orders' },
candidates: [],
dialect: 'postgres',
});
});
it('treats two-part BigQuery identifiers as ambiguous instead of guessing', async () => {
await seedLiveDatabaseScan('warehouse', 'sync-bigquery', 'bigquery');
const catalog = new WarehouseCatalogService({ fileStore: project.fileStore });