[FEATURE] Define a portable numeric value contract across providers
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- aws, azure, gcp, java
- Ambito
- backend-api-design, databases
Direzione di ricerca
Non sono indicati file né punti di ingresso. Inizia tracciando la gestione dei valori numerici attraverso i percorsi portabili create, upsert, update, query, read e change-feed per Cosmos DB, DynamoDB e Spanner, quindi esamina i test esistenti di API, provider e conformance. Il lavoro è completo quando esiste un contratto documentato con validazione, rappresentazioni, avvisi e copertura coerenti in tutti i percorsi e provider elencati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem / motivation
The portable API does not currently define one provider-independent numeric domain for Java/Jackson inputs and public results. Cosmos DB, DynamoDB, and Spanner have different native numeric ranges and representations, so the same value can be rounded, rejected, or returned with a different Java/Jackson type depending on the provider and operation.
This was discovered while reviewing #105, but it predates partial update and should be addressed across the full SDK rather than added to that feature PR.
Proposed solution
Define and implement a normative portable numeric contract covering:
- accepted Java and Jackson numeric input types;
- integral and non-integral ranges shared by all supported providers;
- canonical provider-bound and public-result representations;
- whether an out-of-domain value is rejected or rounded;
- structured
INVALID_REQUESTdetails for local validation failures; - a visible, raw-value-free warning policy for any accepted value-changing normalization;
- identical behavior for create, upsert, update, query, read, and change-feed paths.
The implementation must not mutate caller-owned maps, lists, arrays, or JSON trees.
Provider scope
- Portable across all providers
- Azure Cosmos DB only
- Amazon DynamoDB only
- Google Cloud Spanner only
- Not sure
Acceptance criteria
- The portable numeric domain and canonical Java/Jackson types are normative and documented.
- Equivalent values produce equivalent provider-bound values and public results across all providers.
- Values outside the domain fail before provider I/O with structured, non-retryable
INVALID_REQUESTdetails. - No precision-changing conversion is silent; the selected warning/rejection policy is tested without logging raw values.
- Native query input remains explicitly provider-specific and is not accidentally normalized.
- API, provider, and conformance tests cover positive/negative boundaries, zero, nested containers, and unsupported
Numberimplementations. - README, API reference, compatibility guide, changelogs, and relevant specs describe the same contract.
Alternatives considered
Implementing numeric rules only for partial update was rejected because it would create operation-dependent behavior in the portable API.
Additional context
Related umbrella issues: #37 and #64.
Tracked follow-ups
- #108 — query numeric literals, parameters, and native-path bypass
- #109 — nested Spanner numeric decoding across result paths
- #110 — DynamoDB
N/NSdecoding fidelity
- Lingua principale
- Java
- Stelle
- 7
- Fork
- 7
- Merge medio
- 1g 19h
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/multiclouddb-sdk-for-java
-
Portable document key fields differ across Cosmos/Dynamo and read/query (id vs sortKey)Forse già presa @allenkim0129 l’ha presa 18 giorni fa. Aperta
microsoft/multiclouddb-sdk-for-java#121 · 1 assegnatario ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
Tutte le issue di microsoft/multiclouddb-sdk-for-java
Issue simili
-
dev/release: verify-release-candidate.sh runs 0 Java tests with Debian's MavenForse già presa @kou l’ha presa oggi. ApertaType: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/arrow-adbc#4947 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
lysine-dev/okhttp#9814 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
1.20.1-FORGE bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
MehVahdJukaar/WoodGood#1348 ·
-
documentation faq
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100