Skip to content

Commit

Permalink
sampledataccl: add an abstraction for ccl testdata
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danhhz committed Jun 19, 2017
1 parent f7b7398 commit d49d535
Show file tree
Hide file tree
Showing 4 changed files with 625 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/ccl/sqlccl/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ func writeSST(
kvs []engine.MVCCKeyValue,
ts hlc.Timestamp,
) error {
if len(kvs) == 0 {
return nil
}

filename := fmt.Sprintf("load-%d.sst", rand.Int63())
log.Info(ctx, "writesst ", filename)

Expand Down
Loading

0 comments on commit d49d535

Please sign in to comment.