If there is no result page, nothing should be attempted to be read from the result store.

git-svn-id: https://hyracks.googlecode.com/svn/branches/fullstack_rsd_fixes@3333 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks/hyracks-control/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/dataset/DatasetPartitionReader.java b/hyracks/hyracks-control/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/dataset/DatasetPartitionReader.java
index 296c502..74a4c55 100644
--- a/hyracks/hyracks-control/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/dataset/DatasetPartitionReader.java
+++ b/hyracks/hyracks-control/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/dataset/DatasetPartitionReader.java
@@ -66,6 +66,9 @@
 
         if (readSize < buffer.capacity()) {
             long localPageOffset = offset - resultState.getPersistentSize();
+            if (localPageOffset <= 0) {
+            	return readSize;
+            }
             int localPageIndex = (int) (localPageOffset / datasetMemoryManager.getPageSize());
             int pageOffset = (int) (localPageOffset % datasetMemoryManager.getPageSize());
             Page page = resultState.getPage(localPageIndex);