But none of this has any bearing on what makes the optimizations possible .
But it does, it is the primary reason.
Or the secondary reason if the first is ROI: not only can you implement a hash join yourself in the average langage, such a join would only be useful in specific data shapes following the relational model, in most cases your data would be nested or the link would already be expressed through a hash map.
I think that’s covered by:
It’s not, what you quote is an operational implication, it does not account for hash(a) not being a thing at all.
Eg this is very difficult to reason about at compile-time in python, but in rust the compiler could just check for impl Hash for T.
Not according to TFA, since you can have a nonsensical Hash operation all the same.
But none of this has any bearing on what makes the optimizations possible .
But it does, it is the primary reason.
What if we distinguish “what lets us know the transformation preserves the semantics of the query” (aka makes the transformation possible) from “what lets us know that the transformation is profitable” (aka makes us expect the tranformation is an optimization, not a pessimization). There are plenty of transformations for the first that don’t depend on statistics at all.
I take it this is what Jamie meant by
You’re talking about what makes query planning desirable or economical. But none of this has any bearing on what makes the optimizations possible .
But it does, it is the primary reason.
Or the secondary reason if the first is ROI: not only can you implement a hash join yourself in the average langage, such a join would only be useful in specific data shapes following the relational model, in most cases your data would be nested or the link would already be expressed through a hash map.
It’s not, what you quote is an operational implication, it does not account for hash(a) not being a thing at all.
Not according to TFA, since you can have a nonsensical Hash operation all the same.
score 1 · canonical
What if we distinguish “what lets us know the transformation preserves the semantics of the query” (aka makes the transformation possible) from “what lets us know that the transformation is profitable” (aka makes us expect the tranformation is an optimization, not a pessimization). There are plenty of transformations for the first that don’t depend on statistics at all.
I take it this is what Jamie meant by
but perhaps the extra elaboration is helpful.
score 2 · canonical