SK-2955: Align upsert/upsertType with Flow-DB changes (docs, tests, error-message cleanup)#346
Open
Devesh-Skyflow wants to merge 1 commit into
Open
SK-2955: Align upsert/upsertType with Flow-DB changes (docs, tests, error-message cleanup)#346Devesh-Skyflow wants to merge 1 commit into
Devesh-Skyflow wants to merge 1 commit into
Conversation
…ror-message cleanup)
Flow-DB now defaults record-level upsert to UPDATE (was REPLACE) and owns
upsert-placement validation server-side. The SDK already serializes
upsertType correctly and omits updateType when unset, so this is docs,
tests, and validation hygiene only.
- README: document upsertType is optional, default is now UPDATE, and
UPDATE vs REPLACE semantics.
- Samples: drop redundant explicit upsertType(UPDATE) (now the default)
in BulkMultiTableInsert{Sync,Async}; keep REPLACE samples as-is.
- Validations: defer upsert-placement checks to the backend (authoritative
messages); SDK only guards empty upsert columns.
- Tests: cover default-UPDATE omission at request/record level, both-level
serialization, and updated placement tests to reflect deferral.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
skyflow-bharti
approved these changes
Jul 16, 2026
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.
Summary
Follow-up to CJP-410 / CUST-4294 (Nykaa). The original report — record-level
upsertType.UPDATEbehaving likeREPLACE— was a Flow-DB (vault) bug, nowfixed server-side. Flow-DB also now defaults record-level upsert to UPDATE
(previously REPLACE) and owns upsert-placement validation.
No SDK contract change or core-logic fix required. The SDK already serializes
record-level
upsertTypeintorecords[].upsert.updateTypeand omitsupdateTypeentirely when unset, so the new server-side default applies. This PR covers the
remaining docs, tests, and error-message hygiene.
Jira: https://skyflow.atlassian.net/browse/SK-2955
Changes
upsertTypeis optional, that the default is nowUPDATE(applied by the backend), and theUPDATEvsREPLACEsemantics.upsertType(UpsertType.UPDATE)(it's the default) in
BulkMultiTableInsertSync/BulkMultiTableInsertAsync,with a clarifying comment; removed the unused
UpsertTypeimport.REPLACEsamples left unchanged (REPLACE is meaningful, non-default).
Validations.java) — defer upsert placement checks(request- vs record-level) to the backend, which returns the authoritative
message. The SDK now only guards against empty upsert column lists.
upsertType→updateTypeomitted (default-UPDATE)upsertType→updateTypeomitted (default-UPDATE)upsertTypeat both request and record level → both serialized (backend rejects)ValidationsTests/InsertTeststo reflect that placement is nolonger validated client-side.
3.0.0-beta.11.Testing
mvn test(v3): all upsert-related tests pass. (testSetBearerTokenWithEnvCredentialsis environmental — needs a local
.envSKYFLOW_CREDENTIALS— and is unrelated.)mvn compile(samples): passes.Acceptance criteria
upsertTypeand the new UPDATE default