Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: cleanup KStream JavaDocs (5/N) - stream-globalTable-inner-join #18747

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

mjsax
Copy link
Member

@mjsax mjsax commented Jan 30, 2025

No description provided.

@@ -1043,33 +1043,96 @@ public <VO, VR> KStream<K, VR> leftJoin(final KTable<K, VO> table,
}
}

@SuppressWarnings("unchecked")
private <VO, VR> KStream<K, VR> doStreamTableJoin(final KTable<K, VO> table,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just move this method from further below up here, where it belongs.

* If a {@code KStream} input value is {@code null} the record will not be included in the join operation
* and thus no output record will be added to the resulting {@code KStream}.
* The key of the result record is the same as the stream record's key.
* If you need read access to the {@code KStream} key, use {@link #join(GlobalKTable, KeyValueMapper, ValueJoinerWithKey)}.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just describe what the code currently does. But it seems it's not correct. We should not pass in the KStream record key, but the join key (ie, whatever keySelector returns).

The original KIP says (https://cwiki.apache.org/confluence/display/KAFKA/KIP-149%3A+Enabling+key+access+in+ValueTransformer%2C+ValueMapper%2C+and+ValueJoiner)

it seems like extending the interface to pass the join key along as well would be helpful

The question now is, can we change this directly? Even if it would be a bug-fix, is could be considered a "breaking change" (should we try to sneak a fix into 4.0 which would allows us to ship a breaking change)?

@mjsax mjsax force-pushed the minor-update-kstreams-javadocs-5 branch from 103e097 to 4e504ef Compare January 31, 2025 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant