-
Notifications
You must be signed in to change notification settings - Fork 14.6k
KAFKA-19668: processValue() must be declared as value-changing operation #20470
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
Changes from all 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 |
---|---|---|
|
@@ -1306,7 +1306,12 @@ public <KOut, VOut> KStream<KOut, VOut> process( | |
final ProcessorToStateConnectorNode<? super K, ? super V> processNode = new ProcessorToStateConnectorNode<>( | ||
name, | ||
new ProcessorParameters<>(processorSupplier, name), | ||
stateStoreNames); | ||
stateStoreNames | ||
); | ||
if (builder.processProcessValueFixEnabled()) { | ||
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. I also added this here -- it's atm not strictly necessary, because but it just feel correct to add anyway, as we have plans to actually unify 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. Cf #18800 \cc @appchemist for visibility 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. Thank you! |
||
processNode.setKeyChangingOperation(true); | ||
processNode.setValueChangingOperation(true); | ||
} | ||
|
||
builder.addGraphNode(graphNode, processNode); | ||
|
||
|
@@ -1350,7 +1355,11 @@ public <VOut> KStream<K, VOut> processValues( | |
final ProcessorToStateConnectorNode<? super K, ? super V> processNode = new ProcessorToStateConnectorNode<>( | ||
name, | ||
new ProcessorParameters<>(processorSupplier, name), | ||
stateStoreNames); | ||
stateStoreNames | ||
); | ||
if (builder.processProcessValueFixEnabled()) { | ||
processNode.setValueChangingOperation(true); | ||
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. The line! 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. Yep. Basically a one-liner fix. |
||
} | ||
|
||
builder.addGraphNode(graphNode, processNode); | ||
// cannot inherit value serde | ||
|
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.
Is the cast required, wouldn't the JVM use autoboxing to covert between
Boolean
andboolean
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.
Yes, because the type of
value
isObject
. We could also cast toBoolean
. So some auto-conversion/unboxing happens anyway.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.
I actually c&p this from
StreamsConfig.InternalConfigs
:)