-
Notifications
You must be signed in to change notification settings - Fork 496
[flink] Delta Join additional IT tests and docs improvement #2546
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
base: main
Are you sure you want to change the base?
Conversation
87bdc35 to
c92a487
Compare
c92a487 to
7e3c93d
Compare
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.
Thanks @xuyangzhong and @fresh-borzoni , this is a great and thorough test coverage.
Could you also add tests for partitioned tables?
| } | ||
|
|
||
| @Test | ||
| void testDeltaJoin() throws Exception { |
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.
I think we should configure all tests to use table.delete.behavior and join on the bucket key by default, as this aligns with the recommended approach documented for users implementing delta joins.
Then I suggest to rename this method to testDeltaJoinOnPrimaryKey and keep this test as is. And rename testDeltaJoinOnBucketKey to testDeltaJoin.
| "c1, d1, c2, d2"); | ||
|
|
||
| // Filter on e1 > e2, where e1 and e2 are NOT part of the upsert key | ||
| String sql = |
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.
Add TODO comment above this
// TODO we can add a UpsertFilterOperator that can convert the un-match-filter UPSERT record
// into DELETE record.| "c2", | ||
| ImmutableMap.of("table.delete.behavior", "IGNORE")); | ||
|
|
||
| // Sink PK (a1, a2) doesn't match upstream update key (c1, d1, c2, d2) |
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.
Please add TODO on this
// TODO: this depends on Fluss supports MVCC/point-in-time lookup to support change upsert keys| "c2", | ||
| ImmutableMap.of("table.merge-engine", "first_row")); | ||
|
|
||
| String sinkTableName = "sink_table_nondeterministic"; |
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.
Please add comment on this
// TODO this should be supported in Flink in future for non-deterministic functions before sinking|
@xuyangzhong Ack. Since you’re pushing new commits, let's continue with this PR. |
Purpose
This pr is based on #2268 and do some refactoring work.
Linked issue: close #2231
Brief change log
Tests
API and Format
No
Documentation
Yes - updated
docs/engine-flink/delta-joins.mdin Flink 2.2 part.