@@ -54,6 +54,7 @@ func TestMap(t *testing.T) {
54
54
, Col3 map(string, uint64)
55
55
, Col4 array(map(string, string))
56
56
, Col5 map(low_cardinality(string), low_cardinality(uint64))
57
+ , Col6 map(string, array(map(string, float64)))
57
58
)
58
59
`
59
60
defer func () {
@@ -79,22 +80,28 @@ func TestMap(t *testing.T) {
79
80
"key_col_5_1" : 100 ,
80
81
"key_col_5_2" : 200 ,
81
82
}
83
+ col6Data = map [string ][]map [string ]float64 {
84
+ "key1" : {{"key1-1-1" : 11.1 , "key1-1-2" : 11.2 }, {"key1-2-1" : 12.1 }},
85
+ "key2" : {{"key2-1-1" : 21.1 }, {"key2-2-1" : 22.1 }, {"key2-3-1" : 23.1 , "key2-3-2" : 23.2 , "key2-3-3" : 23.3 }},
86
+ }
82
87
)
83
- if err := batch .Append (col1Data , col2Data , col3Data , col4Data , col5Data ); assert .NoError (t , err ) {
88
+ if err := batch .Append (col1Data , col2Data , col3Data , col4Data , col5Data , col6Data ); assert .NoError (t , err ) {
84
89
if assert .NoError (t , batch .Send ()) {
85
90
var (
86
91
col1 map [string ]uint64
87
92
col2 map [string ]uint64
88
93
col3 map [string ]uint64
89
94
col4 []map [string ]string
90
95
col5 map [string ]uint64
96
+ col6 map [string ][]map [string ]float64
91
97
)
92
- if err := conn .QueryRow (ctx , "SELECT (* except _tp_time) FROM test_map WHERE _tp_time > earliest_ts() LIMIT 1" ).Scan (& col1 , & col2 , & col3 , & col4 , & col5 ); assert .NoError (t , err ) {
98
+ if err := conn .QueryRow (ctx , "SELECT (* except _tp_time) FROM test_map WHERE _tp_time > earliest_ts() LIMIT 1" ).Scan (& col1 , & col2 , & col3 , & col4 , & col5 , & col6 ); assert .NoError (t , err ) {
93
99
assert .Equal (t , col1Data , col1 )
94
100
assert .Equal (t , col2Data , col2 )
95
101
assert .Equal (t , col3Data , col3 )
96
102
assert .Equal (t , col4Data , col4 )
97
103
assert .Equal (t , col5Data , col5 )
104
+ assert .Equal (t , col6Data , col6 )
98
105
}
99
106
}
100
107
}
0 commit comments