[cdc-common] add createFieldGetters method to create FieldGetters of given Schema.#2762
Merged
leonardBang merged 2 commits intoapache:masterfrom Nov 29, 2023
lvyanquan0624:UseFieldGetter
Merged
[cdc-common] add createFieldGetters method to create FieldGetters of given Schema.#2762leonardBang merged 2 commits intoapache:masterfrom lvyanquan0624:UseFieldGetter
leonardBang merged 2 commits intoapache:masterfrom
lvyanquan0624:UseFieldGetter
Conversation
leonardBang
reviewed
Nov 27, 2023
Contributor
leonardBang
left a comment
There was a problem hiding this comment.
Thanks @lvyanquan for the contribution, left one minor coments
Contributor
Author
|
the failed CI would be rerun after #2737 merged. |
Contributor
Contributor
Author
|
The left of CI failure is unrelated with this pr. |
Contributor
Author
|
@leonardBang Reopen it to let ValuesSink not implement StatefulSink and remove class like TableSchemaState. |
leonardBang
reviewed
Nov 28, 2023
| } | ||
|
|
||
| /** an e2e {@link Sink} implementation that print all {@link DataChangeEvent} out. */ | ||
| private static class ValuesSink implements StatefulSink<Event, TableSchemaState> { |
Contributor
There was a problem hiding this comment.
TableSchemaState could remove now ?
Contributor
Author
There was a problem hiding this comment.
Yeah, we don't need to add Schema message to State as CreateTableEvent will be sent firstly.
| } else if (materializedInMemory && event instanceof DataChangeEvent) { | ||
| ValuesDatabase.applyDataChangeEvent((DataChangeEvent) event); | ||
| } | ||
| // print the detail message to console for verification. |
Contributor
There was a problem hiding this comment.
Should we add a config to control print or not ?
leonardBang
reviewed
Nov 28, 2023
| "True if the DataChangeEvent need to be materialized in memory."); | ||
|
|
||
| public static final ConfigOption<Boolean> PRINT = | ||
| ConfigOptions.key("print") |
…ieldGetters of given Schema.
leonardBang
approved these changes
Nov 29, 2023
Contributor
leonardBang
left a comment
There was a problem hiding this comment.
Thanks @lvyanquan for the update, LGTM
e-mhui
pushed a commit
to e-mhui/flink-cdc-connectors
that referenced
this pull request
Dec 2, 2023
…ild FieldGetters of given Schema. (apache#2762) This closes apache#2762.
ChaomingZhangCN
pushed a commit
to ChaomingZhangCN/flink-cdc
that referenced
this pull request
Jan 13, 2025
…ild FieldGetters of given Schema. (apache#2762) This closes apache#2762.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request is a follow-up of #2734.
We now remove GenericRecordData and introduce new BinaryRecordData, so we can't get Field for RecordData directly and need to use FieldGetter.
This pr provide a util method to create FieldGetter and an example to get fields from RecordData.