You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the docs it suggests to avoid blocking rules with OR, because that prevents the engine from using a hash join.
But I think we can take care of this for users. can we use https://sqlglot.com/sqlglot/optimizer/normalize.html#normalize to convert whatever rules they give us into DNF, and then split this up on the ORs to get our disjoint blocking rules, all which contain only ANDs?
The text was updated successfully, but these errors were encountered:
Hey @NickCrews - this is really cool! I wasn't aware of that function in sqlglot - this is definitely something that would be great to implement under the hood then we can change the docs 😊
Possibility to use this normalize function to flag more performant blocking rules to users, rather than fixing it under the hood. Slightly hesitant to just fix things in the background.
yeah that is a good thing to think about. But, I'm trying to think of a situation where just optimizing it for users wouldn't be the correct thing to do, and I'm drawing a blank...can you think of one?
In the docs it suggests to avoid blocking rules with OR, because that prevents the engine from using a hash join.
But I think we can take care of this for users. can we use https://sqlglot.com/sqlglot/optimizer/normalize.html#normalize to convert whatever rules they give us into DNF, and then split this up on the ORs to get our disjoint blocking rules, all which contain only ANDs?
The text was updated successfully, but these errors were encountered: