]> granicus.if.org Git - postgresql/commitdiff
Fix NULL handling in multi-batch Parallel Hash Left Join.
authorThomas Munro <tmunro@postgresql.org>
Fri, 2 Nov 2018 22:05:35 +0000 (11:05 +1300)
committerThomas Munro <tmunro@postgresql.org>
Fri, 2 Nov 2018 22:05:35 +0000 (11:05 +1300)
NULL keys in left joins were skipped when building batch files.
Repair, by making the keep_nulls argument to ExecHashGetHashValue()
depend on whether this is a left outer join, as we do in other
paths.

Bug #15475.  Thinko in 1804284042e.  Back-patch to 11.

Reported-by: Paul Schaap
Diagnosed-by: Andrew Gierth
Dicussion: https://postgr.es/m/15475-11a7a783fed72a36%40postgresql.org

src/backend/executor/nodeHashjoin.c

index dd94cffbd18e422de24b635462ec26759797a02b..5922e60eed64e6cb4b49aae476c4ab9a20809269 100644 (file)
@@ -1395,7 +1395,7 @@ ExecParallelHashJoinPartitionOuter(HashJoinState *hjstate)
                if (ExecHashGetHashValue(hashtable, econtext,
                                                                 hjstate->hj_OuterHashKeys,
                                                                 true,  /* outer tuple */
-                                                                false, /* outer join, currently unsupported */
+                                                                HJ_FILL_OUTER(hjstate),
                                                                 &hashvalue))
                {
                        int                     batchno;