Skip to content

[FLINK] feat: support row kind#57

Open
ggjh-159 wants to merge 3 commits into
bigo-sg:gluten-0530from
ggjh-159:feat/support-rowkind
Open

[FLINK] feat: support row kind#57
ggjh-159 wants to merge 3 commits into
bigo-sg:gluten-0530from
ggjh-159:feat/support-rowkind

Conversation

@ggjh-159

Copy link
Copy Markdown

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 velox experimental/stateful/ChangelogRowVector.{h,cpp}.

When a StatefulRecord flows out through the JNI bridge (JniWrapper::statefulTaskGet), the previous code saved the inner
RowVector directly into the ObjectStore. 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 ChangelogRowVector to its merged form on the JNI boundary: a single RowVector whose trailing column is the $row_kind TINYINT vector (matching kRowKindColumnName in velox/experimental/stateful/RowKind.h). The Java StatefulRecord still holds a single RowVector handle, 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?

  • UTs
  • E2E test, nexmark stateless sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant