[TASK-289] Partitioned KV tables python example#290
Open
fresh-borzoni wants to merge 1 commit intoapache:mainfrom
Open
[TASK-289] Partitioned KV tables python example#290fresh-borzoni wants to merge 1 commit intoapache:mainfrom
fresh-borzoni wants to merge 1 commit intoapache:mainfrom
Conversation
Contributor
Author
|
@leekeiabstraction @luoyuxia PTAL 🙏 |
Contributor
leekeiabstraction
left a comment
There was a problem hiding this comment.
TY for the PR! Left comments, PTAL
Comment on lines
+769
to
+771
| part_kv_fields = [ | ||
| pa.field("region", pa.string()), # partition key + part of PK | ||
| pa.field("user_id", pa.int32()), # part of PK |
Contributor
There was a problem hiding this comment.
Q: What do we mean by part here? Part (as in subset) or partitioned?
part_kv_fields can be confusing, if I recall correctly prefix lookup uses subset of primary keys and this can be misconstrued. It seems like we're using all of the primary keys.
Comment on lines
+840
to
+843
| print("\n--- Lookup in non-existent partition ---") | ||
| result = await lookuper.lookup({"region": "UNKNOWN", "user_id": 1}) | ||
| assert result is None, "Expected UNKNOWN partition lookup to return None" | ||
| print("UNKNOWN partition lookup: not found (expected)") |
Contributor
There was a problem hiding this comment.
Does this currently return? If I recall correctly, we adhere to Java side which has effectively infinite retry for retry-able error, PartitionNotFound being one of them
Sorry, I was thinking about upsert path. Lookup should be OK
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.
closes #289
Added example mirroring rust tests