File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1515// specific language governing permissions and limitations
1616// under the License.
1717
18- //! Optimizer rule to extract equijoin expr from filter
18+ //! [`ExtractEquijoinPredicate`] rule that extracts equijoin predicates
1919use crate :: optimizer:: ApplyOrder ;
2020use crate :: utils:: split_conjunction;
2121use crate :: { OptimizerConfig , OptimizerRule } ;
@@ -28,7 +28,17 @@ use std::sync::Arc;
2828// equijoin predicate
2929type EquijoinPredicate = ( Expr , Expr ) ;
3030
31- /// Optimization rule that extract equijoin expr from the filter
31+ /// Optimizer that splits conjunctive join predicates into equijoin
32+ /// predicates and (other) filter predicates.
33+ ///
34+ /// Join algorithms are often highly optimized for equality predicates such as `x = y`,
35+ /// often called `equijoin` predicates, so it is important to locate such predicates
36+ /// and treat them specially.
37+ ///
38+ /// For example, `SELECT ... FROM A JOIN B ON (A.x = B.y AND B.z > 50)`
39+ /// has one equijoin predicate (`A.x = B.y`) and one filter predicate (`B.z > 50`).
40+ /// See [find_valid_equijoin_key_pair] for more information on what predicates
41+ /// are considered equijoins.
3242#[ derive( Default ) ]
3343pub struct ExtractEquijoinPredicate ;
3444
You can’t perform that action at this time.
0 commit comments