Search in sources :

Example 1 with OutputFrameVerifier

use of org.apache.hyracks.tests.util.OutputFrameVerifier in project asterixdb by apache.

the class IntersectOperatorDescriptorTest method executeAndVerifyResult.

private void executeAndVerifyResult(List<IFrame>[] inputFrames, List<Object[]> answer) throws Exception {
    IntersectOperatorDescriptor.IntersectOperatorNodePushable pushable = new IntersectOperatorDescriptor.IntersectOperatorNodePushable(ctx, nInputs, inputRecordDescriptor, compareFields, null, comparatorFactory);
    assertEquals(nInputs, pushable.getInputArity());
    IFrameWriter[] writers = new IFrameWriter[nInputs];
    for (int i = 0; i < nInputs; i++) {
        writers[i] = pushable.getInputFrameWriter(i);
    }
    IFrameWriter resultVerifier = new OutputFrameVerifier(outRecordDescriptor, answer);
    pushable.setOutputFrameWriter(0, resultVerifier, outRecordDescriptor);
    multiThreadTaskEmulator.runInParallel(writers, inputFrames);
}
Also used : IFrameWriter(org.apache.hyracks.api.comm.IFrameWriter) IntersectOperatorDescriptor(org.apache.hyracks.dataflow.std.intersect.IntersectOperatorDescriptor) OutputFrameVerifier(org.apache.hyracks.tests.util.OutputFrameVerifier)

Aggregations

IFrameWriter (org.apache.hyracks.api.comm.IFrameWriter)1 IntersectOperatorDescriptor (org.apache.hyracks.dataflow.std.intersect.IntersectOperatorDescriptor)1 OutputFrameVerifier (org.apache.hyracks.tests.util.OutputFrameVerifier)1