-
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
[MLv2] Introduce swap-clauses
to reorder aggregations, etc.
#39850
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @bshepherdson and the rest of your teammates on Graphite |
4fdb1b8
to
58befcb
Compare
|
58befcb
to
de77af6
Compare
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 believe order can be dependent in expressions & joins. I'm not sure if the FE is requesting these swaps or not, if not then I would leave them out of swappable causes for the moment, if so then I would prevent illegal swaps.
Currently the FE would not call |
FE changes were approved here #39205 |
61f7bdd
to
469fb1d
Compare
This includes some generative testing, since that felt like
a great way to try all kinds of permutations of swapping clauses.
This also patches
metabase.types/assignable?
to memoize it.Deeply nested
assignable?
calls made 100 tests of swappingfilters take 1600ms rather than the 50-60ms of the other clauses.
I think this is safe and reasonable on memory to cache forever,
but speak up if you're concerned. There's perhaps O(60) type
keywords, so
type X type -> Boolean
is a small space impact.