pgsql: Teach bitmap path generation about transforming OR-clauses to SA

2024-11-23 Thread Alexander Korotkov
Teach bitmap path generation about transforming OR-clauses to SAOP's When optimizer generates bitmap paths, it considers breaking OR-clause arguments one-by-one. But now, a group of similar OR-clauses can be transformed into SAOP during index matching. So, bitmap paths should keep up. This comm

pgsql: Transform OR-clauses to SAOP's during index matching

2024-11-23 Thread Alexander Korotkov
Transform OR-clauses to SAOP's during index matching This commit makes match_clause_to_indexcol() match "(indexkey op C1) OR (indexkey op C2) ... (indexkey op CN)" expression to the index while transforming it into "indexkey op ANY(ARRAY[C1, C2, ...])" (ScalarArrayOpExpr node). This transformatio