Conversation
compiler/optimizer/optimizer.go
Outdated
| } | ||
| } | ||
|
|
||
| func breakupFilter(e dag.Expr) []dag.Expr { |
There was a problem hiding this comment.
Nit: I think a name like splitConjunction would make the behavior of this clearer.
There was a problem hiding this comment.
I like split but Conjunction to me doesn't necessarily imply filter or predicate. Maybe splitPredicate?
There was a problem hiding this comment.
My beef with splitPredicate is that it doesn't really say anything about how the function parameter will be split. splitConjunction at least suggests that if the parameter is a logical conjunction then it will be split into its operands.
|
It's a functional 👍 for me! While the sqllogictests contain lots of heavy cross joins it didn't seem like I could easily spot any that had only predicate expressions with constant comparisons, so I modified one. There's probably no need to make this into a ztest in the super repo since we'll have thousands of similar tests that are even more complex once the full feature work is complete, but FWIW with the attached test data data.tgz, this query runs fast and produces the same result as the equivalent in Postgres: ...whereas at current tip of |
|
thanks @philrz good to hear |
This commit adds functionality to the optimizer to pull up simple join predicates. Currently this will only pullup simple predicate expressions where keys are compared against constant values.
nwt
left a comment
There was a problem hiding this comment.
I still think pullup is the wrong term here because this pushes filters down toward the sources rather than pulling them upward. But we can sort that out after this is merged.
This commit adds functionality to the optimizer to pull up simple join predicates. Currently this will only pullup simple predicate expressions where keys are compared against constant values.
Partially fixes #6074