Skip to content
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

[connector] flink read support for fluss primary key table changelog auxiliary table/ cdc events #510

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

MehulBatra
Copy link
Contributor

@MehulBatra MehulBatra commented Mar 1, 2025

Contribution Checklist

  • Linked issue: close 356

Purpose

Enhanced the Flink connector by introducing support for the $changelog auxiliary table. enabling seamless CDC event capture and processing in streaming applications

Brief change log

  • Touched FlinkCatalog GetTable (To support enablement of changelog Table)
  • Touched CoordinatorService CreateTable (To add validation of system reserved columns)
  • Extended FlussRowToFlinkRowConverter (ChangelogRowConverter to add support for emitting changelog records)
  • Touched FlinkRecordEmitter (To add choice of special FlinkRow converter based on Changelog Flag)
  • Touched FlinkTableFactory (To add createDynamicSource support for changlog table)
  • Touched FlinkSource, FlinkSourceReader, FlinkTableSource (To add flag isChangelog in the source constructor of each class)

Tests

Yet to write (In progress)

API and Format

Yes , Flink Source Reader

Documentation

Yes post feedback need to add changes in the doc to support CDC reads via Flink Connector

Copy link
Member

@wuchong wuchong left a comment

Choose a reason for hiding this comment

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

Thanks @MehulBatra , the direction looks good to me. I left some comments. Looking forward to a complete pull request!

Some tips for the following:

  1. Add comprehensive tests for the feature, including
  • FlinkCatalogTest for verifying the catalog table information
  • integration tests in FlinkTableSourceITCase to support reading all columns,partial columns, partial metadata columns.
  • tests to verify the $changelog doesn't support as a sink table.
  • etc.
  1. We may also need to adapt the FlinkTableSource to make it works with existing pushdown optimizations.

… validateTableDescriptor, attaching additonal columns & using Joinedrowdata
@MehulBatra
Copy link
Contributor Author

Thanks @MehulBatra , the direction looks good to me. I left some comments. Looking forward to a complete pull request!

Some tips for the following:

  1. Add comprehensive tests for the feature, including
  • FlinkCatalogTest for verifying the catalog table information
  • integration tests in FlinkTableSourceITCase to support reading all columns,partial columns, partial metadata columns.
  • tests to verify the $changelog doesn't support as a sink table.
  • etc.
  1. We may also need to adapt the FlinkTableSource to make it works with existing pushdown optimizations.

Resolved the comments, made on the particular code blocks.

Will start with this now!

@MehulBatra
Copy link
Contributor Author

Thanks @MehulBatra , the direction looks good to me. I left some comments. Looking forward to a complete pull request!

Some tips for the following:

  1. Add comprehensive tests for the feature, including
  • FlinkCatalogTest for verifying the catalog table information
  • integration tests in FlinkTableSourceITCase to support reading all columns,partial columns, partial metadata columns.
  • tests to verify the $changelog doesn't support as a sink table.
  • etc.
  1. We may also need to adapt the FlinkTableSource to make it works with existing pushdown optimizations.
  • Wrote Unit and Integration test to support Flink Catalog changes, support reading all columns,partial columns, partial metadata columns and test to verify changelog doesn't support sink.

  • Adapted FlinkTableSource for Projection.

@MehulBatra MehulBatra requested a review from wuchong March 16, 2025 19:28
@MehulBatra
Copy link
Contributor Author

@wuchong Could you please help me with reviewing this PR

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.

Support $changelog auxiliary table for flink connector
2 participants