@@ -29,6 +29,7 @@ import (
29
29
"encoding/json"
30
30
"fmt"
31
31
"io/ioutil"
32
+ "math/big"
32
33
"net/http"
33
34
"net/url"
34
35
"path/filepath"
@@ -231,12 +232,13 @@ func TestE2EValidWrites(t *testing.T) {
231
232
"all column types" ,
232
233
testTable ,
233
234
func (s * qdb.LineSender ) error {
235
+ val , _ := big .NewInt (0 ).SetString ("123a4" , 16 )
234
236
err := s .
235
237
Table (testTable ).
236
238
Symbol ("sym_col" , "test_ilp1" ).
237
239
Float64Column ("double_col" , 12.2 ).
238
240
Int64Column ("long_col" , 12 ).
239
- Long256Column ("long256_col" , "0x123a4i" ).
241
+ Long256Column ("long256_col" , val ).
240
242
StringColumn ("str_col" , "foobar" ).
241
243
BoolColumn ("bool_col" , true ).
242
244
TimestampColumn ("timestamp_col" , 42 ).
@@ -245,12 +247,13 @@ func TestE2EValidWrites(t *testing.T) {
245
247
return err
246
248
}
247
249
250
+ val , _ = big .NewInt (0 ).SetString ("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" , 16 )
248
251
return s .
249
252
Table (testTable ).
250
253
Symbol ("sym_col" , "test_ilp2" ).
251
254
Float64Column ("double_col" , 11.2 ).
252
255
Int64Column ("long_col" , 11 ).
253
- Long256Column ("long256_col" , "0x123a3i" ).
256
+ Long256Column ("long256_col" , val ).
254
257
StringColumn ("str_col" , "barbaz" ).
255
258
BoolColumn ("bool_col" , false ).
256
259
TimestampColumn ("timestamp_col" , 43 ).
@@ -269,7 +272,7 @@ func TestE2EValidWrites(t *testing.T) {
269
272
},
270
273
Dataset : [][]interface {}{
271
274
{"test_ilp1" , float64 (12.2 ), float64 (12 ), "0x0123a4" , "foobar" , true , "1970-01-01T00:00:00.000042Z" , "1970-01-01T00:00:00.000001Z" },
272
- {"test_ilp2" , float64 (11.2 ), float64 (11 ), "0x0123a3 " , "barbaz" , false , "1970-01-01T00:00:00.000043Z" , "1970-01-01T00:00:00.000002Z" },
275
+ {"test_ilp2" , float64 (11.2 ), float64 (11 ), "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff " , "barbaz" , false , "1970-01-01T00:00:00.000043Z" , "1970-01-01T00:00:00.000002Z" },
273
276
},
274
277
Count : 2 ,
275
278
},
@@ -340,9 +343,10 @@ func TestE2EValidWrites(t *testing.T) {
340
343
"single column long256" ,
341
344
testTable ,
342
345
func (s * qdb.LineSender ) error {
346
+ val , _ := big .NewInt (0 ).SetString ("7fffffffffffffff" , 16 )
343
347
return s .
344
348
Table (testTable ).
345
- Long256Column ("foobar" , "0x123a4i" ).
349
+ Long256Column ("foobar" , val ).
346
350
At (ctx , 42000 )
347
351
},
348
352
tableData {
@@ -351,7 +355,7 @@ func TestE2EValidWrites(t *testing.T) {
351
355
{"timestamp" , "TIMESTAMP" },
352
356
},
353
357
Dataset : [][]interface {}{
354
- {"0x0123a4 " , "1970-01-01T00:00:00.000042Z" },
358
+ {"0x7fffffffffffffff " , "1970-01-01T00:00:00.000042Z" },
355
359
},
356
360
Count : 1 ,
357
361
},
0 commit comments