You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Similar to50e17ad, which allowed hash tables to be used for IN clauseswith a set of constants, here we add the same feature for NOT IN clauses.NOT IN evaluates the same as: WHERE a <> v1 AND a <> v2 AND a <> v3.Obviously, if we're using a hash table we must be exactly equivalent tothat and return the same result taking into account that either side ofthe condition could contain a NULL. This requires a little bit ofspecial handling to make work with the hash table version.When processing NOT IN, the ScalarArrayOpExpr's operator will be the <>operator. To be able to build and lookup a hash table we must use the<>'s negator operator. The planner checks if that exists and is hashableand sets the relevant fields in ScalarArrayOpExpr to instruct the executorto use hashing.Author: David Rowley, James ColemanReviewed-by: James Coleman, Zhihong YuDiscussion:https://postgr.es/m/CAApHDvoF1mum_FRk6D621edcB6KSHBi2+GAgWmioj5AhOu2vwQ@mail.gmail.com