This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Jul 04, 2023
-
-
john-metabase authored
This reverts commit 9da0bd76.
-
- Jun 20, 2023
-
-
john-metabase authored
-
- Jun 12, 2023
-
-
Cam Saul authored
* MLv2: Fix matching of field literals to field integer IDs (#31487) * MLv2: Fix matching of field literals to field integer IDs * Better test * Update src/metabase/lib/equality.cljc Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> --------- Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> * Fix #31482 not showing join display name for busted breakout from drill thru --------- Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com>
-
- Jun 02, 2023
-
-
Cam Saul authored
Use MLv2 for metadata calculation in QP (part 1); make column name calculation consistent with QP (#29583) * Simplified impl * Add #31266 test * Yay * Very nice * Test fixes * Fix Kondo warnings
-
- May 24, 2023
-
-
José María González Calabozo authored
This patch allows Metabase to cast timestamp in milliseconds to datetime
-
- May 23, 2023
-
-
Cam Saul authored
Improve `type-of` calculation for arithmetic expressions; fix schema for temporal arithmetic (#30921) * Fix #29946 * Sort namespaces
-
john-metabase authored
-
- May 19, 2023
-
-
metamben authored
* Implement available-aggregation-operators * Support display-info and getting columns from aggregation-operators * Support adding aggregation operators * Add :cum-sum to the type hierarchy
-
- May 15, 2023
-
-
metamben authored
Fixes #30703.
-
- May 11, 2023
-
-
Braden Shepherdson authored
No `metabase.lib.js` wrapping yet.
-
- May 01, 2023
-
-
metamben authored
-
- Apr 19, 2023
-
-
Braden Shepherdson authored
The current state is a collection of hacks to preserve some legacy behavior (eg. normalization sets a blank `widget-type` to `"category"`) and it doesn't work properly right now. An example of a currently-broken case: - `SELECT * FROM Orders WHERE {{tag}}` - Set it to a Field Filter and select People > LONGITUDE - Or some other field for which type we don't have a widget. - It shows "None" as the widget type, and the widget isn't shown at the top. - Save the question and reopen it. - Now the widget is visible (and a bit broken) as a `"category"` type. This is because on reading from the appdb it gets normalized. This PR uses `"none"` properly for cases where there are no widget options for the field type (eg. longitude), and updates all the usage sites to properly handle `"none"` rather than missing/undefined. Existing saved questions with a blank `widget-type` will continue to "work" as they currently do.
-
Cam Saul authored
-
- Apr 18, 2023
-
-
Cam Saul authored
* Fix clj-kondo analysis for `defclause` * Fix Kondo config * Fix typo
-
Mark Bastian authored
Added embeddings to preprocess sql completions so that we downselect to an appropriate prompt size. This also gives us substantial performance improvements for model and table matching inference.
-
- Apr 11, 2023
-
-
Braden Shepherdson authored
Use the canonical `metabase.mbql.js/normalize` instead, with a bit of customization for the query builder's needs. In the long run this should be fully unified; for now at least the logic is inside MLv2 now. All the test cases from the existing code are still exercised between `selectors.unit.spec` and `metabase.mbql.js_test`.
-
- Mar 31, 2023
-
-
Nemanja Glumac authored
This reverts commit a817ed8a.
-
- Mar 30, 2023
-
-
Cam Saul authored
* shared.ns/import-fn(s) emit optimized defn forms * Code simplification
-
- Mar 29, 2023
-
- Mar 28, 2023
-
-
Cam Saul authored
* Improved implementation * Amazing code cleanup * Cleanup * More tests
-
- Mar 20, 2023
-
-
Cam Saul authored
* Query D E S C R I P T I O N S * WIP * MLv2 Query description * Test fixes * More robust error handling * MLv2 more shuffling things around * Remove unneeded impl * lib.expressions -> lib.expression * Address PR feedback
-
- Mar 13, 2023
-
-
Cam Saul authored
-
- Mar 09, 2023
-
-
Cam Saul authored
* MLv2 metadata overhaul, second try * Stricter linting for MLv2 * Address PR feedback * Revert fancy fn schema for now * Remove unused import * Test fixes
* Oops fix bad :require form * MLv2 mega metadata overhaul 2 of infinity * Test fixes * Cljc humanization * Misc MLv2 improvements from #28921 * Fix indentation * expression.non-integer-real * Remove debugging stuff * More cleanup * Add method for `:advanced` * non-integer-real * Test fixes * Test fixes: ::ref/field shouldn't fail if checked against a non-sequential object * MLv2 `define-mbql-clause` and `type-of` calculation * Continued [ci skip] * MLv2 overhaul :flex: * Address PR feedback * Merge type-of overhaul * Address PR feedback -
Cam Saul authored
* MLv2 `define-mbql-clause` and `type-of` calculation * Continued [ci skip] * MLv2 overhaul :flex:
-
- Feb 24, 2023
-
-
Cam Saul authored
* Mark `hx/` and `h1x/` namespaces and their vars as deprecated * Fix snowflake failures * Remove unneeded honey-sql-version bindings
-
- Feb 21, 2023
-
-
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:
metamben <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:
metamben <103100869+metamben@users.noreply.github.com>
-
- Feb 11, 2023
-
-
Cam Saul authored
* Fix shared.util.i18n * Simplify stuff
-
- Feb 10, 2023
-
-
Cam Saul authored
* Support Honey SQL 2 for SQL QP * Sort namespace * Make Postgres/Redshift be Honey SQL 2-only * Test fix
* Fix busted * Redshift test fixes * Sort namespaces * Fix Postgres convert_timezone * Fix linter config. * Fix one last test failure * Redshift test fix * Test fixes and some extra validation etc. * Update common.clj * Update common.clj * Update common.clj -
Cam Saul authored
* Enable Kondo `:warn-on-reflection` linter * Enable warnings for metabase.api.setting-test * Add warn-on-reflection to metabase.util.jvm
-
Braden Shepherdson authored
Some JVM-specific functions are now in `metabase.util.jvm`, but they are re-exported (in CLJ) by `metabase.util`.
-
- Feb 07, 2023
-
-
Braden Shepherdson authored
This has the same interface as `clojure.tools.logging` but supports CLJS as well. It was formerly known as `metabase.shared.util.log`.
-
- Jan 26, 2023
-
-
Mark Bastian authored
Replaced, as needed, instances of str/lower|upper-case with the -en version. Also updated rules in our kondo config.
-
- Jan 13, 2023
-
-
Braden Shepherdson authored
- Use currency-specific decimals count (eg. 0 for JPY, 8 for BTC) - Use plural currency names in Java, matching JS - previously: singular proper name "7.23 US Dollar" - now: plural prose "7.23 US dollars" - "Small numbers" hack to treat min/max fraction digits as significant digits now applies to percentages under 1%, as well as the original |n| < 1
-
Braden Shepherdson authored
This adds a cross-platform date/time formatting library in CLJC, with (nearly) identical output in both JVM and JS environments. The only known difference is week numbers. CLJS (through Moment.js) has ordinal numbers, and renders the week number as "34th". Neither the JVM nor Clojure has a handy library for this (I'm sure it's out there somewhere, but it seems like a silly dep to add) so it renders week numbers as simply "34". Both platforms have date formatters that use pattern strings (eg. `"YYYY-MM-dd"`) to turn date/time objects into strings. There's a strong resemblance in how these work and what letters stand for what parts of the date and time, but they are far from identical. Rather than try to hackily convert one set of strings to another with regexes or other manipulations, this PR defines a set of names for fragments of dates (eg. `:year`, `:day-of-week-full`, `:hour-24-dd`) and includes functions to transform a list of these keys into a platform-specific format function. This is portable and transparent, and can be written in Clojure or JS code: ```clj [:year "-" :month-dd "-" :day-of-month-dd] ; 2022-04-08 [:month-full " " :day-of-month-d ", " :year] ; April 8, 2022 [:hour-12-dd ":" :minute-dd " " :am-pm] ; 7:52 AM ``` ```js [":year", "-", ":month-dd", "-", ":day-of-month-dd"] ; 2022-04-08 [":month-full", " ", ":day-of-month-d", ", ", ":year"] ; April 8, 2022 [":hour-12-dd", ":", ":minute-dd", " ", ":am-pm"] ; 7:52 AM ``` Note that the original code allowed an unrecognized `:date-style` string to be used directly as the formatting string. With the move to formatting data structures that no longer works. Instead there is a fixed map of format strings to the above data structures, that contains all the currently used `:date-style` inputs. If some caller needs a new format someday, we can either: (a) add the style to the map; or (b) pass the data structure form directly to the `:date-format` option, which if provided is used as the format. It's tempting to go to all the call sites and replace these `:date-style` strings with the new format structures. However, the strings are still embedded in the `:visualization_settings` in user appDBs, so we still need to recognize them. Most of the existing functions in the TS library have the same API. The set of allowed `:date-style` and `:time-style` values is turned into a type using `keyof`, so that we get precise type-checking of these values rather than simply `string`. One function has been dropped from the API: `getDateFormatFromStyle`. There was no practical way to implement it using the new format data structures. The only caller was the date format column settings, and it has been rewritten to use the formatted string for its sample date as its key instead.
-
- Jan 12, 2023
-
-
dpsutton authored
* restore aliases before annotating * cleanup * fix tests * Don't add escaped->original if aliases have not changed No need to walk and replace the aliases if they are identical. And in that case, no need to keep a mapping of identical to identical. Not super important but saves some time and complexity, and keeps other tests passing since the presence of [:info :alias/escaped->original] in the query caused them to trivially fail. * oracle has a smaller limit and _expected_ mangled previous testing behavior was "what happened" and not what should happen. we fixed the bug but the "expect garbage" behavior was still present * Relax :alias/escaped->original schema oracle tests use keywords for the alias ```clojure {:alias/escaped->original {:test-data-venues--via-a763718f "test_data_venues__via__venue_id", :test-data-users--via--user-id "test_data_users__via__user_id"}}} ``` No idea why that is keyworded * relax `:alias/escaped->original` schema see previous commit
-
- Jan 11, 2023
-
-
Ngoc Khuat authored
* add default values keys for dashboard.parmaeters * fix tests and add tests
-
- Jan 09, 2023
-
-
Noah Moss authored
* oxford comma for parameter values with more than 2 items * refactor logic to use a better translated string and fix tests
-
- Dec 29, 2022
-
-
Noah Moss authored
* standardize ns formatting in all src/ namespaces * small fixes * test formatting * enterprise files * fix whitespace linter error * fix kondo error * bin files * reformat shared files * fix errors * fix another error * mostly fix import to use parenthesis and have it at a new line * fix wrong spacing Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com>
-
Ikko Ashimine authored
comparision -> comparison [ci skip]
-
- Dec 21, 2022
-
-
Braden Shepherdson authored
This adds a cross-platform number formatting library in CLJC, which has (nearly) identical output in both JVM and JS environments. The only known differences are: - JVM Clojure has `BigDecimal` support, so isn't limited to a `double`'s range. - Exact spelling/capitalization of the full names of currencies differs. - JVM: "7.34 US Dollar" - JS: "7.34 US dollars" Some future work is required to fully land this. In particular, the `currency_in_header` logic should be moved to the table formatters, not implemented on the JS side of this change.
-