Skip to content

Commit

Permalink
don't multiplex null keys to fix Combine.globally
Browse files Browse the repository at this point in the history
  • Loading branch information
arunpandianp committed Dec 16, 2024
1 parent 2c19b34 commit 8ad6a40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ public void verifyCompatibility(WindowFn<?, ?> other) throws IncompatibleWindowE
if (other instanceof KeyedWindowFn) {
windowFn.verifyCompatibility(((KeyedWindowFn<?, ?, ?>) other).windowFn);
}
;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ public void setup() {
@ProcessElement
public void processElement(ProcessContext c) {
KV<K, V> kv = c.element();
if (kv.getKey() == null) {
// Combine.globally treats null keys specially
// so don't multiplex them.
c.output(largeKeys, KV.of(null, kv.getValue()));
return;
}
try {
// clear output stream
byteStringOutputStream.toByteStringAndReset();
Expand Down

0 comments on commit 8ad6a40

Please sign in to comment.