sohami commented on a change in pull request #1344: DRILL-6461: Added basic
data correctness tests for hash agg, and improved operator unit testing
framework.
URL: https://github.com/apache/drill/pull/1344#discussion_r202754788
##########
File path:
exec/java-exec/src/test/java/org/apache/drill/test/rowSet/RowSetBatch.java
##########
@@ -29,13 +30,28 @@
import org.apache.drill.exec.record.selection.SelectionVector2;
import org.apache.drill.exec.record.selection.SelectionVector4;
+import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
-public class RowSetBatch implements RecordBatch {
- private final RowSet rowSet;
+/**
+ * A mock operator that returns the provided {@link RowSet}s as batches.
Currently it's assumed that all the {@link RowSet}s have the same schema.
+ */
+public class RowSetBatch implements CloseableRecordBatch {
Review comment:
This is similar to
[MockRecordBatch](https://github.com/apache/drill/blob/master/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/MockRecordBatch.java).
I created that class for Lateral-Unnest project.
The main usage for that class was to be able to simulate different
IterOutcome with different type of batches while unit testing an operator. May
be we can try to merge these 2 classes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services