@@ -170,6 +170,8 @@ func TestVector_Types(t *testing.T) {
170170 {{2 , 3 }, {2 , - 1 }, {3 }, {0 }, {- 1.3 }},
171171 {{1 , 1000.0 }, {0 }, {}, {12 , 14 , 15 , 16 }, {- 1.3 }},
172172 }},
173+ {name : "vector_tuple_text_int_float" , cqlType : "tuple<text, int, float>" , value : [][]interface {}{{"a" , 1 , float32 (0.5 )}, {"b" , 2 , float32 (- 1.2 )}, {"c" , 3 , float32 (0 )}}},
174+ {name : "vector_tuple_text_list_text" , cqlType : "tuple<text, list<text>>" , value : [][]interface {}{{"a" , []string {"b" , "c" }}, {"d" , []string {"e" , "f" , "g" }}, {"h" , []string {"i" }}}},
173175 {name : "vector_set_text" , cqlType : "set<text>" , value : [][]string {{"a" , "b" }, {"c" , "d" }, {"e" , "f" }}},
174176 {name : "vector_list_int" , cqlType : "list<int>" , value : [][]int32 {{1 , 2 , 3 }, {- 1 , - 2 , - 3 }, {0 , 0 , 0 }}},
175177 {name : "vector_map_text_int" , cqlType : "map<text, int>" , value : []map [string ]int {map1 , map2 , map3 }},
@@ -329,6 +331,18 @@ func TestVector_SubTypeParsing(t *testing.T) {
329331 },
330332 },
331333 },
334+ {
335+ name : "tuple" ,
336+ custom : "org.apache.cassandra.db.marshal.TupleType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)" ,
337+ expected : TupleTypeInfo {
338+ NativeType {typ : TypeTuple },
339+ []TypeInfo {
340+ NativeType {typ : TypeVarchar },
341+ NativeType {typ : TypeInt },
342+ NativeType {typ : TypeVarchar },
343+ },
344+ },
345+ },
332346 {
333347 name : "vector_vector_inet" ,
334348 custom : "org.apache.cassandra.db.marshal.VectorType(org.apache.cassandra.db.marshal.VectorType(org.apache.cassandra.db.marshal.InetAddressType, 2), 3)" ,
0 commit comments