This is an automated email from the ASF dual-hosted git repository.

viirya pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new bcc2acd8d1 Minor: add doc comments to `ExtractEquijoinPredicate` 
(#7658)
bcc2acd8d1 is described below

commit bcc2acd8d10204b32b64fa3b77372655eaee8f06
Author: Andrew Lamb <[email protected]>
AuthorDate: Wed Sep 27 11:15:17 2023 -0400

    Minor: add doc comments to `ExtractEquijoinPredicate` (#7658)
    
    * Minor: add doc comments to `ExtractEquijoinPredicate`
    
    * Update datafusion/optimizer/src/extract_equijoin_predicate.rs
    
    Co-authored-by: Liang-Chi Hsieh <[email protected]>
    
    ---------
    
    Co-authored-by: Liang-Chi Hsieh <[email protected]>
---
 datafusion/optimizer/src/extract_equijoin_predicate.rs | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/datafusion/optimizer/src/extract_equijoin_predicate.rs 
b/datafusion/optimizer/src/extract_equijoin_predicate.rs
index 20b9c62971..e328eeeb00 100644
--- a/datafusion/optimizer/src/extract_equijoin_predicate.rs
+++ b/datafusion/optimizer/src/extract_equijoin_predicate.rs
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-//! Optimizer rule to extract equijoin expr from filter
+//! [`ExtractEquijoinPredicate`] rule that extracts equijoin predicates
 use crate::optimizer::ApplyOrder;
 use crate::utils::split_conjunction;
 use crate::{OptimizerConfig, OptimizerRule};
@@ -28,7 +28,17 @@ use std::sync::Arc;
 // equijoin predicate
 type EquijoinPredicate = (Expr, Expr);
 
-/// Optimization rule that extract equijoin expr from the filter
+/// Optimizer that splits conjunctive join predicates into equijoin
+/// predicates and (other) filter predicates.
+///
+/// Join algorithms are often highly optimized for equality predicates such as 
`x = y`,
+/// often called `equijoin` predicates, so it is important to locate such 
predicates
+/// and treat them specially.
+///
+/// For example, `SELECT ... FROM A JOIN B ON (A.x = B.y AND B.z > 50)`
+/// has one equijoin predicate (`A.x = B.y`) and one filter predicate (`B.z > 
50`).
+/// See [find_valid_equijoin_key_pair] for more information on what predicates
+/// are considered equijoins.
 #[derive(Default)]
 pub struct ExtractEquijoinPredicate;
 

Reply via email to