You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2014/12/22 14:05:44 UTC
incubator-ignite git commit: ignite-gg9499 - fixes
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-gg9499 67df1ce35 -> b16f120bf
ignite-gg9499 - fixes
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b16f120b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b16f120b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b16f120b
Branch: refs/heads/ignite-gg9499
Commit: b16f120bf0958b2047b51605a3cdf19f7974df5f
Parents: 67df1ce
Author: S.Vladykin <sv...@gridgain.com>
Authored: Mon Dec 22 16:05:34 2014 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Mon Dec 22 16:05:34 2014 +0300
----------------------------------------------------------------------
.../h2/twostep/messages/GridNextPageResponse.java | 6 +++++-
.../cache/GridCacheCrossCacheQuerySelfTest.java | 18 +++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b16f120b/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/twostep/messages/GridNextPageResponse.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/twostep/messages/GridNextPageResponse.java b/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/twostep/messages/GridNextPageResponse.java
index 0834f4c..f131604 100644
--- a/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/twostep/messages/GridNextPageResponse.java
+++ b/modules/indexing/src/main/java/org/gridgain/grid/kernal/processors/query/h2/twostep/messages/GridNextPageResponse.java
@@ -156,7 +156,11 @@ public class GridNextPageResponse implements Externalizable {
int cols = in.readInt();
int dataSize = in.readInt();
- Data data = Data.create(null, dataSize);
+ byte[] dataBytes = new byte[dataSize];
+
+ in.readFully(dataBytes);
+
+ Data data = Data.create(null, dataBytes);
for (int r = 0; r < rowCnt; r++) {
Value[] row = new Value[cols];
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b16f120b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheCrossCacheQuerySelfTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
index 90a2d4c..b4d6595 100644
--- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
@@ -96,21 +96,19 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
public void testTwoStep() throws Exception {
fillCaches();
- GridCacheTwoStepQuery q = new GridCacheTwoStepQuery("select * from _cnts_");
-
- q.addMapQuery("_cnts_", "select count(*) cnt from \"partitioned\".FactPurchase");
-
GridCacheQueriesEx<Integer, FactPurchase> qx =
(GridCacheQueriesEx<Integer, FactPurchase>)ignite.<Integer, FactPurchase>cache("partitioned").queries();
- for (List<?> row : qx.execute(q).get())
- X.println("__ " + row);
+// for (Map.Entry<Integer, FactPurchase> e : qx.createSqlQuery(FactPurchase.class, "1 = 1").execute().get())
+// X.println("___ " + e);
+ GridCacheTwoStepQuery q = new GridCacheTwoStepQuery("select cast(sum(x) as long) from _cnts_ where ? = ?", 1, 1);
+ q.addMapQuery("_cnts_", "select count(*) x from \"partitioned\".FactPurchase where ? = ?", 2 ,2);
-// Object cnt = .next().get(0);
-//
-// assertEquals(10L, cnt);
+ Object cnt = qx.execute(q).get().iterator().next().get(0);
+
+ assertEquals(10L, cnt);
}
/** @throws Exception If failed. */
@@ -134,8 +132,6 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
* @throws IgniteCheckedException If failed.
*/
private void fillCaches() throws IgniteCheckedException, InterruptedException {
- awaitPartitionMapExchange();
-
int idGen = 0;
GridCache<Integer, Object> dimCache = ignite.cache("replicated");