Merge remote-tracking branch 'origin/ignite-sprint-3' into ignite-sprint-3
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java b/modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java
index f2a43eb..688eb2e 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java
@@ -29,7 +29,7 @@
  *
  * @see IgniteCache#query(Query)
  */
-public class ScanQuery<K, V> extends Query<Cache.Entry<K, V>> {
+public final class ScanQuery<K, V> extends Query<Cache.Entry<K, V>> {
     /** */
     private static final long serialVersionUID = 0L;
 
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/SqlFieldsQuery.java b/modules/core/src/main/java/org/apache/ignite/cache/query/SqlFieldsQuery.java
index 1ffd14f..04131e2 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/SqlFieldsQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/SqlFieldsQuery.java
@@ -28,7 +28,7 @@
  * on SQL {@code 'select'} clause, as opposed to {@link SqlQuery}, which always returns
  * the whole key and value objects back.
  * <h1 class="header">Collocated Flag</h1>
- * Collocation flag si used for optimization purposes. Whenever Ignite executes
+ * Collocation flag is used for optimization purposes. Whenever Ignite executes
  * a distributed query, it sends sub-queries to individual cluster members.
  * If you know in advance that the elements of your query selection are collocated
  * together on the same node, usually based on some <b>affinity-key</b>, Ignite
@@ -121,16 +121,16 @@
     }
 
     /**
-     * Checks if this query colocated.
+     * Checks if this query is collocated.
      *
-     * @return {@code true} If the query is colocated.
+     * @return {@code true} If the query is collocated.
      */
     public boolean isCollocated() {
         return collocated;
     }
 
     /**
-     * Sets flag defining if this query colocated.
+     * Sets flag defining if this query is collocated.
      *
      * @param collocated Flag value.
      * @return {@code this} For chaining.
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
index 20344c0..73d7751 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
@@ -71,10 +71,10 @@
     /**
      * @param stmt Prepared statement.
      * @param params Parameters.
-     * @param colocated Colocated query.
+     * @param collocated Collocated query.
      * @return Two step query.
      */
-    public static GridCacheTwoStepQuery split(JdbcPreparedStatement stmt, Object[] params, boolean colocated) {
+    public static GridCacheTwoStepQuery split(JdbcPreparedStatement stmt, Object[] params, boolean collocated) {
         if (params == null)
             params = GridCacheSqlQuery.EMPTY_PARAMS;
 
@@ -141,7 +141,7 @@
         boolean aggregateFound = false;
 
         for (int i = 0, len = mapExps.size(); i < len; i++) // Remember len because mapExps list can grow.
-            aggregateFound |= splitSelectExpression(mapExps, rdcExps, colNames, i, colocated);
+            aggregateFound |= splitSelectExpression(mapExps, rdcExps, colNames, i, collocated);
 
         // Fill select expressions.
         mapQry.clearSelect();
@@ -162,14 +162,14 @@
             for (int col : srcQry.groupColumns())
                 mapQry.addGroupExpression(column(((GridSqlAlias)mapExps.get(col)).alias()));
 
-            if (!colocated) {
+            if (!collocated) {
                 for (int col : srcQry.groupColumns())
                     rdcQry.addGroupExpression(column(((GridSqlAlias)mapExps.get(col)).alias()));
             }
         }
 
         // -- HAVING
-        if (srcQry.having() != null && !colocated) {
+        if (srcQry.having() != null && !collocated) {
             // TODO Find aggregate functions in HAVING clause.
             rdcQry.whereAnd(column(columnName(srcQry.havingColumn())));
 
@@ -300,11 +300,11 @@
      * @param rdcSelect Selects for reduce query.
      * @param colNames Set of unique top level column names.
      * @param idx Index.
-     * @param colocated If it is a colocated query.
+     * @param collocated If it is a collocated query.
      * @return {@code true} If aggregate was found.
      */
     private static boolean splitSelectExpression(List<GridSqlElement> mapSelect, GridSqlElement[] rdcSelect,
-        Set<String> colNames, int idx, boolean colocated) {
+        Set<String> colNames, int idx, boolean collocated) {
         GridSqlElement el = mapSelect.get(idx);
 
         GridSqlAlias alias = null;
@@ -316,7 +316,7 @@
             el = alias.child();
         }
 
-        if (!colocated && el instanceof GridSqlAggregateFunction) {
+        if (!collocated && el instanceof GridSqlAggregateFunction) {
             aggregateFound = true;
 
             GridSqlAggregateFunction agg = (GridSqlAggregateFunction)el;