Field types of Tarantool 3.1+ are not supported

Đang mở
#20 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
44/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
databases

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
1
Fork
0
Merge trung bình
1 giờ 43 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tarantool/go-tupleconv

Tất cả issue của tarantool/go-tupleconv

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.