Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. May 15, 2024
  2. Mar 21, 2024
  3. Oct 03, 2023
  4. Aug 16, 2023
  5. Mar 13, 2023
  6. Mar 10, 2023
  7. Feb 21, 2023
    • john-metabase's avatar
      Improves consistency of substring in MBQL (#28067) · a39b710e
      john-metabase authored
      
      * Improves consistency of substring in MBQL
      
      Standard SQL SUBSTRING() uses a 1-based start index, with various drivers
      handling a 0 start index in different ways. To make the behavior of substring
      consistent across drivers, we will always convert a 0 start index in MBQL
      to a 1 in SQL. The ->honeysql implementation of substring has been generalized
      and drivers can now override just the name of the substring function, or the
      entire expression if necessary. SQL Server now calls the parent implementation.
      
      Resolves #12445
      
      * Fixes substring from 0 in Mongo
      
      * Adds arg to substring parent call
      
      * Fix docs and helper text for substring()
      
      * Adds schema to require positive integer index for substring
      
      * WIP, adds frontend validation for substring index arg
      
      * Adds frontend test for substring arg validation
      
      * Updates substring test to expect exception on index 0
      
      * Update src/metabase/driver/sql/query_processor.clj
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * Use s/if instead of s/conditional
      
      * Fix substring call in mysql substring spec
      
      * Reverts driver and sql.qp changes for substring index
      
      * Reverts changes to dispatch-by-clause-name-or-class
      
      * Fixes typeinferencer test substring index
      
      * Adds test for canonicalizing substring
      
      * Fixes substring canonicalization with extra args
      
      * Updates string extracts test to account for substring canonicalization
      
      * Rewrites resolver validation application
      
      * Adds test case for frontend expression validation errors
      
      * Fixes frontend compiler spec for new substring validation
      
      ---------
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      a39b710e
  8. Jan 25, 2023
  9. Jan 03, 2023
    • Case Nelson's avatar
      Mongo remove v3 support (#27176) · 9c6997bb
      Case Nelson authored
      
      * Fix mongo version checking for now
      
      * Add minor versions for comparison
      
      * Handle nil case
      
      * newline
      
      * Replace _
      
      * Use dbms-version semantic-version instead
      
      * Compare only the major and minor version
      
      * Fix mongo database-supports?
      
      * Fix duplicate require
      
      * Fix typo
      
      * Remove expressions from version check
      
      * Fix various mongo expressions
      
      `trim`, `rtrim`, `ltrim` needed to be wrapped in `{"input" expr}` object
      `replace` needed to be wrapped in `{"input" expr "find" ...
      "replacement" ...}' object
      `substring` needed to fill in the 3rd argument, optional in mbql but
      required in mongo. Also to use a 1 based index
      
      * Generalize semantic-version-gte
      
      * Used synced dbms_version for testing feature support
      
      * Expressions are only supported by mongo 4.2+
      
      * Disable some tests
      
      * Fix mongo division
      
      Handle nulls with an upfront condition check.
      Handle multiple divisors.
      
      * Remove unused namespace
      
      * Throw exeception if using replace on mongo < 4.4
      
      * Skip test because of #27249
      
      * Move minimum Mongo CI version to 4.2
      
      * Fix sorting by expressions
      
      $sort needs to come before $project otherwise we can only see the
      projected fields, however expressions are only added in $project.
      
      So now if a sort includes an expression, we will use $addFields to be
      able to sort by that expression.
      
      * Disable tests for expressions inside aggregations
      
      To be addressed by #27275
      
      * Handle aggregation nested in an expression
      
      * Remove :truncation-start workaround
      
      * Enable tests for expressions inside aggregations
      
      * Fix datetime-math-tests
      
      * Make sure dbms_version is included when fetching database for store
      
      * Update doc for replace to indicate it should replace all occurrences
      
      * Fix order-by-test
      
      * Handle embedded special aggregations (#27315)
      
      * Handle embedded special aggregations
      * Preserve aggregation options for nested aggregations
      * Use top-level aggregation name as group name
      
      * Disable nil punning on semantic version check (#27317)
      
      * Optimize produced query for division when dividing by literals
      
      * Rename var
      
      * Use reduce to build division
      
      * Fix reduction
      
      * Clean up formatting and document some details
      
      Co-authored-by: default avatarCallum Herries <hi@callumherries.com>
      Co-authored-by: default avatarTamás Benkő <tamas@metabase.com>
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      9c6997bb
  10. Dec 06, 2022
  11. Dec 02, 2022
  12. Nov 14, 2022
  13. Nov 07, 2022
  14. Oct 28, 2022
  15. Oct 12, 2022
  16. Sep 30, 2022
  17. Sep 28, 2022
  18. Sep 27, 2022
  19. Sep 13, 2022
  20. Aug 29, 2022
  21. Aug 26, 2022
  22. Aug 15, 2022
  23. Aug 03, 2022
  24. Jul 22, 2022
  25. Jun 13, 2022
  26. Nov 04, 2021
Loading