Skip to content

[IcebergIO] CDC record and sort key - #39981

Merged
ahmedabu98 merged 5 commits into
apache:masterfrom
ahmedabu98:cdc-record-and-sort-key
Sep 3, 2026
Merged

[IcebergIO] CDC record and sort key#39981
ahmedabu98 merged 5 commits into
apache:masterfrom
ahmedabu98:cdc-record-and-sort-key

Conversation

@ahmedabu98

Copy link
Copy Markdown
Contributor

Part of #39979


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.33%. Comparing base (eea1e03) to head (1910d50).
⚠️ Report is 257 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #39981      +/-   ##
============================================
+ Coverage     55.95%   58.33%   +2.37%     
- Complexity     2272    13542   +11270     
============================================
  Files          1112     2566    +1454     
  Lines        175063   267300   +92237     
  Branches       1458    11054    +9596     
============================================
+ Hits          97959   155926   +57967     
- Misses        74645   105460   +30815     
- Partials       2459     5914    +3455     
Flag Coverage Δ
java 64.57% <ø> (-11.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @kennknowles for label java.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

/**
* One change record carried through the CDC sink's shuffle.
*
* <p>{@link ValueKind} is reified because it's not preserved across a {@code GroupByKey}.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, once you are "inside" a sink, you don't (necessarily) need the implicit propagation of ValueKind as metadata, since it is more like an explicit field you will write to the sink.

* level and cannot infer a dynamic {@link Row} field, so {@code @DefaultSchema} alone cannot
* produce a working coder for {@link CdcRecord}.
*/
final class CdcRecordCoder extends CustomCoder<CdcRecord> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any world in which Python will want to directly send these CdcRecord things over the wire? Just curious. You would want a StructuredCoder<CdcRecord> not a CustomCoder which I think translates to beam:coder:javasdk with java serialized payload, aka not intelligible to runners or other languages.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CdcRecord is something internal to the sink. The user supplies Beam Rows (whether it's Java or Python) and they they get resolved and converted to CdcRecords

@ahmedabu98
ahmedabu98 merged commit c5a2eac into apache:master Sep 3, 2026
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants