forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support dashboard params for Cards with nested queries (metabase#12531)
* Fix metabase#12501 * Make sure Query results_metadata comes back with inferred base type from annotate * Support filtering against questions that use another question as their source [ci drivers] * Test fixes 🔧 * Lint fix [ci drivers] * Clean up metabase.query-processor.parameters.mbql-test * Tweak codecov requirements [ci drivers]
- Loading branch information
Showing
19 changed files
with
625 additions
and
486 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
27 changes: 27 additions & 0 deletions
27
modules/drivers/mongo/test/metabase/driver/mongo/query_processor_test.clj
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
(ns metabase.driver.mongo.query-processor-test | ||
(:require [clojure.test :refer :all] | ||
[metabase.driver.mongo.query-processor :as mongo.qp])) | ||
|
||
(deftest query->collection-name-test | ||
(testing "query->collection-name" | ||
(testing "should be able to extract :collection from :source-query") | ||
(is (= "checkins" | ||
(#'mongo.qp/query->collection-name {:query {:source-query | ||
{:collection "checkins" | ||
:native []}}}))) | ||
(testing "should work for nested-nested queries" | ||
(is (= "checkins" | ||
(#'mongo.qp/query->collection-name {:query {:source-query {:source-query | ||
{:collection "checkins" | ||
:native []}}}})))) | ||
|
||
(testing "should ignore :joins" | ||
(is (= nil | ||
(#'mongo.qp/query->collection-name {:query {:source-query | ||
{:native []} | ||
:joins [{:source-query "wow"}]}})))) | ||
|
||
(testing "should ignore other :collection keys" | ||
(is (= nil | ||
(#'mongo.qp/query->collection-name {:query {:source-query | ||
{:native [{:collection "wow"}]}}})))))) |
This file contains 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
Oops, something went wrong.