-
Notifications
You must be signed in to change notification settings - Fork 80
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
Reworded the documentation for lastByKeyColumns. #1935
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1381,9 +1381,13 @@ private static String[] getColumnNames( | |
* @param keySpec Conversion specification for Kafka record keys from table column data. | ||
* @param valueSpec Conversion specification for Kafka record values from table column data. | ||
* @param lastByKeyColumns Whether to publish only the last record for each unique key. Ignored when {@code keySpec} | ||
* is {@code IGNORE}. If {@code keySpec != null && !lastByKeyColumns}, it is expected that {@code table} will | ||
* not produce any row shifts; that is, the publisher expects keyed tables to be streams, add-only, or | ||
* aggregated. | ||
* is {@code IGNORE}. If {@code lastByKeyColumns == true}, it is expected that {@code table} is an add-only | ||
* stream, or the result of an aggregation; a general refreshing table where rows can change position in | ||
* arbitrary ways (eg, the result of {@code sort}) is not allowed. In DH engine technical terms, when | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
* {@code lastByKeyColumns == true} the updates to {@code table} should not produce any row shifts. A table | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a debate to be had about whether we actually want to restrict shifts for keyed tables. I remain convinced that the answer is yes. @cpwright should weigh in as well. |
||
* generated from a Kafka stream via {@code consumeToTable} trivially satisfies this constraint. Any | ||
* operations over such a table that do not reorder rows also satisfy the constraint. | ||
* | ||
* @return a callback to stop producing and shut down the associated table listener; note a caller should keep a | ||
* reference to this return value to ensure liveliness. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is backwards. If
{@code lastByKeyColumns == true}
we will apply the aggregation ourselves, and so none of this wording applies.