44 "crypto/sha256"
55 "encoding/base64"
66 "fmt"
7+ "math/rand"
78 "strconv"
89 "strings"
910 "time"
@@ -13,7 +14,6 @@ import (
1314 "github.com/apache/arrow-go/v18/arrow/memory"
1415 "github.com/cloudquery/plugin-sdk/v4/types"
1516 "github.com/google/uuid"
16- "golang.org/x/exp/rand"
1717)
1818
1919// TestSourceOptions controls which types are included by TestSourceColumns.
@@ -268,7 +268,7 @@ func (tg *TestDataGenerator) Generate(table *Table, opts GenTestDataOptions) arr
268268func (tg TestDataGenerator ) getExampleJSON (colName string , dataType arrow.DataType , opts GenTestDataOptions ) string {
269269 var rnd , found = tg .colToRnd [colName ]
270270 if ! found {
271- tg .colToRnd [colName ] = rand .New (rand .NewSource (tg .seed ))
271+ tg .colToRnd [colName ] = rand .New (rand .NewSource (int64 ( tg .seed ) ))
272272 rnd = tg .colToRnd [colName ]
273273 }
274274
@@ -334,11 +334,11 @@ func (tg TestDataGenerator) getExampleJSON(colName string, dataType arrow.DataTy
334334 if arrow .IsUnsignedInteger (dataType .ID ()) {
335335 switch dataType {
336336 case arrow .PrimitiveTypes .Uint8 :
337- return fmt .Sprintf ("%d" , rnd .Uint64n (uint64 (^ uint8 (0 ))))
337+ return fmt .Sprintf ("%d" , rnd .Uint64 () % (uint64 (^ uint8 (0 ))))
338338 case arrow .PrimitiveTypes .Uint16 :
339- return fmt .Sprintf ("%d" , rnd .Uint64n (uint64 (^ uint16 (0 ))))
339+ return fmt .Sprintf ("%d" , rnd .Uint64 () % (uint64 (^ uint16 (0 ))))
340340 case arrow .PrimitiveTypes .Uint32 :
341- return fmt .Sprintf ("%d" , rnd .Uint64n (uint64 (^ uint32 (0 ))))
341+ return fmt .Sprintf ("%d" , rnd .Uint64 () % (uint64 (^ uint32 (0 ))))
342342 case arrow .PrimitiveTypes .Uint64 :
343343 return fmt .Sprintf ("%d" , rnd .Uint64 ())
344344 }
0 commit comments