You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Explanation according to the cassandra protocol: row is composed of value_1...value_n where n is columns_count. value is a bytes representing the value. bytes - a intn, followed by n bytes if n >= 0.
If n = 0, no byte should follow and the value represented is zero.
If n < 0, no byte should follow and the value represented is null.
Explanation of the current situation in gocql:
Marshalling: for almost all types:
The zero value is marshaled into a slice with a length equal to the length of the type filled with zeros.
example: zero values of TypeInt marshaled into []byte{0,0,0,0}.
The null values marshaled correctly, with some assumptions.
Unmarshalling: for almost all types, the zero and null data is unmarshaled into zero values.
Explanation of the current situation in cassanda:
The following behavioral features were found:
On INSERTzero data into columns with types tinyint, smallint, date, time, duration - db returns error.
On SELECTzero values from columns with types tinyint, smallint, date, time, duration - db returns data filled with zeros (with not zero len) .
On SELECT zero values from columns with types list, set, map, ascii, blob, text, timeuuid, uuid, varchar- db returns null data (with len -1) .
Types udt and tuple need to check.
Explanation of the current situation in scylla:
The following behavioral features were found:
On INSERTzero data into columns with type duration - db returns error.
On SELECTzero values from columns with type duration - db returns data filled with zeros (with not zero len) .
On SELECT zero values from columns with types list, set, map, ascii, blob, text, timeuuid, uuid, varchar- db returns null data (with len -1) .
Types udt and tuple need to check.
Explanation according to the cassandra protocol:
row
is composed ofvalue_1
...value_n
wheren
iscolumns_count
.value
is abytes
representing the value.bytes
- aint
n
, followed byn
bytes ifn
>= 0.If
n
= 0, no byte should follow and the value represented iszero
.If
n
< 0, no byte should follow and the value represented isnull
.Explanation of the current situation in gocql:
Marshalling: for almost all types:
The
zero
value is marshaled into a slice with a length equal to the length of the type filled with zeros.example:
zero
values ofTypeInt
marshaled into[]byte{0,0,0,0}
.The
null
values marshaled correctly, with some assumptions.Unmarshalling: for almost all types, the zero and null data is unmarshaled into zero values.
Explanation of the current situation in cassanda:
The following behavioral features were found:
INSERT
zero
data into columns with typestinyint
,smallint
,date
,time
,duration
- db returns error.SELECT
zero
values from columns with typestinyint
,smallint
,date
,time
,duration
- db returns data filled with zeros (with not zero len) .SELECT
zero values from columns with typeslist
,set
,map
,ascii
,blob
,text
,timeuuid
,uuid
,varchar
- db returnsnull
data (with len-1
) .Types
udt
andtuple
need to check.Explanation of the current situation in scylla:
The following behavioral features were found:
INSERT
zero
data into columns with typeduration
- db returns error.SELECT
zero
values from columns with typeduration
- db returns data filled with zeros (with not zero len) .SELECT
zero values from columns with typeslist
,set
,map
,ascii
,blob
,text
,timeuuid
,uuid
,varchar
- db returnsnull
data (with len-1
) .Types
udt
andtuple
need to check.Test code for Marshal
zero
values:Output:
The text was updated successfully, but these errors were encountered: