ignite-sql - query cursor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5b37fdda Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5b37fdda Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5b37fdda Branch: refs/heads/ignite-sql Commit: 5b37fddaead30ef1bbd0ce0b2e1c8573177a4c5e Parents: 1d831bf Author: S.Vladykin <svlady...@gridgain.com> Authored: Tue Feb 3 02:31:08 2015 +0300 Committer: S.Vladykin <svlady...@gridgain.com> Committed: Tue Feb 3 02:31:08 2015 +0300 ---------------------------------------------------------------------- .../apache/ignite/cache/query/QueryCursor.java | 20 +++-- .../cache/query/GridCacheQueriesEx.java | 10 +-- .../cache/query/GridCacheQueriesImpl.java | 11 +-- .../cache/query/GridCacheQueriesProxy.java | 4 +- .../cache/query/GridCacheSqlResult.java | 21 ----- .../processors/query/GridQueryIndexing.java | 11 ++- .../processors/query/GridQueryProcessor.java | 8 +- .../processors/query/h2/IgniteH2Indexing.java | 24 +++--- .../processors/query/h2/QueryCursorImpl.java | 81 ++++++++++++++++++++ .../h2/twostep/GridReduceQueryExecutor.java | 25 +++--- .../cache/GridCacheCrossCacheQuerySelfTest.java | 14 ++-- 11 files changed, 145 insertions(+), 84 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b37fdda/modules/core/src/main/java/org/apache/ignite/cache/query/QueryCursor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryCursor.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryCursor.java index 9d7f64a..6f75e0e 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryCursor.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryCursor.java @@ -20,18 +20,26 @@ package org.apache.ignite.cache.query; import java.util.*; /** - * TODO: Add interface description. - * - * @author @java.author - * @version @java.version + * Query result cursor. Implements {@link Iterable} only for convenience, e.g. {@link #iterator()} + * can be obtained only once. Also if iteration is started then {@link #getAll()} method calls are prohibited. + * <p> + * Not thread safe and must be used from single thread only. */ -public interface QueryCursor<T> extends Iterable<T> { +public interface QueryCursor<T> extends Iterable<T>, AutoCloseable { /** * Gets all query results and stores them in the collection. * Use this method when you know in advance that query result is * relatively small and will not cause memory utilization issues. + * <p> + * Since all the results will be fetched, all the resources will be closed + * automatically after this call, e.g. there is no need to call {@link #close()} method in this case. * * @return Collection containing full query result. */ - public Collection<T> getAll(); + public List<T> getAll(); + + /** + * Closes all resources related to this cursor. + */ + @Override public void close(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b37fdda/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java index 8d3c2be..c1503fc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.query; import org.apache.ignite.*; -import org.apache.ignite.internal.*; +import org.apache.ignite.cache.query.*; import java.util.*; @@ -53,15 +53,15 @@ public interface GridCacheQueriesEx<K, V> extends CacheQueries<K, V> { /** * @param space Space name. * @param qry Query. - * @return Future. + * @return Cursor. */ - public IgniteInternalFuture<GridCacheSqlResult> execute(String space, GridCacheTwoStepQuery qry); + public QueryCursor<List<?>> execute(String space, GridCacheTwoStepQuery qry); /** * @param space Space. * @param sqlQry Query. * @param params Parameters. - * @return Result. + * @return Cursor. */ - public IgniteInternalFuture<GridCacheSqlResult> executeTwoStepQuery(String space, String sqlQry, Object... params); + public QueryCursor<List<?>> executeTwoStepQuery(String space, String sqlQry, Object... params); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b37fdda/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java index 4d6a63d..2ad42b4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java @@ -167,17 +167,12 @@ public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K, V>, Ext } /** {@inheritDoc} */ - @Override public IgniteInternalFuture<GridCacheSqlResult> execute(String space, GridCacheTwoStepQuery qry) { + @Override public QueryCursor<List<?>> execute(String space, GridCacheTwoStepQuery qry) { return ctx.kernalContext().query().queryTwoStep(space, qry); } - /** - * @param space Space. - * @param sqlQry Query. - * @param params Parameters. - * @return Result. - */ - public IgniteInternalFuture<GridCacheSqlResult> executeTwoStepQuery(String space, String sqlQry, Object[] params) { + /** {@inheritDoc} */ + @Override public QueryCursor<List<?>> executeTwoStepQuery(String space, String sqlQry, Object[] params) { return ctx.kernalContext().query().queryTwoStep(space, sqlQry, params); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b37fdda/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java index 60b2e16..0b8ca0e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java @@ -175,7 +175,7 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K, V>, Ex } /** {@inheritDoc} */ - @Override public IgniteInternalFuture<GridCacheSqlResult> execute(String space, GridCacheTwoStepQuery qry) { + @Override public QueryCursor<List<?>> execute(String space, GridCacheTwoStepQuery qry) { GridCacheProjectionImpl<K, V> prev = gate.enter(prj); try { @@ -187,7 +187,7 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K, V>, Ex } /** {@inheritDoc} */ - @Override public IgniteInternalFuture<GridCacheSqlResult> executeTwoStepQuery(String space, String sqlQry, Object[] params) { + @Override public QueryCursor<List<?>> executeTwoStepQuery(String space, String sqlQry, Object[] params) { GridCacheProjectionImpl<K, V> prev = gate.enter(prj); try { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b37fdda/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlResult.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlResult.java deleted file mode 100644 index a8eb69b..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlResult.java +++ /dev/null @@ -1,21 +0,0 @@ -/* @java.file.header */ - -/* _________ _____ __________________ _____ - * __ ____/___________(_)______ /__ ____/______ ____(_)_______ - * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \ - * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / / - * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/ - */ - -package org.apache.ignite.internal.processors.cache.query; - -import java.util.*; - -/** - * TODO replace with {@link org.apache.ignite.cache.query.QueryCursor} - * - * SQL Query result. - */ -public interface GridCacheSqlResult extends AutoCloseable, Iterable<List<?>> { - // No-op. -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b37fdda/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java index 60528fa..0833ca8 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java @@ -18,6 +18,7 @@ package org.apache.ignite.internal.processors.query; import org.apache.ignite.*; +import org.apache.ignite.cache.query.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite.lang.*; @@ -52,17 +53,19 @@ public interface GridQueryIndexing { * * @param space Space name. * @param qry Query. - * @return Future. + * @return Cursor. */ - public IgniteInternalFuture<GridCacheSqlResult> queryTwoStep(String space, GridCacheTwoStepQuery qry); + public QueryCursor<List<?>> queryTwoStep(String space, GridCacheTwoStepQuery qry); /** + * Parses SQL query into two step query and executes it. + * * @param space Space. * @param sqlQry Query. * @param params Parameters. - * @return Result. + * @return Cursor. */ - public IgniteInternalFuture<GridCacheSqlResult> queryTwoStep(String space, String sqlQry, Object[] params); + public QueryCursor<List<?>> queryTwoStep(String space, String sqlQry, Object[] params); /** * Queries individual fields (generally used by JDBC drivers). http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b37fdda/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java index 8257f9b..1a3ae62 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java @@ -439,9 +439,9 @@ public class GridQueryProcessor extends GridProcessorAdapter { /** * @param space Space name. * @param qry Query. - * @return Future. + * @return Cursor. */ - public IgniteInternalFuture<GridCacheSqlResult> queryTwoStep(String space, GridCacheTwoStepQuery qry) { + public QueryCursor<List<?>> queryTwoStep(String space, GridCacheTwoStepQuery qry) { if (!busyLock.enterBusy()) throw new IllegalStateException("Failed to execute query (grid is stopping)."); @@ -457,9 +457,9 @@ public class GridQueryProcessor extends GridProcessorAdapter { * @param space Space. * @param sqlQry Query. * @param params Parameters. - * @return Result. + * @return Cursor. */ - public IgniteInternalFuture<GridCacheSqlResult> queryTwoStep(String space, String sqlQry, Object[] params) { + public QueryCursor<List<?>> queryTwoStep(String space, String sqlQry, Object[] params) { if (!busyLock.enterBusy()) throw new IllegalStateException("Failed to execute query (grid is stopping)."); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b37fdda/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java index 2a8c673..2696def 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java @@ -30,7 +30,6 @@ import org.apache.ignite.internal.processors.query.h2.opt.*; import org.apache.ignite.internal.processors.query.h2.sql.*; import org.apache.ignite.internal.processors.query.h2.twostep.*; import org.apache.ignite.internal.util.*; -import org.apache.ignite.internal.util.future.*; import org.apache.ignite.internal.util.lang.*; import org.apache.ignite.internal.util.offheap.unsafe.*; import org.apache.ignite.internal.util.typedef.*; @@ -234,10 +233,14 @@ public class IgniteH2Indexing implements GridQueryIndexing { /** * @param space Space. * @return Connection. - * @throws IgniteCheckedException If failed. */ - public Connection connectionForSpace(@Nullable String space) throws IgniteCheckedException { - return connectionForThread(schema(space)); + public Connection connectionForSpace(@Nullable String space) { + try { + return connectionForThread(schema(space)); + } + catch (IgniteCheckedException e) { + throw new IgniteException(e); + } } /** @@ -753,20 +756,13 @@ public class IgniteH2Indexing implements GridQueryIndexing { } /** {@inheritDoc} */ - @Override public IgniteInternalFuture<GridCacheSqlResult> queryTwoStep(String space, GridCacheTwoStepQuery qry) { + @Override public QueryCursor<List<?>> queryTwoStep(String space, GridCacheTwoStepQuery qry) { return rdcQryExec.query(space, qry); } /** {@inheritDoc} */ - @Override public IgniteInternalFuture<GridCacheSqlResult> queryTwoStep(String space, String sqlQry, Object[] params) { - Connection c; - - try { - c = connectionForSpace(space); - } - catch (IgniteCheckedException e) { - return new GridFinishedFutureEx<>(e); - } + @Override public QueryCursor<List<?>> queryTwoStep(String space, String sqlQry, Object[] params) { + Connection c = connectionForSpace(space); GridCacheTwoStepQuery twoStepQry = GridSqlQuerySplitter.split(c, sqlQry, params); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b37fdda/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryCursorImpl.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryCursorImpl.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryCursorImpl.java new file mode 100644 index 0000000..a871130 --- /dev/null +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryCursorImpl.java @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.query.h2; + +import org.apache.ignite.*; +import org.apache.ignite.cache.query.*; + +import java.util.*; + +/** + * Query cursor implementation. + */ +public class QueryCursorImpl<T> implements QueryCursor<T> { + /** */ + private GridH2ResultSetIterator<T> iter; + + /** */ + private boolean iterTaken; + + /** + * @param iter Iterator. + */ + public QueryCursorImpl(GridH2ResultSetIterator<T> iter) { + this.iter = iter; + } + + /** {@inheritDoc} */ + @Override public Iterator<T> iterator() { + if (iter == null) + throw new IgniteException("Cursor is closed."); + + if (iterTaken) + throw new IgniteException("Iterator is already taken from this cursor."); + + iterTaken = true; + + return iter; + } + + /** {@inheritDoc} */ + @Override public List<T> getAll() { + ArrayList<T> all = new ArrayList<>(); + + for (T t : this) all.add(t); // Implicitly calls iterator() to do all checks. + + close(); + + return all; + } + + /** {@inheritDoc} */ + @Override public void close() { + GridH2ResultSetIterator<T> i; + + if ((i = iter) != null) { + iter = null; + + try { + i.close(); + } + catch (IgniteCheckedException e) { + throw new IgniteException(e); + } + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b37fdda/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java index 521cc93..8b7ca13 100644 --- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java +++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java @@ -10,12 +10,12 @@ package org.apache.ignite.internal.processors.query.h2.twostep; import org.apache.ignite.*; +import org.apache.ignite.cache.query.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite.internal.processors.query.h2.*; import org.apache.ignite.internal.processors.query.h2.twostep.messages.*; -import org.apache.ignite.internal.util.future.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.lang.*; @@ -78,6 +78,10 @@ public class GridReduceQueryExecutor { U.error(log, "Failed to execute query.", msg.error()); } + /** + * @param node Node. + * @param msg Message. + */ private void onNextPage(final ClusterNode node, GridNextPageResponse msg) { final long qryReqId = msg.queryRequestId(); final int qry = msg.query(); @@ -108,21 +112,16 @@ public class GridReduceQueryExecutor { /** * @param space Space name. * @param qry Query. - * @return Future. + * @return Cursor. */ - public IgniteInternalFuture<GridCacheSqlResult> query(String space, GridCacheTwoStepQuery qry) { + public QueryCursor<List<?>> query(String space, GridCacheTwoStepQuery qry) { long qryReqId = reqIdGen.incrementAndGet(); QueryRun r = new QueryRun(); r.tbls = new ArrayList<>(qry.mapQueries().size()); - try { - r.conn = h2.connectionForSpace(space); - } - catch (IgniteCheckedException e) { - return new GridFinishedFutureEx<>(e); - } + r.conn = h2.connectionForSpace(space); Collection<ClusterNode> nodes = ctx.grid().cluster().nodes(); // TODO filter nodes somehow? @@ -133,7 +132,7 @@ public class GridReduceQueryExecutor { tbl = createTable(r.conn, mapQry); } catch (IgniteCheckedException e) { - return new GridFinishedFutureEx<>(e); + throw new IgniteException(e); } tbl.getScanIndex(null).setNumberOfSources(nodes.size()); @@ -158,12 +157,12 @@ public class GridReduceQueryExecutor { for (GridMergeTable tbl : r.tbls) dropTable(r.conn, tbl.getName()); - return new GridFinishedFuture(ctx, new Iter(res)); + return new QueryCursorImpl<>(new Iter(res)); } catch (IgniteCheckedException | InterruptedException | SQLException e) { U.closeQuiet(r.conn); - return new GridFinishedFuture<>(ctx, e); + throw new IgniteException(e); } } @@ -221,7 +220,7 @@ public class GridReduceQueryExecutor { /** * */ - private static class Iter extends GridH2ResultSetIterator<List<?>> implements GridCacheSqlResult { + private static class Iter extends GridH2ResultSetIterator<List<?>> { /** * @param data Data array. * @throws IgniteCheckedException If failed. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b37fdda/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java index 09739fc..02c36ca 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java @@ -116,7 +116,7 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest { q.addMapQuery("_cnts_", "select count(*) x from \"partitioned\".FactPurchase where ? = ?", 2, 2); - Object cnt = qx.execute(cache, q).get().iterator().next().get(0); + Object cnt = qx.execute(cache, q).getAll().iterator().next().get(0); assertEquals(10L, cnt); } @@ -135,7 +135,7 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest { X.println("___ simple"); for (List<?> o : qx.executeTwoStepQuery("partitioned", "select f.productId, p.name, f.price " + - "from FactPurchase f, \"replicated\".DimProduct p where p.id = f.productId ").get()) { + "from FactPurchase f, \"replicated\".DimProduct p where p.id = f.productId ").getAll()) { X.println("___ -> " + o); set1.add((Integer)o.get(0)); @@ -146,7 +146,7 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest { X.println("___ GROUP BY"); for (List<?> o : qx.executeTwoStepQuery("partitioned", "select productId from FactPurchase group by productId") - .get()) { + .getAll()) { X.println("___ -> " + o); assertTrue(set0.add((Integer) o.get(0))); @@ -164,7 +164,7 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest { "count(nullif(f.price, 5)) " + "from FactPurchase f, \"replicated\".DimProduct p " + "where p.id = f.productId " + - "group by f.productId, p.name").get()) { + "group by f.productId, p.name").getAll()) { X.println("___ -> " + o); assertTrue(names.add((String)o.get(0))); @@ -178,7 +178,7 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest { "from FactPurchase f, \"replicated\".DimProduct p " + "where p.id = f.productId " + "group by f.productId, p.name " + - "having s >= 15").get()) { + "having s >= 15").getAll()) { X.println("___ -> " + o); assertTrue(i(o, 1) >= 15); @@ -191,7 +191,7 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest { for (List<?> o : qx.executeTwoStepQuery("partitioned", "select top 3 distinct productId " + "from FactPurchase f " + - "order by productId desc ").get()) { + "order by productId desc ").getAll()) { X.println("___ -> " + o); assertEquals(top--, o.get(0)); @@ -205,7 +205,7 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest { "select distinct productId " + "from FactPurchase f " + "order by productId desc " + - "limit 2 offset 1").get()) { + "limit 2 offset 1").getAll()) { X.println("___ -> " + o); assertEquals(top--, o.get(0));