@@ -497,22 +497,32 @@ func (suite *integrationTestSuite) TestE2EValidWrites() {
497497 "decimal type" ,
498498 testTable ,
499499 func (s qdb.LineSender ) error {
500- err := s .
500+ d := qdb .NewDecimalFromInt64 (12345 , 2 )
501+ neg_d , err := qdb .NewDecimal (big .NewInt (- 12345 ), 2 )
502+ if err != nil {
503+ return err
504+ }
505+ err = s .
501506 Table (testTable ).
502507 DecimalColumnFromString ("text_col" , "123.45" ).
503- DecimalColumn ("binary_col" , qdb . NewDecimalFromInt64 ( 12345 , 2 ) ).
504- DecimalColumn ("binary_neg_col" , qdb . NewDecimalFromInt64 ( - 12345 , 2 ) ).
508+ DecimalColumn ("binary_col" , d ).
509+ DecimalColumn ("binary_neg_col" , neg_d ).
505510 DecimalColumnShopspring ("binary_null_col" , nil ).
506511 At (ctx , time .UnixMicro (1 ))
507512 if err != nil {
508513 return err
509514 }
510515
516+ d , err = qdb .NewDecimal (big .NewInt (12346 ), 2 )
517+ if err != nil {
518+ return err
519+ }
520+ neg_d = qdb .NewDecimalFromInt64 (- 12346 , 2 )
511521 return s .
512522 Table (testTable ).
513523 DecimalColumnFromString ("text_col" , "123.46" ).
514- DecimalColumn ("binary_col" , qdb . NewDecimalFromInt64 ( 12346 , 2 ) ).
515- DecimalColumn ("binary_neg_col" , qdb . NewDecimalFromInt64 ( - 12346 , 2 ) ).
524+ DecimalColumn ("binary_col" , d ).
525+ DecimalColumn ("binary_neg_col" , neg_d ).
516526 DecimalColumnShopspring ("binary_null_col" , nil ).
517527 At (ctx , time .UnixMicro (2 ))
518528 },
0 commit comments