You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lens.apache.org by pr...@apache.org on 2015/05/22 07:58:21 UTC

incubator-lens git commit: LENS-550: Removes enable-multi-select flag, since union is implemented now.

Repository: incubator-lens
Updated Branches:
  refs/heads/master d47af610c -> ca30cf8d6


LENS-550: Removes enable-multi-select flag, since union is implemented now.


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

Branch: refs/heads/master
Commit: ca30cf8d6489f019845cf45d212776f4332a4fd6
Parents: d47af61
Author: Sushil Mohanty <su...@inmobi.com>
Authored: Fri May 22 11:27:47 2015 +0530
Committer: Rajat Khandelwal <ra...@gmail.com>
Committed: Fri May 22 11:27:47 2015 +0530

----------------------------------------------------------------------
 .../apache/lens/cube/parse/CandidateFact.java   |  5 --
 .../lens/cube/parse/CandidateTableResolver.java |  5 --
 .../lens/cube/parse/CubeQueryConfUtil.java      |  1 -
 .../lens/cube/parse/StorageTableResolver.java   |  6 +--
 .../org/apache/lens/cube/parse/StorageUtil.java | 11 +----
 .../src/main/resources/olap-query-conf.xml      |  6 ---
 .../lens/cube/parse/TestCubeRewriter.java       |  2 -
 .../apache/lens/cube/parse/TestStorageUtil.java | 21 +++-----
 .../src/main/resources/hivedriver-default.xml   |  6 ---
 .../src/main/resources/jdbcdriver-default.xml   |  6 ---
 src/site/apt/admin/hivedriver-config.apt        | 18 +++----
 src/site/apt/admin/jdbcdriver-config.apt        | 52 ++++++++++----------
 src/site/apt/user/olap-query-conf.apt           | 34 ++++++-------
 13 files changed, 58 insertions(+), 115 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java
----------------------------------------------------------------------
diff --git a/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java b/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java
index dab01b3..52bf9aa 100644
--- a/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java
+++ b/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java
@@ -46,7 +46,6 @@ import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 import lombok.Getter;
-import lombok.Setter;
 
 /**
  * Holds context of a candidate fact table.
@@ -56,10 +55,6 @@ public class CandidateFact implements CandidateTable {
   final CubeFactTable fact;
   @Getter
   private Set<String> storageTables;
-  // flag to know if querying multiple storage tables is enabled for this fact
-  @Getter
-  @Setter
-  private boolean enabledMultiTableSelect;
   @Getter
   private int numQueriedParts = 0;
   @Getter

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTableResolver.java
----------------------------------------------------------------------
diff --git a/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTableResolver.java b/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTableResolver.java
index f79e7e7..40561ad 100644
--- a/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTableResolver.java
+++ b/lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTableResolver.java
@@ -45,7 +45,6 @@ import org.apache.hadoop.hive.ql.parse.SemanticException;
 class CandidateTableResolver implements ContextRewriter {
 
   private static final Log LOG = LogFactory.getLog(CandidateTableResolver.class.getName());
-  private boolean qlEnabledMultiTableSelect;
   private boolean checkForQueriedColumns = true;
 
   public CandidateTableResolver(Configuration conf) {
@@ -53,9 +52,6 @@ class CandidateTableResolver implements ContextRewriter {
 
   @Override
   public void rewriteContext(CubeQueryContext cubeql) throws SemanticException {
-    qlEnabledMultiTableSelect =
-      cubeql.getConf().getBoolean(CubeQueryConfUtil.ENABLE_MULTI_TABLE_SELECT,
-        CubeQueryConfUtil.DEFAULT_MULTI_TABLE_SELECT);
     if (checkForQueriedColumns) {
       LOG.debug("Dump queried columns:" + cubeql.getTblAliasToColumns());
       populateCandidateTables(cubeql);
@@ -96,7 +92,6 @@ class CandidateTableResolver implements ContextRewriter {
         }
         for (CubeFactTable fact : factTables) {
           CandidateFact cfact = new CandidateFact(fact, cubeql.getCube());
-          cfact.setEnabledMultiTableSelect(qlEnabledMultiTableSelect);
           cubeql.getCandidateFacts().add(cfact);
         }
         LOG.info("Populated candidate facts:" + cubeql.getCandidateFacts());

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java
----------------------------------------------------------------------
diff --git a/lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java b/lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java
index a6374f6..aab2488 100644
--- a/lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java
+++ b/lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java
@@ -44,7 +44,6 @@ public final class CubeQueryConfUtil {
   public static final String DRIVER_SUPPORTED_STORAGES = "lens.cube.query.driver." + "supported.storages";
   public static final String FAIL_QUERY_ON_PARTIAL_DATA = "lens.cube.query.fail.if.data.partial";
   public static final String NON_EXISTING_PARTITIONS = "lens.cube.query.nonexisting.partitions";
-  public static final String ENABLE_MULTI_TABLE_SELECT = "lens.cube.query.enable.multi.table.select";
   public static final String QUERY_MAX_INTERVAL = "lens.cube.query.max.interval";
   public static final String PROCESS_TIME_PART_COL = "lens.cube.query.process.time" + ".partition.column";
   public static final String LOOK_AHEAD_PT_PARTS_PFX = "lens.cube.query.lookahead.ptparts.forinterval.";

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java
----------------------------------------------------------------------
diff --git a/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java b/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java
index 2a60310..049826a 100644
--- a/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java
+++ b/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java
@@ -442,7 +442,7 @@ class StorageTableResolver implements ContextRewriter {
       }
       // Map from storage to covering parts
       Map<String, Set<FactPartition>> minimalStorageTables = new LinkedHashMap<String, Set<FactPartition>>();
-      boolean enabledMultiTableSelect = StorageUtil.getMinimalAnsweringTables(answeringParts, minimalStorageTables);
+      StorageUtil.getMinimalAnsweringTables(answeringParts, minimalStorageTables);
       if (minimalStorageTables.isEmpty()) {
         LOG.info("Not considering fact table:" + cfact + " as it does not" + " have any storage tables");
         cubeql.addFactPruningMsgs(cfact.fact, CandidateTablePruneCause.noCandidateStorages(skipStorageCauses));
@@ -474,10 +474,6 @@ class StorageTableResolver implements ContextRewriter {
         }
         cfact.getRangeToStorageWhereMap().put(trange, rangeToWhere);
       }
-      // multi table select is already false, do not alter it
-      if (cfact.isEnabledMultiTableSelect()) {
-        cfact.setEnabledMultiTableSelect(enabledMultiTableSelect);
-      }
       LOG.info("Resolved partitions for fact " + cfact + ": " + answeringParts + " storageTables:" + storageTables);
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageUtil.java
----------------------------------------------------------------------
diff --git a/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageUtil.java b/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageUtil.java
index 0704171..04a13a6 100644
--- a/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageUtil.java
+++ b/lens-cube/src/main/java/org/apache/lens/cube/parse/StorageUtil.java
@@ -101,13 +101,11 @@ public final class StorageUtil {
    *
    * @param answeringParts       Map from partition to set of answering storage tables
    * @param minimalStorageTables from storage to covering parts
-   * @return true if multi table select is enabled, false otherwise
    */
