-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
Offset()
as an expression with no breakouts [backend] (#42132)
* Only nest expressions referenced in breakouts or aggregations * Support Offset() as expression with no breakouts * Test fixes 🔧 * Oracle test update * Improved Oracle test * Test update 🔧 * Fix busted test * Fix running and saving Offset over the REST API * Remove stray :wow * More test fixes 🔧
- Loading branch information
Showing
12 changed files
with
213 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(ns metabase.lib.schema.expression.window-test | ||
(:require | ||
#?@(:cljs ([metabase.test-runner.assert-exprs.approximately-equal])) | ||
[clojure.test :refer [deftest are]] | ||
[metabase.lib.normalize :as lib.normalize])) | ||
|
||
#?(:cljs (comment metabase.test-runner.assert-exprs.approximately-equal/keep-me)) | ||
|
||
(deftest ^:parallel normalize-offset-test | ||
(are [x] (=? [:offset | ||
{:lib/uuid string?, :effective-type :type/Float} | ||
[:field | ||
{:base-type :type/Float, :effective-type :type/Float, :lib/uuid string?} | ||
1] | ||
-1] | ||
(lib.normalize/normalize x)) | ||
[:offset | ||
{:effective-type "type/Float"} | ||
[:field | ||
{:base-type "type/Float", :effective-type "type/Float"} | ||
1] | ||
-1] | ||
|
||
["offset" | ||
{"effective-type" "type/Float"} | ||
["field" | ||
{"base-type" "type/Float", "effective-type" "type/Float"} | ||
1] | ||
-1])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.