ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [05/50] [abbrv] ignite git commit: ignite-db - cost
Date Tue, 19 Apr 2016 12:58:22 GMT
ignite-db - cost


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ddccaaf6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ddccaaf6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ddccaaf6

Branch: refs/heads/ignite-db-x-10884
Commit: ddccaaf6a2a3a985f2aabfd9416b41c201f92700
Parents: 8cccb09
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Wed Apr 6 08:44:17 2016 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Wed Apr 6 08:44:17 2016 +0300

----------------------------------------------------------------------
 .../processors/query/h2/database/BPlusTreeRefIndex.java         | 2 +-
 .../processors/database/IgniteDbSingleNodePutGetSelfTest.java   | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ddccaaf6/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/BPlusTreeRefIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/BPlusTreeRefIndex.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/BPlusTreeRefIndex.java
index ddeedfd..d84386c 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/BPlusTreeRefIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/BPlusTreeRefIndex.java
@@ -2385,7 +2385,7 @@ public class BPlusTreeRefIndex extends PageMemoryIndex {
 
     /** {@inheritDoc} */
     @Override public double getCost(Session ses, int[] masks, TableFilter filter, SortOrder
sortOrder) {
-        return 10 * getCostRangeIndex(masks, getRowCountApproximation(), filter, sortOrder);
+        return getCostRangeIndex(masks, getRowCountApproximation(), filter, sortOrder);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/ddccaaf6/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodePutGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodePutGetSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodePutGetSelfTest.java
index c147379..575ccaf 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodePutGetSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbSingleNodePutGetSelfTest.java
@@ -263,6 +263,11 @@ public class IgniteDbSingleNodePutGetSelfTest extends GridCommonAbstractTest
{
         assertEquals(1, cache.query(new SqlFieldsQuery("select lval from dbvalue where ival
= 7899")).getAll().size());
         assertEquals(2000, cache.query(new SqlFieldsQuery("select lval from dbvalue where
ival >= 5000 and ival < 7000"))
             .getAll().size());
+
+        String plan = cache.query(new SqlFieldsQuery(
+                "explain select lval from dbvalue where ival >= 5000 and ival < 7000")).getAll().get(0).get(0).toString();
+
+        assertTrue(plan, plan.contains("iVal_idx"));
     }
 
 


Mime
View raw message