Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Mar 27, 2023
  2. Mar 25, 2023
  3. Mar 24, 2023
  4. Mar 23, 2023
    • Ryan Laurie's avatar
      reproduce broken audit log #29456 (#29457) · d17e8b75
      Ryan Laurie authored
      d17e8b75
    • dpsutton's avatar
      Separate date from datetime binning options (#29423) · a4f01b69
      dpsutton authored
      * Separate date from datetime binning options
      
      The BE sends over binning indexes for each field and a top level map for
      how to interpret these keys.
      
      ```javascript
      ❯ http get http://localhost:3000/api/table/10658/query_metadata Cookie:$SESSION -pb
      {
          "active": true,
          "caveats": null,
          "created_at": "2023-03-21T22:20:42.363169Z",
          "db": {
              "engine": "postgres",
              "features": [ "full-join", ... ],
              "id": 499,
              ...
          },
          "db_id": 499,
          "dimension_options": {
              "0": { "mbql": [ "field", null, { "temporal-unit": "day" } ],
                     "name": "Day",
                     "type": "type/Date"},
              "1": { "mbql": [ "field", null, { "temporal-unit": "week" } ],
                     "name": "Week",
                     "type": "type/Date" },
              "10": { "mbql": ["field", null, { "temporal-unit": "quarter-of-year"}],
                      "name": "Quarter of Year",
                      "type": "type/Date" },
              "11": { "mbql": [ "field", null, { "temporal-unit": "minute" } ],
                      "name": "Minute",
                      "type": "type/DateTime"},
              "12": { "mbql": [ "field", null, { "temporal-unit": "hour"}],
                      "name": "Hour",
                      "type": "type/DateTime"},
              ... // more options. They have a type, an id, and an mbql clause
          },
          "display_name": "Different Times",
          "entity_type": null,
          "fields": [{"name": "id",},
                     {"name": "dt",
                      "dimension_options": [
                          "11", "12", "13", "14", "15", "16", "17",
                          "18", "19", "20", "21", "22", "23", "24", "25"]
                      "database_type": "timestamp",
                      "effective_type": "type/DateTime",
                     },
                     {"name": "t",
                      "dimension_options": [ "26", "27", "28" ],
                      "effective_type": "type/Time",
                      "database_type": "time"
                     },
                     {"name": "d",
                      "database_type": "date",
                      "dimension_options": [ "0", "1", "2", "3", "4", "5",
                                             "6", "7", "8", "9", "10" ],
                      "effective_type": "type/Date",
              }
          ],
          "name": "different_times",
          ...
      }
      ```
      
      This PR adds some new types just for dates so that you don't get offered
      by group a date by hour or minute.
      
      This adds new indexes to this list, which makes us wary that these
      indexes have leaked out and cannot be changed. But that is not the
      case. This is essentially compression on the response. When the FE saves
      a query, it does not include the index but uses the mbql query to insert
      the proper temporal-unit:
      
      ```clojure
      ;; a "date" field choosing the quarter option
      {:type :query,
       :query {:source-table 5,
               :breakout [[:field 49 {:temporal-unit :quarter}]],
               :aggregation [[:count]]},
       :database 1}
      
      ;; the same query but binning by week
      {:database 1,
       :query {:source-table 5,
               :breakout [[:field 49 {:temporal-unit :week}]],
               :aggregation [[:count]]},
       :type :query}
      ```
      
      So the index is relative to just the editing session of the query, and
      the indexes do not have to be stable when we add new ones.
      
      * athena and mongo (others?) don't have a date type
      
      the test expects a date field to have date binning options. previous, we
      made no distinction for binning options for date vs datetime fields. Now
      we do and have to manage expectations in the tests.
      
      * mongo returns type/Instant
      a4f01b69
    • Emmad Usmani's avatar
      fix pie chart legend not fading on hover (#29415) · bcb7d3e3
      Emmad Usmani authored
      * fix pie chart legend not fading on hover
      
      * use `aria-current` in test instead of directly checking style
      
      * fix failing test
      bcb7d3e3
    • Natalie's avatar
      bc443890
    • Ngoc Khuat's avatar
      db/count, db/exist? => toucan2 (#29432) · f31368f6
      Ngoc Khuat authored
      * db/count -> t2/count
      
      * db/exists -> t2/exists
      f31368f6
    • Uladzimir Havenchyk's avatar
    • Braden Shepherdson's avatar
      [MLv2] Implement `->legacy-MBQL` for converting pMBQL back · 2bae06ce
      Braden Shepherdson authored
      This is tested implicitly by round-tripping every legacy MBQL query
      the BE tests pass to `mt/mbql-query` etc.
      2bae06ce
    • Nick Fitzpatrick's avatar
      a66da6e7
    • Cal Herries's avatar
      Use type/JSON for field base_type for postgres and mysql (#28849) · 48dcfc92
      Cal Herries authored
      * Use type/JSON instead of type/SerializedJSON
      
      * Tidy migration
      
      * Update migration
      
      * Fix rollback migration for h2
      
      * whitespace
      
      * Add test for migration
      
      * Fix test
      
      * Add rollback
      
      * whitespace
      
      * Test JSONB type as well as JSON
      
      * Don't fingerprint JSON columns
      
      * Remove comment, that might be wrong in the future
      
      * Update test
      
      * Add tests for fingerprinting
      
      * Use base-type JSON for fingerprinting base query
      
      * Add test for visibility-type=details-only
      
      * undo .
      
      * Change migration id
      
      * Fix migration test
      
      * Merge master
      
      * Exclude mariadb from tests
      
      * Make is-mariadb? public
      48dcfc92
    • Ngoc Khuat's avatar
      db/insert! to t2 (#29389) · fbfb7e9b
      Ngoc Khuat authored
      * convert db\/insert! to t2
      fbfb7e9b
    • Cal Herries's avatar
      Remove support for nested-field-columns feature for redshift (#29465) · 98223738
      Cal Herries authored
      * Drop support for nested field columns for redshift
      
      * db/select -> t2/select
      
      * Remove clj_kondo file
      98223738
    • Tim Macdonald's avatar
      Add action.dataset_query to search results (#29399) · a967a464
      Tim Macdonald authored
      
      * Add action.dataset_query to search results
      
      * Add action.database_id to search results
      
      * Unskip repro
      
      * better FE error handling for action query display
      
      * update repro
      
      ---------
      
      Co-authored-by: default avatarRyan Laurie <iethree@gmail.com>
      a967a464
    • Nemanja Glumac's avatar
      [E2E] Remove `addFilterToDashboard` custom Cypress command (#29448) · aa945fb9
      Nemanja Glumac authored
      * Remove usages of `cy.addFilterToDashboard` custom command
      
      * Fully remove `cy.addFilterToDashboard` custom command
      aa945fb9
Loading