-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add table function for generating Iceberg CDC records #15677
Conversation
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableChangesFunction.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableChangesFunction.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableChangesFunction.java
Outdated
Show resolved
Hide resolved
33ce25b
to
4331ceb
Compare
Just a rebase to resolve conflicts. |
Now that the PTF SPI has solidified a bit I've reworked this PR to use it. Should look a lot like the Delta Lake one now |
.../main/java/io/trino/plugin/iceberg/functions/tablechanges/TableChangesFunctionProcessor.java
Outdated
Show resolved
Hide resolved
.../main/java/io/trino/plugin/iceberg/functions/tablechanges/TableChangesFunctionProcessor.java
Outdated
Show resolved
Hide resolved
...src/main/java/io/trino/plugin/iceberg/functions/tablechanges/TableChangesFunctionHandle.java
Outdated
Show resolved
Hide resolved
...-iceberg/src/main/java/io/trino/plugin/iceberg/functions/tablechanges/TableChangesSplit.java
Outdated
Show resolved
Hide resolved
...eberg/src/main/java/io/trino/plugin/iceberg/functions/tablechanges/TableChangesFunction.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorSmokeTest.java
Show resolved
Hide resolved
I think adding information about this to documentation will be nice |
...rg/src/main/java/io/trino/plugin/iceberg/functions/tablechanges/TableChangesSplitSource.java
Show resolved
Hide resolved
I'll work on some documentation for this tomorrow but I think the code should be pretty close to good. |
Per #17928 (review) using TableFunctionSplitProcessor may be a dead-end and it should be reserved for really cheap functions only. |
BTW the build didn't run due to conflicts. |
Adds a table function which, given a range of snapshot ids, will produce a table of the rows inserted and deleted between those two snapshots. Currently only supports metadata deletes, not merge-on-read positional or equality deletes.
c60d4e0
to
a69ccd4
Compare
@homar please review @alexjo2144 please check the build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % wouldn't it make sense to already rewrite away form PTF?
Description
Adds a table function which, given a range of snapshot ids, will produce a table of the rows inserted and deleted between those two snapshots.
Currently only supports metadata deletes, not merge-on-read positional or equality deletes.
A document comparing the Iceberg and Delta Lake CDC implementations and how I think we should reconcile the differences is here.
Additional context and related issues
Support for positional and equality deletes depends on: apache/iceberg#6182
Release notes
This is still a draft
( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: