Skip to content

Commit

Permalink
HPCC-31410 Check source and target of file superfile copy is identical
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 Nov 15, 2024
1 parent dc934f9 commit 39079e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 deletions.
7 changes: 6 additions & 1 deletion testing/regress/ecl/dfusupercopy.ecl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ ds3 := DATASET([{'Arya'}, {'Robb'}, {'Theon'}, {'Bran'}, {'Joffrey'}, {'Hound'},

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

checkRecords := COUNT(COMBINE(ds1+ds2+ds3,dsSuperData,
TRANSFORM(layout_user,
SELF.USER := IF(LEFT.USER=RIGHT.USER, LEFT.USER, ERROR('records do not match'))),
LOCAL));

SEQUENTIAL(
OUTPUT(ds1, , prefix + 'subdata1', OVERWRITE),
OUTPUT(ds2, , prefix + 'subdata2', OVERWRITE),
Expand All @@ -44,7 +49,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')),
checkRecords,
FileServices.DeleteLogicalFile(prefix + 'super_copy', true),
FileServices.DeleteLogicalFile(prefix + 'superdata', true),
FileServices.DeleteLogicalFile(prefix + 'subdata1', true),
Expand Down
25 changes: 2 additions & 23 deletions testing/regress/ecl/key/dfusupercopy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,6 @@
</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 name='Result 4'>
<Row><Result_4>22</Result_4></Row>
</Dataset>

0 comments on commit 39079e9

Please sign in to comment.