Skip to content

Commit 6384052

Browse files
committed
Fix outdated convert_saop_to_hashed_saop comment
In 29f45e2, we added support for optimizing the execution of NOT IN(values) by using a hash table instead of a linear search over the array. That commit neglected to update the header comment for convert_saop_to_hashed_saop() to mention this fact. Here we fix that. Author: James Coleman Discussion: https://postgr.es/m/CAAaqYe99NUpAPcxgchGstgM23fmiGjqQPot8627YgkBgNt=BfA@mail.gmail.com Backpatch-through: 15, where 29f45e2 was added.
1 parent 111d954 commit 6384052

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/optimizer/util/clauses.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2117,7 +2117,8 @@ eval_const_expressions(PlannerInfo *root, Node *node)
21172117
*
21182118
* We'll use a hash table if all of the following conditions are met:
21192119
* 1. The 2nd argument of the array contain only Consts.
2120-
* 2. useOr is true.
2120+
* 2. useOr is true or there is a valid negator operator for the
2121+
* ScalarArrayOpExpr's opno.
21212122
* 3. There's valid hash function for both left and righthand operands and
21222123
* these hash functions are the same.
21232124
* 4. If the array contains enough elements for us to consider it to be

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy