[FLINK] feat: support row kind#57
Open
ggjh-159 wants to merge 3 commits into
Open
Conversation
… feat/support-rowkind
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.
Related issue: apache/gluten#12459
What changes are proposed in this pull request?
The velox side(bigo-sg/velox#70) introduced
ChangelogRowVector(data RowVector + per-row RowKind FlatVector<int8_t>) as the in-pipeline carrier for changelog semantics; see veloxexperimental/stateful/ChangelogRowVector.{h,cpp}.When a
StatefulRecordflows out through the JNI bridge (JniWrapper::statefulTaskGet), the previous code saved the innerRowVectordirectly into theObjectStore. That type is not visible to the Java side, and the per-row RowKind bytes were silently dropped before reaching any Java consumer.This PR converts the
ChangelogRowVectorto its merged form on the JNI boundary: a singleRowVectorwhose trailing column is the$row_kindTINYINT vector (matchingkRowKindColumnNameinvelox/experimental/stateful/RowKind.h). The JavaStatefulRecordstill holds a singleRowVectorhandle, but that RowVector now carries the RowKind column whenever the upstream was not append-only.This keeps the existing Java API unchanged while letting downstream
Flink converters read RowKind from the merged schema.
How was this patch tested?