scylladb / gocql

Package gocql implements a fast and robust ScyllaDB client for the Go programming language.
https://docs.scylladb.com/stable/using-scylla/drivers/cql-drivers/scylla-go-driver.html
BSD 3-Clause "New" or "Revised" License
189 stars 59 forks source link

unmarshall `varchar`, `text`, `blob`, `ascii` `cql types` with `zero data` into `([]byte)(nil)`, `(*[]byte)(*[nil])` #286

Open illia-li opened 1 month ago

illia-li commented 1 month ago

According to cql protocol - for all cql types value can be nil and zero. Therefore all unmarshall functions for cql types should unmarshalls nil data into nil go value and zero data into zero go value. But currently, for varchar, text, blob, ascii cql types zero data unmarshalls into ([]byte)(nil), (*[]byte)(*[nil])

illia-li commented 1 month ago

This issue is also present in uuid, timeuuid cql types