This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Feb 27, 2023
-
-
Alexander Polyankin authored
-
Nemanja Glumac authored
-
Nemanja Glumac authored
-
- Feb 26, 2023
-
-
Nemanja Glumac authored
-
Nemanja Glumac authored
-
- Feb 25, 2023
-
-
Nemanja Glumac authored
[ci skip]
-
- Feb 24, 2023
-
-
Aleksandr Lesnenko authored
-
Aleksandr Lesnenko authored
-
Nick Fitzpatrick authored
* open chart settings when clicking active display type * adjusting tendline e2e test
-
dpsutton authored
* Remove json fields from action parameters ```sql json-test=# select * from json_table; json_val | description ------------------+--------------- {"a": 1, "b": 2} | a description (1 row) ``` This ends up in our db as: ```clojure ({:database_type "json", :name "json_val", :effective_type :type/Structured, :nfc_path nil, :id 73, :display_name "Json Val", :database_required true} {:database_type "bigint", :name "json_val → a", :effective_type :type/Integer, :nfc_path ("json_val" "a"), :id 72, :display_name "Json Val → A", :database_required false} {:database_type "bigint", :name "json_val → b", :effective_type :type/Integer, :nfc_path ("json_val" "b"), :id 74, :display_name "Json Val → B", :database_required false} {:database_type "text", :name "description", :effective_type :type/Text, :nfc_path nil, :id 13670, :display_name "Description", :database_required false}) ``` AKA, exploded. But we cannot enter values for these fields for implicit actions. Before this change, the action thought its parameters were: ```clojure :parameters ({:id "json_val", :target [:variable [:template-tag "json_val"]], :type :type/Structured, :required true} {:id "json_val_%E2%86%92_a", :target [:variable [:template-tag "json_val_%E2%86%92_a"]], :type :type/Integer, :required false} {:id "json_val_%E2%86%92_b", :target [:variable [:template-tag "json_val_%E2%86%92_b"]], :type :type/Integer, :required false} {:id "description", :target [:variable [:template-tag "description"]], :type :type/Text, :required false}) ``` And we just don't know how to handle the exploded json values in the insert statement to create a nested json structure. So lets omit them. After this change: ```clojure action=> (:parameters (select-action :id 14)) ({:id "json_val", :target [:variable [:template-tag "json_val"]], :type :type/Structured, :required true} {:id "description", :target [:variable [:template-tag "description"]], :type :type/Text, :required false}) ``` * Translate `:type/Structured` to JSON for pg Fields have effective_type, and base_type `:type/Structured`. But several other types get marked as this as well: ```clojure actions=> (descendants :type/Structured) -> #{:type/SerializedJSON :type/XML :type/JSON} ``` So for the purposes of this, we _assume_ that structured is synonymous with json. Certainly will error if its xml. This makes the implicit action cast the text input for a json field to json. If the underlying field in pg is jsonb the driver cleans that up for us with no error. * Remove json fields, exploded json fields, unrecognized type fields In order to do this, had to change how we load json fields in test datasets for postgres. It just stuffed them in as text. Mysql would correctly make them json fields but postgres just bailed and left them as text strings. This changes `load-data/load-data!` to look for json columns, and if so, cast them to json when loading. * Remove json and xml checks from dashboard execution tests these are not doing what you think they are doing. they inspire confidence that json works but the underlying fields are actually always text. So it's unfounded confidence; misleading confidence. If you fix this, you quickly run into issues with expressivity in parameters and differences in dbs. A few: - no parameter on a dashboard can express that its type is json - mysql doesn't have an xml type - postgres does have an xml type, and you get back a native PGXML type - since you can't have an implicit type in the parameter, each sql has to cast in its query. And then you start getting differences in return types, queries, and it stops making sense for this all to be in the same query. And at the end of the day, of course you can write a query that casts a string to some native type. That's not really action related. * Let's not do this yet i think this is the correct call but want more tests on it when we flip the switch * Test pg enums in implicit actions * alignment and unused binding * Exclude in maria maria doesn't see the json_bit field as a json column. It's just a text column. So it is not excluded and all of the exploded fields like "json_bit → 1234" are not extracted. So this test is not applicable because it's just a generic implicit action on three fields. * accept suggestions from tamas
-
Emmad Usmani authored
-
Nick Fitzpatrick authored
-
metamben authored
-
Bryan Maass authored
* fixes nil schema being passed into ->malli-io-link - happens when function args aren't annotated. * (u/pprint-to-str nil) should be "nil\n", not nil
-
Cam Saul authored
* Mark `hx/` and `h1x/` namespaces and their vars as deprecated * Fix snowflake failures * Remove unneeded honey-sql-version bindings
-
metamben authored
* Unskip repro e2e test * Fix flaky test --------- Co-authored-by:
Nemanja <31325167+nemanjaglumac@users.noreply.github.com>
-
Cal Herries authored
* Decouple checking ddl from classifying h2 stmts - should enable followup for easily blocking more kinds of queries - check all statements to make sure they aren't "ddl". * fix classify-query * linter fixes + get-field refactor * return the CommandInterface values as ints Reach into the CommandList when needed * docstring wording * catch invalid queries -- they can't be classified * Remove action subtypes from inlined-models * Add ddl check for `execute-write-query!` * Remove ACCESS_MODE_DATA * Check queries are single select statements * Add test for sample database privileges * Fix single-select check * Add single-select test * Rename and add more tests for checking read only commands * commands -> statements * Fix check-disallow-ddl-commands * new line * Add more read-only statements to the tests * Update error text * Use are * Add integration test for executing actions with disallowed commands * Add test before inserting row * Run GRANT ALL ON SCHEMA "PUBLIC" TO GUEST * Restore classify-query * whitespace * Whitelist command types for actions * Add comment * Rename * Remove dupes * Add truncate test * Add DDL commands * Rename to query-classification * Update error message * Fix test --------- Co-authored-by:
Bryan Maass <bryan.maass@gmail.com>
-
Denis Berezin authored
Add Median aggregation type to query builder aggregation dropdown menu for databases that support "percentile-aggregations" driver feature. Also: Add translation tag for numeric column "Style| dropdown settings
-
Nemanja Glumac authored
-
Nemanja Glumac authored
-
Nemanja Glumac authored
-
Nemanja Glumac authored
* Limit the number of results for better performance * Wait for all filter results to load * Remove the need for popover
-
Ngoc Khuat authored
-
Nemanja Glumac authored
* Wait for model to fully load * Open revision history helper * Revert to a point in history helper * Greatly simplify test Do not test things out we're covering elsewhere * Update test title to match the assertions
-
Nemanja Glumac authored
* [CI] Run frontend and drivers tests on Ubuntu 22.04 * Skip capturing max memory usage for now
-
Ryan Laurie authored
* fallback to generating form metadata from parameters * fix actions test * update unit tests * update e2e test strings
-
Nemanja Glumac authored
-
- Feb 23, 2023
-
-
Gustavo Saiani authored
-
Nemanja Glumac authored
-
Ryan Laurie authored
* add basic implicit action e2e tests * DRY up the actions tests
-
Aleksandr Lesnenko authored
-
Case Nelson authored
-
Jeff Bruemmer authored
-
Ryan Laurie authored
-
Case Nelson authored
Fixes #22872 In #21839, all order-bys were removed from pivot queries because columns in `ORDER BY` had to appear in `GROUP BY` clauses. Unfortunately that removed legal order by columns (e.g. count) from being applied. This now keeps aggregation columns in field defs to restore the sorting behaviour.
-
Nemanja Glumac authored
[ci skip]
-
Ryan Laurie authored
-
Cam Saul authored
* Snowflake Honey SQL 2 * Test fix
* Use Honey SQL 2 for GTAP compilation in sandboxing tests * Test fix -
Noah Moss authored
* new clojure migration for v1->v2 permissions * updates * fix rebase issue * fix reflection warning * fix final test and address comment about macro name * fix indentation * revert changes to defmigration macro to try to fix final test
-
Ryan Laurie authored
-