From c8f5bd3f4f45723eafbc97dff85ce696c86ffe0b Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Sat, 10 May 2025 00:26:11 +0300 Subject: [PATCH] rename --- core/translate/optimizer.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/translate/optimizer.rs b/core/translate/optimizer.rs index 35b0a14f9..6fd0855ee 100644 --- a/core/translate/optimizer.rs +++ b/core/translate/optimizer.rs @@ -123,7 +123,8 @@ const SELECTIVITY_EQ: f64 = 0.01; const SELECTIVITY_RANGE: f64 = 0.4; const SELECTIVITY_OTHER: f64 = 0.9; -fn join_lhs_tables_to_rhs_table<'a>( +/// Join n-1 tables with the n'th table. +fn join_lhs_and_rhs<'a>( lhs: Option<&JoinN>, rhs_table_number: usize, rhs_table_reference: &TableReference, @@ -582,7 +583,7 @@ fn compute_best_join_order<'a>( is_outer: false, }; assert!(join_order.len() == 1); - let rel = join_lhs_tables_to_rhs_table( + let rel = join_lhs_and_rhs( None, i, table_ref, @@ -698,7 +699,7 @@ fn compute_best_join_order<'a>( assert!(join_order.len() == subset_size); // Calculate the best way to join LHS with RHS. - let rel = join_lhs_tables_to_rhs_table( + let rel = join_lhs_and_rhs( Some(lhs), rhs_idx, &table_references[rhs_idx], @@ -803,7 +804,7 @@ fn compute_naive_left_deep_plan<'a>( .collect::>(); // Start with first table - let mut best_plan = join_lhs_tables_to_rhs_table( + let mut best_plan = join_lhs_and_rhs( None, 0, &table_references[0], @@ -816,7 +817,7 @@ fn compute_naive_left_deep_plan<'a>( // Add remaining tables one at a time from left to right for i in 1..n { - best_plan = join_lhs_tables_to_rhs_table( + best_plan = join_lhs_and_rhs( Some(&best_plan), i, &table_references[i],