aws / aws/aws-sdk-java-v2

Use String instead of Select enum for ProjectionExpression to support future values

Aperta
#5,547 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
feature-request p3
Lingua principale
Java
Stelle
2.6k
Fork
1k
Merge medio
2g 9h
PR unite (30g)
51

Descrizione

### Describe the feature

The DynamoDB Java SDK provides an enum called Select to represent the different options for the ProjectionExpression parameter in DynamoDB queries and scans. The ProjectionExpression parameter allows you to specify which attributes you want to retrieve from the table. So idea is to use String instead of Select enum for ProjectionExpression to support future values

### Use Case

AWS may introduce new options for the ProjectionExpression parameter in future DynamoDB API versions. However, the Select enum in the SDK may not be updated immediately to include these new options. This can cause issues for customers who cannot upgrade their SDK version right away, as they won't be able to use the new ProjectionExpression options until the SDK is updated and they upgrade to the new version.

### Proposed Solution

Instead of using the Select enum, the proposed solution is to use a String internally when specifying the ProjectionExpression parameter. This approach is similar to how the code-generated models in the SDK handle unknown values.

By using a String, customers who cannot upgrade their SDK version immediately can still specify the new ProjectionExpression options introduced by AWS. They can pass the new options as String values instead of relying on the Select enum, which may not have been updated yet.

This solution provides more flexibility and backward compatibility, allowing customers to take advantage of new DynamoDB features without being blocked by SDK version constraints. It also aligns with the approach used by the code-generated models in the SDK for handling unknown values.

### Other Information

_No response_

### Acknowledgements

- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS Java SDK version used

2.26.16

### JDK version used

1.8

### Operating System and version

macOs

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia individuando i modelli delle richieste query e scan di DynamoDB e gli utilizzi di Select enum. Confronta la loro gestione con il supporto dei modelli generati dal codice per i valori sconosciuti. Il lavoro è completato quando sarà possibile passare future stringhe di opzioni senza richiedere un aggiornamento dell’SDK, mantenendo al contempo la compatibilità del comportamento esistente e superando i test pertinenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, java
Ambito
backend, databases
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.