Skip to content

Commit

Permalink
Ensure copied data matches original
Browse files Browse the repository at this point in the history
Signed-off-by: Shamser Ahmed <shamser.ahmed@lexisnexis.com>
  • Loading branch information
shamser committed Oct 28, 2024
1 parent c929db9 commit dc934f9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions testing/regress/ecl/dfusupercopy.ecl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ ds1 := DATASET([{'Ned'},{'Robert'}, {'Jaime'}, {'Catelyn'}, {'Cersei'}, {'Daener
ds2 := DATASET([{'Sansa'}, {'Arya'}, {'Robb'}, {'Theon'}, {'Bran'}, {'Joffrey'}, {'Hound'}, {'Tyrion'}], layout_user, DISTRIBUTED);
ds3 := DATASET([{'Arya'}, {'Robb'}, {'Theon'}, {'Bran'}, {'Joffrey'}, {'Hound'}, {'Tyrion'}], layout_user, DISTRIBUTED);

dsSuperData := DATASET(prefix+'superdata', layout_user, FLAT);

SEQUENTIAL(
OUTPUT(ds1, , prefix + 'subdata1', OVERWRITE),
OUTPUT(ds2, , prefix + 'subdata2', OVERWRITE),
Expand All @@ -42,6 +44,7 @@ SEQUENTIAL(
FileServices.AddSuperFile(prefix + 'superdata', prefix + 'subdata3'),
FileServices.FinishSuperFileTransaction(),
FileServices.Copy(sourceLogicalName := prefix + 'superdata', destinationGroup := '', destinationLogicalName := prefix + 'super_copy', ALLOWOVERWRITE := true),
OUTPUT(SORT(dsSuperData, user), NAMED('superdata')),
FileServices.DeleteLogicalFile(prefix + 'super_copy', true),
FileServices.DeleteLogicalFile(prefix + 'superdata', true),
FileServices.DeleteLogicalFile(prefix + 'subdata1', true),
Expand Down
24 changes: 24 additions & 0 deletions testing/regress/ecl/key/dfusupercopy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,27 @@
</Dataset>
<Dataset name='Result 3'>
</Dataset>
<Dataset name='superdata'>
<Row><user>Arya </user></Row>
<Row><user>Arya </user></Row>
<Row><user>Bran </user></Row>
<Row><user>Bran </user></Row>
<Row><user>Catelyn </user></Row>
<Row><user>Cersei </user></Row>
<Row><user>Daenerys </user></Row>
<Row><user>Hound </user></Row>
<Row><user>Hound </user></Row>
<Row><user>Jaime </user></Row>
<Row><user>Joffrey </user></Row>
<Row><user>Joffrey </user></Row>
<Row><user>Jon </user></Row>
<Row><user>Ned </user></Row>
<Row><user>Robb </user></Row>
<Row><user>Robb </user></Row>
<Row><user>Robert </user></Row>
<Row><user>Sansa </user></Row>
<Row><user>Theon </user></Row>
<Row><user>Theon </user></Row>
<Row><user>Tyrion </user></Row>
<Row><user>Tyrion </user></Row>
</Dataset>

0 comments on commit dc934f9

Please sign in to comment.