mirror of
https://github.com/Canner/WrenAI.git
synced 2026-09-01 04:57:29 +08:00
4a4f72af5d
Manifest extraction prunes models down to those a query reaches, but kept all cubes unconditionally. A cube whose baseObject model got pruned then failed wren-core MDL analysis with "baseObject is not a defined Model or View" — so any query touching only tables unrelated to a cube's base, or a scalar query referencing no model, broke once a cube existed (issue #2360). Filter cubes to those whose baseObject still resolves to a kept model or view. Cube queries emit `SELECT ... FROM <baseObject>`, so a queried cube's base model is always pulled in — dropping orphans is therefore safe. Backport of Canner/wren-engine-saas #892 (+ #895 view-cube coverage). Closes #2360 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>