Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Mar 13, 2023
  2. Mar 11, 2023
  3. Mar 10, 2023
    • adam-james's avatar
      Improving axes grouping/splitting in static viz. (#28295) · 03fdddb8
      adam-james authored
      * WIP for better axes grouping in static viz.
      
      Double x-axis and single x-axis are different, but both can have situations where grouping might occur, so the
      implementation is a tad confusing. I'm trying to build test cases that represent both scenarios reasonably, and build
      an implementation that's not too confusing.
      
      * Fix reflection warnings in render test utils
      
      * Overlap calcs don't fail with BigDecimal inputs now.
      
      * Continuing to clean up overlaps calcs and impl for single/double in progress
      
      * WIP version that works for single-x multi-series and double-x multi
      
      There's a lot to think about here...
      
      But basically, handle rows of shape:
      
      double-x:
      
      [[x1 x2] [y]]
      
      and single-x:
      
      [[x] [y1 y2 y3]]
      
      * Single and Multi X axis now use same axes grouping strategy
      
      * Cover some overlap scoring cases.
      
      This may need improving in future still, but the overlap calculation is at least used for both single-x and multi-x
      axis scenarios now, which is a definitie improvement.
      
      * Missed these unused bindings in test let body
      
      * overlap calc won't fail if we pass in `[nil nil]`
      
      * Clean up grouping axes implementation addressing review feedback.
      
      - overlap and nearness split into two functions
      - add the fn 'axis-group-score' to call overlap/nearness appropriately, and handle condition checks (eg. nil vals)
      - removed old group-axes and now unnecessasry default-y-axis-pos fn -> handled by group-axes-at-once fn
      - axis group threshold not passed as arg anymore
      
      * Fixed some alignment mistakes
      Unverified
      03fdddb8
    • Natalie's avatar
      docs - countif (#29104) · 74208f7c
      Natalie authored
      Unverified
      74208f7c
    • Emmad Usmani's avatar
    • Aleksandr Lesnenko's avatar
    • dpsutton's avatar
      List actions endpoint (#29055) · d2e893dd
      dpsutton authored
      
      * List all actions
      
      previously `api/action` required `?model-id=<model-id>`. This caused the
      FE to DOS the backend looping over each action. On stats I found 350 or
      so sequential requests, with app-db saturation leading to requests
      taking from 400ms near the beginning to 7seconds near the end.
      
      This makes `model-id` option and now returns actions on all models the
      user can see.
      
      ```
      ❯ http GET "localhost:3000/api/action" Cookie:$SESSION -pb
      [
          {
              "archived": false,
              "creator": {...},
              "creator_id": 1,
              "database_id": 3,
              "dataset_query": {...},
              "id": 1,
              "model_id": 1,
              "name": "source = foo",
              "parameter_mappings": null,
              "parameters": [...],
              ...
          }
          ...
      ]
      ```
      
      * update frontend for action picker to support single action list endpoint
      
      * list actions tests
      
      * update actions e2e tests
      
      * Return empty vector if no results
      
      Running tests locally might return some extra actions not asserted on in
      the tests. And there you might expect a 200. But CI runs with an empty
      database and returns no response so you get a 204. Quite annoying and
      there's no good way to expect a "2xx" status code at the moment. So just
      return the empty vector so it's always a 200 code.
      
      * update actions endpoint unit test mocks
      
      * Simplify logic a little
      
      * docstring tweak
      
      * schema with better error message
      
      * update mocks to accept optional modelId
      
      * simplify sorting and grouping
      
      * make sort case-insensitive
      
      * simplify action api test mocks
      
      ---------
      
      Co-authored-by: default avatarRyan Laurie <iethree@gmail.com>
      Unverified
      d2e893dd
    • Jeff Bruemmer's avatar
      docs - add examples (#29128) · 954eb615
      Jeff Bruemmer authored
      Unverified
      954eb615
    • dpsutton's avatar
      Handle models with joins (#29014) · 9d7d51f8
      dpsutton authored
      * Handle models with joins
      
      We had been using the metadata from the query to get column names, and
      then `select (column-names) from persisted-table`.
      
      But joins affect how columns are emitted.
      
      For this tests, using orders join to products, selecting order.total and
      product.category. And the metadata from running this query uses the
      normal names `:name "total"`, and `:name "category"`. _BUT_ the emitted
      sql does not use these names:
      
      ```sql
      SELECT "public"."orders"."total" AS "total",
             "products"."category" AS "products__category" -- <--------
      FROM "public"."orders"
      LEFT JOIN "public"."products" AS "products"
             ON "public"."orders"."product_id" = "products"."id"
      ```
      
      When we persist, we do `create table as <(qp/compile query)> so we were
      creating a column named `products__category` _NOT_ "category". But later
      on we would select "category" and this would blow up.
      
      ```sql
      select "total", "category" -- <- category doesn't exist in this table
      from "metabase_cache_424a9_8"."model_1105_txbhmkrnoy"
      ```
      
      Now a query of `{:source-table "card__<model-id>"}' emits the following
      query when the persisted cache is substituted:
      
      ```sql
      SELECT "source"."total" AS "total",
             "source"."products__category" AS "products__category"
      FROM (select * from "metabase_cache_424a9_8"."model_1152_lecqfzcjke") AS
      "source"
      LIMIT 1048575
      ```
      
      * Test and lint fixes
      Unverified
      9d7d51f8
    • Jeff Bruemmer's avatar
      docs - dash actions (#29054) · bd851a9d
      Jeff Bruemmer authored
      Unverified
      bd851a9d
    • Ngoc Khuat's avatar
      Exclude non required PKs from implicit create action (#29110) · 0b9acc66
      Ngoc Khuat authored
      * Exclude non-required PKs from implicit create actions
      Unverified
      0b9acc66
    • Ngoc Khuat's avatar
    • Mark Bastian's avatar
      Commented what we cannot currently upgrade (#29098) · 5fce23d8
      Mark Bastian authored
      Added comments to org.mariadb.jdbc/mariadb-java-client and io.github.resilience4j/resilience4j-retry deps so we know what's blocking their upgrades.
      Unverified
      5fce23d8
    • Ngoc Khuat's avatar
  4. Mar 09, 2023
Loading