[lake] Optimize TableLookup finder creation#2554
Open
KiteSoar wants to merge 2 commits intoapache:mainfrom
Open
[lake] Optimize TableLookup finder creation#2554KiteSoar wants to merge 2 commits intoapache:mainfrom
KiteSoar wants to merge 2 commits intoapache:mainfrom
Conversation
de87a73 to
78502d9
Compare
Author
|
Hi @luoyuxia Could you please help review when you got some time? |
Contributor
There was a problem hiding this comment.
Pull request overview
Optimizes TableLookup.createLookuper() to choose between primary-key and prefix-key lookup based on provided lookup columns, and adds tests to validate the routing and failure behavior (linked to #2521).
Changes:
- Update
TableLookup.createLookuper()to route toPrimaryKeyLookuperfor full-PK lookups andPrefixKeyLookuperfor prefix-key lookups, otherwise throw an error. - Add
TableLookupTestcovering primary-key routing, prefix-key routing, and invalid input cases. - Adjust
FlussLakeTableITCaseto consistently uselookupBy(...)when creating lookupers.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
fluss-client/src/main/java/org/apache/fluss/client/lookup/TableLookup.java |
Adds routing logic and validation/error path for lookuper creation based on lookup columns. |
fluss-client/src/test/java/org/apache/fluss/client/lookup/TableLookupTest.java |
New unit tests validating routing and invalid-argument behavior. |
fluss-client/src/test/java/org/apache/fluss/client/table/FlussLakeTableITCase.java |
Updates integration test to always specify lookup columns via lookupBy(...). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fluss-client/src/main/java/org/apache/fluss/client/lookup/TableLookup.java
Outdated
Show resolved
Hide resolved
fluss-client/src/main/java/org/apache/fluss/client/lookup/TableLookup.java
Outdated
Show resolved
Hide resolved
fluss-client/src/test/java/org/apache/fluss/client/lookup/TableLookupTest.java
Outdated
Show resolved
Hide resolved
78502d9 to
c1f96df
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: close #2521
Brief change log
Tests
API and Format
None
Documentation
None