-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Offset()
as an expression with no breakouts [backend]
#42132
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c98cb0c
Only nest expressions referenced in breakouts or aggregations
camsaul 0e032bc
Support Offset() as expression with no breakouts
camsaul b99b38b
Merge branch 'only-nest-expressions-in-breakouts-or-aggregations' int…
camsaul 289fd3e
Test fixes :wrench:
camsaul cc1cb98
Merge branch 'only-nest-expressions-in-breakouts-or-aggregations' int…
camsaul ac3f9a8
Oracle test update
camsaul acbf163
Improved Oracle test
camsaul 5674086
Merge branch 'only-nest-expressions-in-breakouts-or-aggregations' int…
camsaul 7bc8ce3
Test update :wrench:
camsaul e5ddb86
Fix busted test
camsaul cb458f5
Fix running and saving Offset over the REST API
camsaul 8c2fdb4
Remove stray :wow
camsaul c386d12
More test fixes :wrench:
camsaul d187257
Merge branch 'master' into only-nest-expressions-in-breakouts-or-aggr…
camsaul 5e37e70
Merge branch 'only-nest-expressions-in-breakouts-or-aggregations' int…
camsaul File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that using
Offset
in custom column expression requires presence of an order-by clause or a breakout clause. The following video shows me trying it out:effective-type: "type/Float"
in pMBQL and BE throws because of itAre those BE issues?
2024-05-07.18-22-41.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what branch are you on, so I can test this locally?
Btw I just fixed the
effective-type
error, #42323 should be fixed in this branch tooThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aforementioned issues seem to be fixed now ✔️
Sorry, I was using
42318-offset-custom-columns-frontend
branch to test it.