Field types of Tarantool 3.1+ are not supported

Aperta
#20 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
44/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
databases

Direzione di ricerca

Start with the TypeName constants in tt.go:10 and GetConverterByType in tt.go:230, then check Tarantool’s field type documentation for the integer ranges and decimal formats. Add support for the listed Tarantool 3.1+ and 3.5+ types without breaking custom TTConvFactory implementations. Done when MakeTypeToTTConverters handles spaces containing these types.

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

Descrizione

Reproduction snippets assume:

fac := tupleconv.MakeStringToTTConvFactory()

Where: TypeName constants (tt.go:10), GetConverterByType (tt.go:230).

Tarantool 3.1.0 added the field types int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64, and 3.5.0 added decimal32, decimal64, decimal128, decimal256 (field_type_strs in src/box/field_def.c). GetConverterByType returns unexpected type: int8 for them, so MakeTypeToTTConverters fails for the whole space format if any field uses one of these types.

Suggested fix: add the type names and converters: range-checked integers for the fixed-size integer types, floats for float32/float64, and decimals for the decimal* types (check the Tarantool docs for their format options, SpaceField may need more fields). Adding methods to the TTConvFactory interface breaks its custom implementations. An optional extension interface, checked with a type assertion in GetConverterByType, avoids that.

Lingua principale
Go
Stelle
1
Fork
0
Merge medio
1h 43m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tarantool/go-tupleconv

Tutte le issue di tarantool/go-tupleconv

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.