fix(schema-compiler): multi_stage leaf measure missing FROM clause by TheRoot-1 · Pull Request #10550 · cube-js/cube
When a multi_stage measure's sql references a raw column with no measure dependencies, fromMeasures is null so fromSubQuery is never built, leaving fromSql null. The existing error check then throws "lacks FROM clause". Add a fallback: when fromSql is null but withQuery.measures is non-empty, build a subquery directly from the cube's own table instead of failing. Fixes: cube-js#10549 Related: cube-js#9241
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters