fix wrong drill down query when using nested query (#17942)
* qp: fetch_source_query: store card-id for each query we want to be able to determine further in the pipeline whether a query came from a card (i.e. saved question) or not * qp: annotate: remove join-alias if source is a card If the source is a card, the front-end should be able to treat it similar to a database view so we should not expose the join aliases outside. If the card is on the right side of the join though, the alias should still exists and refers to the current-level join alias.
Showing
- frontend/test/metabase/scenarios/binning/qb-explicit-joins.cy.spec.js 4 additions, 34 deletions...t/metabase/scenarios/binning/qb-explicit-joins.cy.spec.js
- frontend/test/metabase/scenarios/question/nested.cy.spec.js 1 addition, 1 deletionfrontend/test/metabase/scenarios/question/nested.cy.spec.js
- src/metabase/query_processor/middleware/annotate.clj 12 additions, 4 deletionssrc/metabase/query_processor/middleware/annotate.clj
- src/metabase/query_processor/middleware/fetch_source_query.clj 9 additions, 10 deletions...etabase/query_processor/middleware/fetch_source_query.clj
- test/metabase/query_processor/middleware/annotate_test.clj 29 additions, 1 deletiontest/metabase/query_processor/middleware/annotate_test.clj
- test/metabase/query_processor/middleware/fetch_source_query_test.clj 28 additions, 16 deletions...se/query_processor/middleware/fetch_source_query_test.clj
Loading
Please register or sign in to comment