Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 15, 2024
  2. Aug 14, 2024
  3. Aug 13, 2024
  4. Aug 12, 2024
    • Alexander Polyankin's avatar
    • adam-james's avatar
      Add Timeseries insights even when Custom Columns exist (#46253) · 34e0b67c
      adam-james authored
      * Add Timeseries insights even when Custom Columns exist
      
      WIP
      
      Fixes 46244
      
      I don't know why it was (maybe still is) required that the :other columns be empty before providing insights.
      
      * might be a solution to changing trendlines when data doesn't change
      
      The insights code that powers the frontend trendline requires taking a sample of the dataset.
      
      This sampling has some randomness associated by design, and should maintain its randomness. But it makes some sense to
      use the exact same sample when the input has not changed at all, hence trying this memoize approach out.
      
      Might not be the final solution, but it's a start
      
      * add test to show that insights are computed
      
      * use java.util.random with a seed to keep insights stable
      34e0b67c
    • Duncan Mak's avatar
      Support hhmm timezone format (#46172) · 86d2e1bb
      Duncan Mak authored
      * Add testcase from https://github.com/metabase/metabase/issues/43915
      
      
      
      * Try a custom formatter if the default formatter for OffsetDateTime doesn't work
      
      * Add testcase
      
      * Make auxillary formatter private
      
      * Catch a more specific exception
      
      * Throw IllegalArgumentException on invalid dates
      
      * Use strict resolver and fix test
      
      * Empty commit to assign credit where it's due
      
      ---------
      
      Co-authored-by: default avatarChris Truter <chris@metabase.com>
      86d2e1bb
    • adam-james's avatar
      Dowload Row Limit Env Var (#46401) · 47d9fc19
      adam-james authored
      
      * Dowload Row Limit Env Var
      
      Adds `MB_DOWNLOAD_ROW_LIMIT` to enable changing the row limit on downloads and alert/subscription attachments (not the
      rendered tables, but the .csv, etc.).
      
      Based on: #44982 (Thanks, @r-kot)
      
      Partially implements: #28144
      
      The difference in this PR compared to #44982 is that the download limit applies to all downloads, the only exception
      being when the limit is above `qp.i/absolute-max-results` (1048575, based on Excel's limitation); in such a case, the
      user supplied limit is only used if the download is csv or json, and `qp.i/absolute-max-results` is used for xlsx.
      
      This PR also fixes alert/subscription attachment limits; prior to this, they were set to the in-app limit of 2000
      rows, but now they will follow the user supplied download-row-limit.
      
      This PR also adds a test to the downloads-and-exports test namespace, confirming that they follow the supplied limit,
      or the max limit if none is supplied.
      
      * add test confirming the default limit works
      
      * fix test to use the download-row-limit
      
      * address review feedback
      
      * Update src/metabase/public_settings.clj
      
      Co-authored-by: default avatarCal Herries <39073188+calherries@users.noreply.github.com>
      
      * add test covering case where download-row-limit is unset
      
      ---------
      
      Co-authored-by: default avatarCal Herries <39073188+calherries@users.noreply.github.com>
      47d9fc19
    • Chris Truter's avatar
      eca4bb5f
    • Alexander Solovyov's avatar
    • Alexander Solovyov's avatar
      1628d5fa
  5. Aug 09, 2024
  6. Aug 08, 2024
  7. Aug 07, 2024
  8. Aug 06, 2024
  9. Aug 05, 2024
    • Ngoc Khuat's avatar
      3c4a1ce3
    • Chris Truter's avatar
      Various hardenings for SQL analysis (#46432) · 39bb33ec
      Chris Truter authored
      ### Description
      
      This change should fix some explosions in stats due to phantom fields, while also making things a bit more rigorous.
      
      - Record the table schema in query_field - especially useful for unknown tables
      - Allow null table names in query_field - they might be phantoms, or they might not
        - We still have the option to filter them out in tools we build on top
      - Tighten up matching logic to consider schema
      39bb33ec
  10. Aug 02, 2024
    • John Swanson's avatar
      Fix coll permissions for audit collection (#46351) · 7e826d72
      John Swanson authored
      * Fix coll permissions for audit collection
      
      We've had a function in `models.collection` for a while that has taken a
      permissions set and returned a set of collection IDs that the user has
      permissions on. I refactored this recently, but didn't notice that it
      was actually doing the permissions checks slightly incorrectly.
      Specifically, because it only looks at the user's permissions and the
      collection IDs and doesn't use `mi/can-read?` or `mi/can-write?`, it's
      completely indifferent to whether a collection is an audit collection or
      not.
      
      This is arguably not a *permissions* issue: the two errors that could
      come about here are:
      
      - someone sees the audit collection even though the audit feature is
      disabled, or
      
      - someone is presented with the audit collection in a context where only
      writable collections should be present - when they try to actually write
      to it, it fails (since then we're doing the real permissions check).
      
      The primary motivation for this fix was to prevent audit dashboards and
      cards from appearing in the list of stale items.
      
      * Fix hardcoded collection ID
      
      We were creating a timeline in a fixed collection ID, that in tests
      happened to be the ID of the Metabase Analytics collection.
      7e826d72
    • lbrdnk's avatar
      Avoid sorting by missing aggregation reference (#46386) · b4b8f6e9
      lbrdnk authored
      * Update values-from-card-query
      
      * Add test
      
      * Update values-from-card-query
      
      * Add missing issue no
      b4b8f6e9
    • Chris Truter's avatar
      Tighten up queue test (#46420) · 5ba895be
      Chris Truter authored
      5ba895be
    • Ngoc Khuat's avatar
      9f1cbc3c
  11. Aug 01, 2024
    • lbrdnk's avatar
      Avoid adding temporal-unit to lhs cols (#46262) · 07648603
      lbrdnk authored
      * Avoid adding temporal-unit to lhs cols
      
      * Use :default temporal-unit
      
      * Simplify logic, update comments
      
      * Update substitute-field-filter-test
      
      * Update align-temporal-unit-with-param-type-test
      
      * Update field-filter-date-test
      
      * Use end-excludding gte lt filter for DateTime fields
      
      * Update substitute-field-filter-test
      
      * Update align-temporal-unit-with-param-type-test
      
      * Update field-filter-date-test
      
      * Update bigquery test + comment
      
      * Update date-str->qp-aware-offset-dt
      
      * Add guard for unexpected date string format
      
      This is just for the completeness, I haven't encountered it.
      
      * Address review remarks
      
      * Update comment
      07648603
    • Chris Truter's avatar
      Detect queries referencing unknown tables (#46185) · 8005283a
      Chris Truter authored
      * Squash
      
      * Clean up query modifier for validating card references (#46283)
      
      * Fixup bad git merge on test expectation
      
      * Tweak docstrings and de-densify logic
      8005283a
    • lbrdnk's avatar
      Revert "Add `:relative-time-interval` mbql function (#46211)" (#46370) · ae63a13c
      lbrdnk authored
      This reverts commit 72a20181.
      ae63a13c
    • lbrdnk's avatar
      Add `:relative-time-interval` mbql function (#46211) · 72a20181
      lbrdnk authored
      * Add :relative-time-interval mbql function
      
      * Add relativeDateFilterPartsRelativeTimeInterval
      
      * Update display-name-method :relative-time-interval
      
      * Update desugar-relative-time-interval
      
      * Define relative-time-filter op
      
      * Add or update tests
      
      * Update tests
      
      * Update display-name-method
      
      * Update test
      
      * Fix positive relative-time-interval shift
      72a20181
    • Ngoc Khuat's avatar
Loading