gustavodemorais commented on code in PR #29565:
URL: https://github.com/apache/flink/pull/29565#discussion_r4350903298


##########
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/operators/join/snapshot/LateralSnapshotJoinOperatorTest.java:
##########
@@ -1250,6 +1251,8 @@ void joinRespectsNullKeysFilter(boolean leftOuter, 
boolean filterNullKey) throws
                 newHarness(op)) {
             h.open();
             addBuildChange(h, insertRecord(null, "v_null", 1L));
+            // A build row that can never match is not stored
+            assertThat(bufferedChangesForKey(h, op, 
null)).hasSize(filterNullKey ? 0 : 1);

Review Comment:
   The NULL-key build tests only use `+I` and `-D`. Could we also add a `+U` 
NULL-key row to `joinRespectsNullKeysFilter` and use an `UPDATE_BEFORE` for the 
stored row in `retractsNullKeyBuildRowStoredByEarlierVersion`? Right now 
narrowing the guard to `RowKind.INSERT` wouldn't fail any test.



##########
docs/content/docs/sql/reference/queries/joins.md:
##########
@@ -464,7 +464,7 @@ They are reported under the operator's [metric group]({{< 
ref "docs/ops/metrics"
 | `maxJoinFanOut` | Gauge | The largest number of joined rows emitted for a 
single probe-side row.                                                          
                                                                                
                                                                                
        |
 | `avgJoinFanOut` | Gauge | The average number of joined rows emitted per 
probe-side row.                                                                 
                                                                                
                                                                                
          |
 | `numUnmatchedProbeRecords` | Counter | The number of probe-side rows that 
found no build-side match. For an `INNER JOIN` these produce no output; for a 
`LEFT JOIN` they are emitted null-padded.                                       
                                                                                
                       |
-| `numUnmatchedBuildRetractions` | Counter | The number of build-side 
retractions (`-U`/`-D`) for a row that was not present in state.                
                                                                                
                                                                                
                               |
+| `numUnmatchedBuildRetractions` | Counter | The number of build-side 
retractions (`-U`/`-D`) for a row that was not present in state. Retractions of 
rows whose join key can never match, because a key field that is not compared 
null-safely is `NULL`, are not counted, since such rows are not stored. |

Review Comment:
   ```suggestion
   | `numUnmatchedBuildRetractions` | Counter | The number of build-side 
retractions (`-U`/`-D`) for a row that was not present in state. Retractions of 
rows with a `NULL` in a join key compared with `=` are not counted, since such 
rows are never stored. |
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to