You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/07/23 09:40:40 UTC
[12/18] incubator-ignite git commit: ignite-1015 - review fixes
ignite-1015 - review 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/624ec830
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/624ec830
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/624ec830
Branch: refs/heads/ignite-752
Commit: 624ec83022f8d8c950d4cb393ebe961096e168c4
Parents: 1eb0d79
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Jul 22 18:41:06 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Jul 22 18:41:06 2015 +0300
----------------------------------------------------------------------
.../processors/query/h2/sql/GridSqlQuerySplitter.java | 10 +++++-----
.../cache/GridCacheCrossCacheQuerySelfTest.java | 2 ++
2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/624ec830/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java
----------------------------------------------------------------------
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 056aafe..502366d 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
@@ -137,13 +137,13 @@ public class GridSqlQuerySplitter {
// nullifying or updating things, have to make sure that we will not need them in the original form later.
final GridSqlSelect mapQry = wrapUnion(collectAllSpaces(GridSqlQueryParser.parse(stmt), spaces));
- final String mergeTable = TABLE_FUNC_NAME + "()"; // table(0); TODO
+ final String mergeTable = TABLE_FUNC_NAME + "()"; // table(0); TODO IGNITE-1142
final boolean explain = mapQry.explain();
mapQry.explain(false);
- GridSqlSelect rdcQry = new GridSqlSelect().from(new GridSqlFunction(null, TABLE_FUNC_NAME)); // table(mergeTable)); TODO
+ GridSqlSelect rdcQry = new GridSqlSelect().from(new GridSqlFunction(null, TABLE_FUNC_NAME)); // table(mergeTable)); TODO IGNITE-1142
// Split all select expressions into map-reduce parts.
List<GridSqlElement> mapExps = F.addAll(new ArrayList<GridSqlElement>(mapQry.allColumns()),
@@ -176,7 +176,7 @@ public class GridSqlQuerySplitter {
// -- HAVING
if (mapQry.havingColumn() >= 0 && !collocated) {
- // TODO Find aggregate functions in HAVING clause or rewrite query to put all aggregates to SELECT clause.
+ // TODO IGNITE-1140 - Find aggregate functions in HAVING clause or rewrite query to put all aggregates to SELECT clause.
rdcQry.whereAnd(column(columnName(mapQry.havingColumn())));
mapQry.havingColumn(-1);
@@ -189,7 +189,7 @@ public class GridSqlQuerySplitter {
if (aggregateFound) // Ordering over aggregates does not make sense.
mapQry.clearSort(); // Otherwise map sort will be used by offset-limit.
- // TODO Check if sorting is done over aggregated expression, otherwise we can sort and use offset-limit.
+ // TODO IGNITE-1141 - Check if sorting is done over aggregated expression, otherwise we can sort and use offset-limit.
}
// -- LIMIT
@@ -425,7 +425,7 @@ public class GridSqlQuerySplitter {
GridSqlType type = el.expressionResultType();
if (type != null && type.type() == Value.UUID) // There is no JDBC type UUID, so conversion to bytes occurs.
- rdcEl = function(CAST).setCastType("UUID").addChild(rdcEl); // TODO remove this cast when table function removed
+ rdcEl = function(CAST).setCastType("UUID").addChild(rdcEl); // TODO IGNITE-1142 - remove this cast when table function removed
if (colNames.add(rdcColAlias)) // To handle column name duplication (usually wildcard for few tables).
rdcEl = alias(rdcColAlias, rdcEl);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/624ec830/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 a393991..63744f1 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
@@ -151,6 +151,7 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
qry = new SqlFieldsQuery("select p.name, avg(f.price), min(f.price), max(f.price), sum(f.price), count(*), " +
"count(nullif(f.price, 5)), (max(f.price) - min(f.price)) * 3 as nn " +
+ ", CAST(max(f.price) + 7 AS VARCHAR) " +
"from FactPurchase f, \"replicated\".DimProduct p " +
"where p.id = f.productId " +
"group by f.productId, p.name");
@@ -161,6 +162,7 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
assertTrue(names.add((String)o.get(0)));
assertEquals(i(o, 4), i(o, 2) + i(o, 3));
assertEquals(i(o, 7), (i(o, 3) - i(o, 2)) * 3);
+ assertEquals(o.get(8), Integer.toString(i(o, 3) + 7));
}
X.println("___ SUM HAVING");