-  static boolean getMinimalAnsweringTables(List<FactPartition> answeringParts,
+  static void getMinimalAnsweringTables(List<FactPartition> answeringParts,
     Map<String, Set<FactPartition>> minimalStorageTables) {
     // map from storage table to the partitions it covers
     Map<String, Set<FactPartition>> invertedMap = new HashMap<String, Set<FactPartition>>();
-    boolean enableMultiTableSelect = true;
     // invert the answering tables map and put in inverted map
     for (FactPartition part : answeringParts) {
       for (String table : part.getStorageTables()) {
@@ -128,18 +126,11 @@ public final class StorageUtil {
         Map<String, Set<FactPartition>> maxCoveringStorage = getMaxCoveringStorage(invertedMap, remaining);
         minimalStorageTables.putAll(maxCoveringStorage);
         Set<FactPartition> coveringSet = maxCoveringStorage.values().iterator().next();
-        if (enableMultiTableSelect) {
-          if (!coveringSet.containsAll(invertedMap.get(maxCoveringStorage.keySet().iterator().next()))) {
-            LOG.info("Disabling multi table select" + " because the partitions are not mutually exclusive");
-            enableMultiTableSelect = false;
-          }
-        }
         remaining.removeAll(coveringSet);
       }
     } else {
       minimalStorageTables.putAll(invertedMap);
     }
-    return enableMultiTableSelect;
   }
 
   private static Map<String, Set<FactPartition>> getMaxCoveringStorage(

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/lens-cube/src/main/resources/olap-query-conf.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/main/resources/olap-query-conf.xml b/lens-cube/src/main/resources/olap-query-conf.xml
index b8dbc26..c9b8d0f 100644
--- a/lens-cube/src/main/resources/olap-query-conf.xml
+++ b/lens-cube/src/main/resources/olap-query-conf.xml
@@ -115,12 +115,6 @@
   </property>
 
   <property>
-    <name>lens.cube.query.enable.multi.table.select</name>
-    <value>true</value>
-    <description>Tells whether multiple tables are allowed in from clause of final HQL query</description>
-  </property>
-
-  <property>
     <name>lens.cube.query.max.interval</name>
     <value></value>
     <description>Maximum value of the update period that the query timed dimensions can take values of. For example, if

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java b/lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java
index 0f51978..9274ccf 100644
--- a/lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java
+++ b/lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java
@@ -395,7 +395,6 @@ public class TestCubeRewriter extends TestQueryRewrite {
   @Test
   public void testCubeWhereQueryWithMultipleTables() throws Exception {
     Configuration conf = getConf();
-    conf.setBoolean(CubeQueryConfUtil.ENABLE_MULTI_TABLE_SELECT, false);
     conf.set(CubeQueryConfUtil.getValidStorageTablesKey("testfact"), "C1_testFact,C2_testFact");
     conf.set(CubeQueryConfUtil.getValidUpdatePeriodsKey("testfact", "C1"), "DAILY");
     conf.set(CubeQueryConfUtil.getValidUpdatePeriodsKey("testfact2", "C1"), "YEARLY");
@@ -428,7 +427,6 @@ public class TestCubeRewriter extends TestQueryRewrite {
   @Test
   public void testCubeWhereQueryWithMultipleTablesForMonth() throws Exception {
     Configuration conf = getConf();
-    conf.setBoolean(CubeQueryConfUtil.ENABLE_MULTI_TABLE_SELECT, false);
     conf.set(CubeQueryConfUtil.DRIVER_SUPPORTED_STORAGES, "");
     conf.set(CubeQueryConfUtil.getValidStorageTablesKey("testfact"), "");
     conf.set(CubeQueryConfUtil.getValidUpdatePeriodsKey("testfact", "C1"), "HOURLY");

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/lens-cube/src/test/java/org/apache/lens/cube/parse/TestStorageUtil.java
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/java/org/apache/lens/cube/parse/TestStorageUtil.java b/lens-cube/src/test/java/org/apache/lens/cube/parse/TestStorageUtil.java
index 1a31121..81f515b 100644
--- a/lens-cube/src/test/java/org/apache/lens/cube/parse/TestStorageUtil.java
+++ b/lens-cube/src/test/java/org/apache/lens/cube/parse/TestStorageUtil.java
@@ -68,7 +68,7 @@ public class TestStorageUtil {
     answeringParts.add(new FactPartition("dt", CubeTestSetup.TWODAYS_BACK, UpdatePeriod.DAILY, null, null, s3));
     answeringParts.add(new FactPartition("dt", CubeTestSetup.NOW, UpdatePeriod.HOURLY, null, null, s3));
     Map<String, Set<FactPartition>> result = new HashMap<String, Set<FactPartition>>();
-    boolean mts = StorageUtil.getMinimalAnsweringTables(answeringParts, result);
+    StorageUtil.getMinimalAnsweringTables(answeringParts, result);
     System.out.println("results:" + result);
     Assert.assertEquals(1, result.size());
     Assert.assertEquals("S3", result.keySet().iterator().next());
@@ -77,7 +77,6 @@ public class TestStorageUtil {
     Assert.assertTrue(contains(coveredParts, CubeTestSetup.TWO_MONTHS_BACK));
     Assert.assertTrue(contains(coveredParts, CubeTestSetup.TWODAYS_BACK));
     Assert.assertTrue(contains(coveredParts, CubeTestSetup.NOW));
-    Assert.assertTrue(mts);
 
     // {s1,s2,s3}, {s4}, {s5} - > {s1,s4,s5} or {s2,s4,s5} or {s3,s4,s5}
     answeringParts = new ArrayList<FactPartition>();
@@ -85,7 +84,7 @@ public class TestStorageUtil {
     answeringParts.add(new FactPartition("dt", CubeTestSetup.TWODAYS_BACK, UpdatePeriod.DAILY, null, null, s4));
     answeringParts.add(new FactPartition("dt", CubeTestSetup.NOW, UpdatePeriod.HOURLY, null, null, s5));
     result = new HashMap<String, Set<FactPartition>>();
-    mts = StorageUtil.getMinimalAnsweringTables(answeringParts, result);
+    StorageUtil.getMinimalAnsweringTables(answeringParts, result);
     System.out.println("results:" + result);
     Assert.assertEquals(3, result.size());
     Assert.assertTrue(result.keySet().contains("S4"));
@@ -107,7 +106,6 @@ public class TestStorageUtil {
     }
     Assert.assertEquals(1, coveredParts.size());
     Assert.assertTrue(contains(coveredParts, CubeTestSetup.TWO_MONTHS_BACK));
-    Assert.assertTrue(mts);
 
     // {s1}, {s2}, {s3} -> {s1,s2,s3}
     answeringParts = new ArrayList<FactPartition>();
@@ -115,7 +113,7 @@ public class TestStorageUtil {
     answeringParts.add(new FactPartition("dt", CubeTestSetup.TWODAYS_BACK, UpdatePeriod.DAILY, null, null, s2));
     answeringParts.add(new FactPartition("dt", CubeTestSetup.NOW, UpdatePeriod.HOURLY, null, null, s3));
     result = new HashMap<String, Set<FactPartition>>();
-    mts = StorageUtil.getMinimalAnsweringTables(answeringParts, result);
+    StorageUtil.getMinimalAnsweringTables(answeringParts, result);
     System.out.println("results:" + result);
     Assert.assertEquals(3, result.size());
     Assert.assertTrue(result.keySet().contains("S1"));
@@ -130,7 +128,6 @@ public class TestStorageUtil {
     coveredParts = result.get("S3");
     Assert.assertEquals(1, coveredParts.size());
     Assert.assertTrue(contains(coveredParts, CubeTestSetup.NOW));
-    Assert.assertTrue(mts);
 
     // {s1, s2}, {s2, s3}, {s4} -> {s2,s4}
     answeringParts = new ArrayList<FactPartition>();
@@ -138,7 +135,7 @@ public class TestStorageUtil {
     answeringParts.add(new FactPartition("dt", CubeTestSetup.TWODAYS_BACK, UpdatePeriod.DAILY, null, null, s23));
     answeringParts.add(new FactPartition("dt", CubeTestSetup.NOW, UpdatePeriod.HOURLY, null, null, s4));
     result = new HashMap<String, Set<FactPartition>>();
-    mts = StorageUtil.getMinimalAnsweringTables(answeringParts, result);
+    StorageUtil.getMinimalAnsweringTables(answeringParts, result);
     System.out.println("results:" + result);
     Assert.assertEquals(2, result.size());
     Assert.assertTrue(result.keySet().contains("S2"));
@@ -150,7 +147,6 @@ public class TestStorageUtil {
     coveredParts = result.get("S4");
     Assert.assertEquals(1, coveredParts.size());
     Assert.assertTrue(contains(coveredParts, CubeTestSetup.NOW));
-    Assert.assertTrue(mts);
 
     // {s1, s2}, {s2, s4}, {s4} -> {s1,s4} or {s2,s4}
     answeringParts = new ArrayList<FactPartition>();
@@ -158,7 +154,7 @@ public class TestStorageUtil {
     answeringParts.add(new FactPartition("dt", CubeTestSetup.TWODAYS_BACK, UpdatePeriod.DAILY, null, null, s24));
     answeringParts.add(new FactPartition("dt", CubeTestSetup.NOW, UpdatePeriod.HOURLY, null, null, s4));
     result = new HashMap<String, Set<FactPartition>>();
-    mts = StorageUtil.getMinimalAnsweringTables(answeringParts, result);
+    StorageUtil.getMinimalAnsweringTables(answeringParts, result);
     System.out.println("results:" + result);
     Assert.assertEquals(2, result.size());
     Assert.assertTrue(result.keySet().contains("S2") || result.keySet().contains("S1"));
@@ -187,7 +183,6 @@ public class TestStorageUtil {
       Assert.assertTrue(contains(coveredParts, CubeTestSetup.NOW));
       Assert.assertTrue(contains(coveredParts, CubeTestSetup.TWODAYS_BACK));
     }
-    Assert.assertFalse(mts);
 
     // {s1, s2}, {s2, s3}, {s3,s4} -> {s2,s3}
     answeringParts = new ArrayList<FactPartition>();
@@ -195,7 +190,7 @@ public class TestStorageUtil {
     answeringParts.add(new FactPartition("dt", CubeTestSetup.TWODAYS_BACK, UpdatePeriod.DAILY, null, null, s23));
     answeringParts.add(new FactPartition("dt", CubeTestSetup.NOW, UpdatePeriod.HOURLY, null, null, s34));
     result = new HashMap<String, Set<FactPartition>>();
-    mts = StorageUtil.getMinimalAnsweringTables(answeringParts, result);
+    StorageUtil.getMinimalAnsweringTables(answeringParts, result);
     System.out.println("results:" + result);
     Assert.assertEquals(2, result.size());
     Assert.assertTrue(result.keySet().contains("S2"));
@@ -214,7 +209,6 @@ public class TestStorageUtil {
       Assert.assertTrue(contains(coveredParts, CubeTestSetup.TWODAYS_BACK));
       Assert.assertEquals(1, result.get("S2").size());
     }
-    Assert.assertFalse(mts);
 
     // {s1, s2}, {s2}, {s1} -> {s1,s2}
     answeringParts = new ArrayList<FactPartition>();
@@ -222,7 +216,7 @@ public class TestStorageUtil {
     answeringParts.add(new FactPartition("dt", CubeTestSetup.TWODAYS_BACK, UpdatePeriod.DAILY, null, null, s2));
     answeringParts.add(new FactPartition("dt", CubeTestSetup.NOW, UpdatePeriod.HOURLY, null, null, s1));
     result = new HashMap<String, Set<FactPartition>>();
-    mts = StorageUtil.getMinimalAnsweringTables(answeringParts, result);
+    StorageUtil.getMinimalAnsweringTables(answeringParts, result);
     System.out.println("results:" + result);
     Assert.assertEquals(2, result.size());
     Assert.assertTrue(result.keySet().contains("S1"));
@@ -241,7 +235,6 @@ public class TestStorageUtil {
       Assert.assertTrue(contains(coveredParts, CubeTestSetup.TWO_MONTHS_BACK));
       Assert.assertEquals(1, result.get("S2").size());
     }
-    Assert.assertFalse(mts);
   }
 
   private boolean contains(Set<FactPartition> parts, Date partSpec) {

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/lens-driver-hive/src/main/resources/hivedriver-default.xml
----------------------------------------------------------------------
diff --git a/lens-driver-hive/src/main/resources/hivedriver-default.xml b/lens-driver-hive/src/main/resources/hivedriver-default.xml
index 7d06fee..85a3f89 100644
--- a/lens-driver-hive/src/main/resources/hivedriver-default.xml
+++ b/lens-driver-hive/src/main/resources/hivedriver-default.xml
@@ -95,12 +95,6 @@
   </property>
 
   <property>
-    <name>lens.cube.query.enable.multi.table.select</name>
-    <value>false</value>
-    <description>Tells whether multiple tables are allowed in from clause of final HQL query</description>
-  </property>
-
-  <property>
     <name>lens.cube.query.replace.timedim</name>
     <value>true</value>
     <description>Tells whether timedim attribute queried in the time range should be replaced

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/lens-driver-jdbc/src/main/resources/jdbcdriver-default.xml
----------------------------------------------------------------------
diff --git a/lens-driver-jdbc/src/main/resources/jdbcdriver-default.xml b/lens-driver-jdbc/src/main/resources/jdbcdriver-default.xml
index 841dcac..99f6f20 100644
--- a/lens-driver-jdbc/src/main/resources/jdbcdriver-default.xml
+++ b/lens-driver-jdbc/src/main/resources/jdbcdriver-default.xml
@@ -163,12 +163,6 @@
   </property>
 
   <property>
-    <name>lens.cube.query.enable.multi.table.select</name>
-    <value>false</value>
-    <description>Tells whether multiple tables are allowed in from clause of final HQL query</description>
-  </property>
-
-  <property>
     <name>lens.cube.query.replace.timedim</name>
     <value>false</value>
     <description>Tells whether timedim attribute queried in the time range should be replaced with its corresponding

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/src/site/apt/admin/hivedriver-config.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/admin/hivedriver-config.apt b/src/site/apt/admin/hivedriver-config.apt
index ce0871a..b668e16 100644
--- a/src/site/apt/admin/hivedriver-config.apt
+++ b/src/site/apt/admin/hivedriver-config.apt
@@ -40,23 +40,21 @@ Hive driver configuration
 *--+--+---+--+
 |8|lens.cube.query.driver.supported.storages| |List of comma separated storage names that supported by a driver. If no value is specified, all storages are valid|
 *--+--+---+--+
-|9|lens.cube.query.enable.multi.table.select|false|Tells whether multiple tables are allowed in from clause of final HQL query|
+|9|lens.cube.query.replace.timedim|true|Tells whether timedim attribute queried in the time range should be replaced with its corresponding partition column name.|
 *--+--+---+--+
-|10|lens.cube.query.replace.timedim|true|Tells whether timedim attribute queried in the time range should be replaced with its corresponding partition column name.|
+|10|lens.driver.hive.calculate.priority|true|Whether priority should be calculated for hive mr jobs or not|
 *--+--+---+--+
-|11|lens.driver.hive.calculate.priority|true|Whether priority should be calculated for hive mr jobs or not|
+|11|lens.driver.hive.connection.class|org.apache.lens.driver.hive.EmbeddedThriftConnection|The connection class from HiveDriver to HiveServer. The default is an embedded connection which does not require a remote hive server. For connecting to a hiveserver end point, remote connection should be used. The possible values are org.apache.lens.driver.hive.EmbeddedThriftConnection and org.apache.lens.driver.hive.RemoteThriftConnection.|
 *--+--+---+--+
-|12|lens.driver.hive.connection.class|org.apache.lens.driver.hive.EmbeddedThriftConnection|The connection class from HiveDriver to HiveServer. The default is an embedded connection which does not require a remote hive server. For connecting to a hiveserver end point, remote connection should be used. The possible values are org.apache.lens.driver.hive.EmbeddedThriftConnection and org.apache.lens.driver.hive.RemoteThriftConnection.|
+|12|lens.driver.hive.hs2.connection.expiry.delay|600000|The idle time (in milliseconds) for expiring connection from hivedriver to HiveServer2|
 *--+--+---+--+
-|13|lens.driver.hive.hs2.connection.expiry.delay|600000|The idle time (in milliseconds) for expiring connection from hivedriver to HiveServer2|
+|13|lens.driver.hive.priority.partition.weight.daily|0.75|Weight of monthly partition in cost calculation|
 *--+--+---+--+
-|14|lens.driver.hive.priority.partition.weight.daily|0.75|Weight of monthly partition in cost calculation|
+|14|lens.driver.hive.priority.partition.weight.hourly|1.0|Weight of monthly partition in cost calculation|
 *--+--+---+--+
-|15|lens.driver.hive.priority.partition.weight.hourly|1.0|Weight of monthly partition in cost calculation|
+|15|lens.driver.hive.priority.partition.weight.monthly|0.5|Weight of monthly partition in cost calculation|
 *--+--+---+--+
-|16|lens.driver.hive.priority.partition.weight.monthly|0.5|Weight of monthly partition in cost calculation|
-*--+--+---+--+
-|17|lens.driver.hive.priority.ranges|VERY_HIGH,7.0,HIGH,30.0,NORMAL,90,LOW|Priority Ranges. The numbers are the costs of the query.                                                                                                                                                    \ |
+|16|lens.driver.hive.priority.ranges|VERY_HIGH,7.0,HIGH,30.0,NORMAL,90,LOW|Priority Ranges. The numbers are the costs of the query.                                                                                                                                                    \ |
 |  |                                |                                     |The cost is calculated based on partition weights and fact weights. The interpretation of the default config is:                                                                                            \ |
 |  |                                |                                     |                                                                                                                                                                                                            \ |
 |  |                                |                                     |cost \<= 7\ \ \ \ \ \ \ \ \ \ \ :\ \ \ \ \ Priority = VERY_HIGH                                                                                                                                             \ |

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/src/site/apt/admin/jdbcdriver-config.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/admin/jdbcdriver-config.apt b/src/site/apt/admin/jdbcdriver-config.apt
index bdc3d49..b3d25f6 100644
--- a/src/site/apt/admin/jdbcdriver-config.apt
+++ b/src/site/apt/admin/jdbcdriver-config.apt
@@ -26,56 +26,54 @@ Jdbc driver configuration
 *--+--+---+--+
 |1|lens.cube.query.driver.supported.storages| |List of comma separated storage names that supported by a driver. If no value is specified, all storages are valid|
 *--+--+---+--+
-|2|lens.cube.query.enable.multi.table.select|false|Tells whether multiple tables are allowed in from clause of final HQL query|
+|2|lens.cube.query.partition.where.clause.format|yyyy-MM-dd HH:mm:ss|The simple date format of how the queried partition should be put in where clause. If nothing is specified, it will use the format from org.apache.lens.cube.metadata.UpdatePeriod for each type of partition|
 *--+--+---+--+
-|3|lens.cube.query.partition.where.clause.format|yyyy-MM-dd HH:mm:ss|The simple date format of how the queried partition should be put in where clause. If nothing is specified, it will use the format from org.apache.lens.cube.metadata.UpdatePeriod for each type of partition|
+|3|lens.cube.query.replace.timedim|false|Tells whether timedim attribute queried in the time range should be replaced with its corresponding partition column name.|
 *--+--+---+--+
-|4|lens.cube.query.replace.timedim|false|Tells whether timedim attribute queried in the time range should be replaced with its corresponding partition column name.|
+|4|lens.cube.query.time.range.writer.class|org.apache.lens.cube.parse.BetweenTimeRangeWriter|The timerange writer class which specifies how the resolved partitions in timeranges should be written in final query. Available writers are org.apache.lens.cube.parse.ORTimeRangeWriter and org.apache.lens.cube.parse.BetweenTimeRangeWriter|
 *--+--+---+--+
-|5|lens.cube.query.time.range.writer.class|org.apache.lens.cube.parse.BetweenTimeRangeWriter|The timerange writer class which specifies how the resolved partitions in timeranges should be written in final query. Available writers are org.apache.lens.cube.parse.ORTimeRangeWriter and org.apache.lens.cube.parse.BetweenTimeRangeWriter|
+|5|lens.driver.jdbc.connection.provider| |A contract for obtaining JDBC connections|
 *--+--+---+--+
-|6|lens.driver.jdbc.connection.provider| |A contract for obtaining JDBC connections|
+|6|lens.driver.jdbc.db.password| |The database user's password|
 *--+--+---+--+
-|7|lens.driver.jdbc.db.password| |The database user's password|
+|7|lens.driver.jdbc.db.uri| |JDBC connection URL in the format jdbc:dbms://host:port/dbname|
 *--+--+---+--+
-|8|lens.driver.jdbc.db.uri| |JDBC connection URL in the format jdbc:dbms://host:port/dbname|
+|8|lens.driver.jdbc.db.user| |The database user on whose behalf the connection is being made|
 *--+--+---+--+
-|9|lens.driver.jdbc.db.user| |The database user on whose behalf the connection is being made|
+|9|lens.driver.jdbc.driver.class|com.mysql.jdbc.Driver|Type of JDBC driver used to connect backend database|
 *--+--+---+--+
-|10|lens.driver.jdbc.driver.class|com.mysql.jdbc.Driver|Type of JDBC driver used to connect backend database|
+|10|lens.driver.jdbc.enable.resultset.streaming.retrieval|false|Flag to enable row by row retrieval of result set from the database server. This is used to enable streaming result sets for MySQL. This is set to false by default.|
 *--+--+---+--+
-|11|lens.driver.jdbc.enable.resultset.streaming.retrieval|false|Flag to enable row by row retrieval of result set from the database server. This is used to enable streaming result sets for MySQL. This is set to false by default.|
+|11|lens.driver.jdbc.estimate.db.password| |The database user's password, for estimate queries. If this property is unspecified, value for lens.driver.jdbc.db.password would be used. Override this property to tune estimate connection pool|
 *--+--+---+--+
-|12|lens.driver.jdbc.estimate.db.password| |The database user's password, for estimate queries. If this property is unspecified, value for lens.driver.jdbc.db.password would be used. Override this property to tune estimate connection pool|
+|12|lens.driver.jdbc.estimate.db.uri| |JDBC connection URL in the format jdbc:dbms://host:port/dbname for estimate queries. If this property is unspecified, value for lens.driver.jdbc.db.uri will be used.|
 *--+--+---+--+
-|13|lens.driver.jdbc.estimate.db.uri| |JDBC connection URL in the format jdbc:dbms://host:port/dbname for estimate queries. If this property is unspecified, value for lens.driver.jdbc.db.uri will be used.|
+|13|lens.driver.jdbc.estimate.db.user| |The database user on whose behalf the connection is being made, for estimate queries. If this property is unspecified, value for lens.driver.jdbc.db.user would be used. Override this property to tune estimate connection pool|
 *--+--+---+--+
-|14|lens.driver.jdbc.estimate.db.user| |The database user on whose behalf the connection is being made, for estimate queries. If this property is unspecified, value for lens.driver.jdbc.db.user would be used. Override this property to tune estimate connection pool|
+|14|lens.driver.jdbc.estimate.driver.class| |Type of JDBC driver used to connect backend database for estimate queries. If This property is not specified, value for lens.driver.jdbc.driver.class will be used. Override this property to tune estimate connection pool|
 *--+--+---+--+
-|15|lens.driver.jdbc.estimate.driver.class| |Type of JDBC driver used to connect backend database for estimate queries. If This property is not specified, value for lens.driver.jdbc.driver.class will be used. Override this property to tune estimate connection pool|
+|15|lens.driver.jdbc.estimate.get.connection.timeout| |Response timeout in milliseconds of any JDBC call invoking data transmission over a connection socket , for estimate queries. If this property is not specified, value for lens.driver.jdbc.get.connection.timeout would be used. Override this property to tune estimate connection pool.|
 *--+--+---+--+
-|16|lens.driver.jdbc.estimate.get.connection.timeout| |Response timeout in milliseconds of any JDBC call invoking data transmission over a connection socket , for estimate queries. If this property is not specified, value for lens.driver.jdbc.get.connection.timeout would be used. Override this property to tune estimate connection pool.|
+|16|lens.driver.jdbc.estimate.pool.idle.time| |Maximum idle time in sec before a connection is closed, for estimate queries. If this property is not specified, value for lens.driver.jdbc.pool.idle.time would be used. Override this property to tune estimate connection pool.|
 *--+--+---+--+
-|17|lens.driver.jdbc.estimate.pool.idle.time| |Maximum idle time in sec before a connection is closed, for estimate queries. If this property is not specified, value for lens.driver.jdbc.pool.idle.time would be used. Override this property to tune estimate connection pool.|
+|17|lens.driver.jdbc.estimate.pool.max.size| |Maximum number of concurrent connections allowed in pool, for estimate queries. If this property is unspecified, value for lens.driver.jdbc.pool.max.size would be used. Override this property to tune estimate connection pool|
 *--+--+---+--+
-|18|lens.driver.jdbc.estimate.pool.max.size| |Maximum number of concurrent connections allowed in pool, for estimate queries. If this property is unspecified, value for lens.driver.jdbc.pool.max.size would be used. Override this property to tune estimate connection pool|
+|18|lens.driver.jdbc.estimate.pool.max.statements| |Maximum number of prepared statements to cache per connection, for estimate queries. If this property is not specified, value for lens.driver.jdbc.pool.max.statements would be used.|
 *--+--+---+--+
-|19|lens.driver.jdbc.estimate.pool.max.statements| |Maximum number of prepared statements to cache per connection, for estimate queries. If this property is not specified, value for lens.driver.jdbc.pool.max.statements would be used.|
+|19|lens.driver.jdbc.explain.keyword|Explain|Explain keyword used to get the query plan of underlying database|
 *--+--+---+--+
-|20|lens.driver.jdbc.explain.keyword|Explain|Explain keyword used to get the query plan of underlying database|
+|20|lens.driver.jdbc.fetch.size|1000|Fetch size for JDBC result set|
 *--+--+---+--+
-|21|lens.driver.jdbc.fetch.size|1000|Fetch size for JDBC result set|
+|21|lens.driver.jdbc.get.connection.timeout|10000|Response timeout in milliseconds of any JDBC call invoking data transmission over a connection socket|
 *--+--+---+--+
-|22|lens.driver.jdbc.get.connection.timeout|10000|Response timeout in milliseconds of any JDBC call invoking data transmission over a connection socket|
+|22|lens.driver.jdbc.pool.idle.time|600|Maximum idle time in sec before a connection is closed|
 *--+--+---+--+
-|23|lens.driver.jdbc.pool.idle.time|600|Maximum idle time in sec before a connection is closed|
+|23|lens.driver.jdbc.pool.max.size|15|Maximum number of concurrent connections allowed in pool|
 *--+--+---+--+
-|24|lens.driver.jdbc.pool.max.size|15|Maximum number of concurrent connections allowed in pool|
+|24|lens.driver.jdbc.pool.max.statements|20|Maximum number of prepared statements to cache per connection|
 *--+--+---+--+
-|25|lens.driver.jdbc.pool.max.statements|20|Maximum number of prepared statements to cache per connection|
+|25|lens.driver.jdbc.query.rewriter|org.apache.lens.driver.jdbc.ColumnarSQLRewriter|Rewriting the HQL to optimized sql queries|
 *--+--+---+--+
-|26|lens.driver.jdbc.query.rewriter|org.apache.lens.driver.jdbc.ColumnarSQLRewriter|Rewriting the HQL to optimized sql queries|
-*--+--+---+--+
-|27|lens.driver.jdbc.validate.through.prepare|true|Flag to enable query syntactic and semantic validation using prepared statement.|
+|26|lens.driver.jdbc.validate.through.prepare|true|Flag to enable query syntactic and semantic validation using prepared statement.|
 *--+--+---+--+
 The configuration parameters and their default values

http://git-wip-us.apache.org/repos/asf/incubator-lens/blob/ca30cf8d/src/site/apt/user/olap-query-conf.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/user/olap-query-conf.apt b/src/site/apt/user/olap-query-conf.apt
index a35c737..8204c34 100644
--- a/src/site/apt/user/olap-query-conf.apt
+++ b/src/site/apt/user/olap-query-conf.apt
@@ -32,38 +32,36 @@ OLAP query configuration
 *--+--+---+--+
 |4|lens.cube.query.enable.attrfields.add.distinct|true|When the query has only attribute fields projected from cube and the flag is set to true, distinct clause will be added for the projection so that no duplicate values will be projected. If flag is set to false, projection wont be changed, result might include duplicate values.|
 *--+--+---+--+
-|5|lens.cube.query.enable.multi.table.select|true|Tells whether multiple tables are allowed in from clause of final HQL query|
+|5|lens.cube.query.fail.if.data.partial|false|Whether to fail the query of data is partial|
 *--+--+---+--+
-|6|lens.cube.query.fail.if.data.partial|false|Whether to fail the query of data is partial|
+|6|lens.cube.query.join.type|INNER|Tells what the join type is, in-case of automatic resolution of joins is enabled|
 *--+--+---+--+
-|7|lens.cube.query.join.type|INNER|Tells what the join type is, in-case of automatic resolution of joins is enabled|
+|7|lens.cube.query.lookahead.ptparts.forinterval.${interval}|1|The value of number of lookahead process time partitions for interval specified. Interval can be any Update period.|
 *--+--+---+--+
-|8|lens.cube.query.lookahead.ptparts.forinterval.${interval}|1|The value of number of lookahead process time partitions for interval specified. Interval can be any Update period.|
+|8|lens.cube.query.max.interval| |Maximum value of the update period that the query timed dimensions can take values of. For example, if query involves month ranges, user can say query maximum interval is daily, then no monthly partitions will be picked.|
 *--+--+---+--+
-|9|lens.cube.query.max.interval| |Maximum value of the update period that the query timed dimensions can take values of. For example, if query involves month ranges, user can say query maximum interval is daily, then no monthly partitions will be picked.|
+|9|lens.cube.query.nonexisting.partitions| |The list of comma separated non existing partitions, if query can run with partial data. The value will be set by the cube query rewriter|
 *--+--+---+--+
-|10|lens.cube.query.nonexisting.partitions| |The list of comma separated non existing partitions, if query can run with partial data. The value will be set by the cube query rewriter|
+|10|lens.cube.query.partition.where.clause.format| |The simple date format of how the queried partition should be put in where clause. If nothing is specified, it will use the format from org.apache.lens.cube.metadata.UpdatePeriod for each type of partition|
 *--+--+---+--+
-|11|lens.cube.query.partition.where.clause.format| |The simple date format of how the queried partition should be put in where clause. If nothing is specified, it will use the format from org.apache.lens.cube.metadata.UpdatePeriod for each type of partition|
+|11|lens.cube.query.pick.lightest.fact.first|false|If set to true, lightest fact will be resolved first than resolving storages. Otherwise, storages will be resolved to check all partitions exist and then pick lightest fact among candidates|
 *--+--+---+--+
-|12|lens.cube.query.pick.lightest.fact.first|false|If set to true, lightest fact will be resolved first than resolving storages. Otherwise, storages will be resolved to check all partitions exist and then pick lightest fact among candidates|
+|12|lens.cube.query.process.time.partition.column| |The column name which is a process time column. If process time column is specified, query rewriter will look ahead the partitions of other timed dimensions inside this column.|
 *--+--+---+--+
-|13|lens.cube.query.process.time.partition.column| |The column name which is a process time column. If process time column is specified, query rewriter will look ahead the partitions of other timed dimensions inside this column.|
+|13|lens.cube.query.promote.groupby.toselect|false|Tells whether to promote group by clauses to be promoted to select expressions if they are already not projected. To enable automatic promotion, this value should be true.|
 *--+--+---+--+
-|14|lens.cube.query.promote.groupby.toselect|false|Tells whether to promote group by clauses to be promoted to select expressions if they are already not projected. To enable automatic promotion, this value should be true.|
+|14|lens.cube.query.promote.select.togroupby|false|Tells whether to promote select expressions which is not inside any aggregate, to be promoted to groupby clauses, if they are already not part of groupby clauses. To enable automatic promotion, this value should be true.|
 *--+--+---+--+
-|15|lens.cube.query.promote.select.togroupby|false|Tells whether to promote select expressions which is not inside any aggregate, to be promoted to groupby clauses, if they are already not part of groupby clauses. To enable automatic promotion, this value should be true.|
+|15|lens.cube.query.replace.timedim|true|Tells whether timedim attribute queried in the time range should be replaced with its corresponding partition column name.|
 *--+--+---+--+
-|16|lens.cube.query.replace.timedim|true|Tells whether timedim attribute queried in the time range should be replaced with its corresponding partition column name.|
+|16|lens.cube.query.time.range.writer.class|org.apache.lens.cube.parse.ORTimeRangeWriter|The timerange writer class which specifies how the resolved partitions in timeranges should be written in final query. Available writers are org.apache.lens.cube.parse.ORTimeRangeWriter and org.apache.lens.cube.parse.BetweenTimeRangeWriter|
 *--+--+---+--+
-|17|lens.cube.query.time.range.writer.class|org.apache.lens.cube.parse.ORTimeRangeWriter|The timerange writer class which specifies how the resolved partitions in timeranges should be written in final query. Available writers are org.apache.lens.cube.parse.ORTimeRangeWriter and org.apache.lens.cube.parse.BetweenTimeRangeWriter|
+|17|lens.cube.query.valid.${cubename}.facttables| |List of comma separated fact tables that are valid for cube. If no value is specified, all fact tables are valid|
 *--+--+---+--+
-|18|lens.cube.query.valid.${cubename}.facttables| |List of comma separated fact tables that are valid for cube. If no value is specified, all fact tables are valid|
+|18|lens.cube.query.valid.dim.storgaetables| |List of comma separated dimension storage tables that are valid. If no value is specified, all tables are valid|
 *--+--+---+--+
-|19|lens.cube.query.valid.dim.storgaetables| |List of comma separated dimension storage tables that are valid. If no value is specified, all tables are valid|
+|19|lens.cube.query.valid.fact.${facttable}.storage.${storagename}.updateperiods| |List of comma separated update periods that are valid for a fact on a storage. If no value is specified, all update periods are valid|
 *--+--+---+--+
-|20|lens.cube.query.valid.fact.${facttable}.storage.${storagename}.updateperiods| |List of comma separated update periods that are valid for a fact on a storage. If no value is specified, all update periods are valid|
-*--+--+---+--+
-|21|lens.cube.query.valid.fact.${facttable}.storagetables| |List of comma separated storage tables that are valid for a fact. If no value is specified, all storage tables are valid|
+|20|lens.cube.query.valid.fact.${facttable}.storagetables| |List of comma separated storage tables that are valid for a fact. If no value is specified, all storage tables are valid|
 *--+--+---+--+
 The configuration parameters and their default values