... | ... | @@ -57,11 +57,11 @@ void MaskOutField2::generatePabloMethod() { |
|
|
PabloBuilder pb(getEntryScope());
|
|
|
Var * Record_separators = pb.createExtract(getInputStreamVar("Record_separators"), pb.getInteger(0));
|
|
|
Var * Field_separators = pb.createExtract(getInputStreamVar("Field_separators"), pb.getInteger(0));
|
|
|
PabloAST * F1start = pb.createNot(pb.createAdvance(pb.createNot(Record_separators), 1);
|
|
|
PabloAST * F1start = pb.createNot(pb.createAdvance(pb.createNot(Record_separators), 1));
|
|
|
PabloAST * F1follow = pb.createScanTo(F1start, Field_separators);
|
|
|
PabloAST * F2start = pb.createAdvance(F1start, 1);
|
|
|
PabloAST * F2start = pb.createAdvance(F1follow, 1);
|
|
|
PabloAST * F2follow = pb.createScanTo(F2start, Field_separators);
|
|
|
PabloAST * toDelete = pb.createIntrinsicCall(pablo::Intrinsic::ExclusiveSpan, {F1follow, F2follow});
|
|
|
PabloAST * toDelete = pb.createIntrinsicCall(pablo::Intrinsic::SpanUpTo, {F1follow, F2follow});
|
|
|
PabloAST * toKeep = pb.createNot(toDelete);
|
|
|
pb.createAssign(pb.createExtract(getOutputStreamVar("toKeep"), pb.getInteger(0)), pb.createInFile(toKeep));
|
|
|
}
|
... | ... | @@ -84,4 +84,4 @@ MaskOutField::MaskOutField2(BuilderRef b, StreamSet * Record_separators, |
|
|
|
|
|
Finally, the first column must be handled differently. In this case, there is
|
|
|
no preceding comma, so the mask should zero out the following comma rather than the
|
|
|
preceding comma. |
|
|
preceding comma. |
|
|
\ No newline at end of file |