commit | ca109a49fefe2d90332060dfeed11f28e771ef9a | [log] [tgz] |
---|---|---|
author | salsubaiee <salsubaiee@gmail.com> | Thu Jul 25 01:32:57 2013 -0700 |
committer | salsubaiee <salsubaiee@gmail.com> | Wed Aug 14 20:55:59 2013 -0700 |
tree | 3374c39fc142990d77189b06721a8c0ef8954f29 | |
parent | 0b795291be111f4aa578306ff3230911cb60127d [diff] |
Make sure we flush a frame if there is only a single tuple.
diff --git a/algebricks/algebricks-runtime/src/main/java/edu/uci/ics/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java b/algebricks/algebricks-runtime/src/main/java/edu/uci/ics/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java index 11f4486..6a33e73 100644 --- a/algebricks/algebricks-runtime/src/main/java/edu/uci/ics/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java +++ b/algebricks/algebricks-runtime/src/main/java/edu/uci/ics/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
@@ -66,8 +66,10 @@ int nTuple = tAccess.getTupleCount(); int t = 0; - for (; t < nTuple - 1; t++) { - appendProjectionToFrame(t, projectionList); + if (nTuple > 1) { + for (; t < nTuple - 1; t++) { + appendProjectionToFrame(t, projectionList); + } } // Process last tuple but we must first check if there is still a tuple to process if (t < nTuple) {