mirror of https://github.com/MariaDB/server
Browse Source
Description: The function get_best_ror_intersect is responsible for selecting the optimal combination of ROR scans that minimize cost while improving selectivity. It iteratively adds scans to a selected set (S), ensuring that each addition results in improved selectivity. If selectivity improves, the function then evaluates whether the cost is minimized. The comment contained some inaccuracies: - Incorrect Selectivity Condition: A missing parentheses caused the condition to be misinterpreted, leading to incorrect logic. The function intends to check whether adding a scan improves selectivity before including it in the set. - Loop Condition Issue: The condition for continuing the loop did not properly reduce R in the comment which meant it was an infinite loop. Fix: The comment of the function is fixed addressing the issues. The set should include the scan before comparing the selectivity with the initial set and thus the selectivity condition in the comment is fixed by properly enclosing the expression in parentheses to reflect the intended logic. Ensured that R is properly reduced in each iteration to maintain correctness. Change-Id: Ie197af8211a5ef05a5118a33b8b543d354475780bb-10.6-release
committed by
Sergei Golubchik
1 changed files with 7 additions and 4 deletions
Loading…
Reference in new issue