Mongo remove v3 support (#27176)
* 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:Callum Herries <hi@callumherries.com> Co-authored-by:
Tamás Benkő <tamas@metabase.com> Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com>
Showing
- .github/workflows/drivers.yml 8 additions, 8 deletions.github/workflows/drivers.yml
- docs/questions/query-builder/expressions-list.md 1 addition, 1 deletiondocs/questions/query-builder/expressions-list.md
- modules/drivers/mongo/src/metabase/driver/mongo.clj 16 additions, 25 deletionsmodules/drivers/mongo/src/metabase/driver/mongo.clj
- modules/drivers/mongo/src/metabase/driver/mongo/query_processor.clj 153 additions, 36 deletions...ivers/mongo/src/metabase/driver/mongo/query_processor.clj
- modules/drivers/mongo/test/metabase/driver/mongo_test.clj 11 additions, 19 deletionsmodules/drivers/mongo/test/metabase/driver/mongo_test.clj
- src/metabase/db/metadata_queries.clj 3 additions, 6 deletionssrc/metabase/db/metadata_queries.clj
- src/metabase/driver.clj 2 additions, 3 deletionssrc/metabase/driver.clj
- src/metabase/driver/util.clj 21 additions, 10 deletionssrc/metabase/driver/util.clj
- src/metabase/query_processor/store.clj 1 addition, 0 deletionssrc/metabase/query_processor/store.clj
- test/metabase/driver/util_test.clj 17 additions, 0 deletionstest/metabase/driver/util_test.clj
- test/metabase/query_processor_test/advanced_math_test.clj 8 additions, 1 deletiontest/metabase/query_processor_test/advanced_math_test.clj
- test/metabase/query_processor_test/date_time_zone_functions_test.clj 1 addition, 1 deletion...se/query_processor_test/date_time_zone_functions_test.clj
- test/metabase/query_processor_test/expressions_test.clj 29 additions, 16 deletionstest/metabase/query_processor_test/expressions_test.clj
- test/metabase/query_processor_test/filter_test.clj 7 additions, 17 deletionstest/metabase/query_processor_test/filter_test.clj
- test/metabase/query_processor_test/string_extracts_test.clj 17 additions, 9 deletionstest/metabase/query_processor_test/string_extracts_test.clj
Loading
Please register or sign in to comment