Skip to content

Commit d49d535

Browse files
committed
sampledataccl: add an abstraction for ccl testdata
Data is a representation of a sql table, used for creating test data in various forms (sql rows, kvs, enterprise backup). We only have one for the moment (a bank table with an id, balance, and payload for padding row-size), but the indirection of the interface didn't really add any complexity.
1 parent f7b7398 commit d49d535

4 files changed

Lines changed: 625 additions & 0 deletions

File tree

pkg/ccl/sqlccl/load.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@ func writeSST(
326326
kvs []engine.MVCCKeyValue,
327327
ts hlc.Timestamp,
328328
) error {
329+
if len(kvs) == 0 {
330+
return nil
331+
}
332+
329333
filename := fmt.Sprintf("load-%d.sst", rand.Int63())
330334
log.Info(ctx, "writesst ", filename)
331335

0 commit comments

Comments
 (0)