You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ma...@apache.org on 2016/09/10 11:29:36 UTC

[1/6] kylin git commit: remove unnecessary raw measure cond

Repository: kylin
Updated Branches:
  refs/heads/1.5.4-rc1 f15ef5e17 -> eefdc4974


remove unnecessary raw measure cond


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

Branch: refs/heads/1.5.4-rc1
Commit: 67b80aa01501b59f3f47a87209d3355ec5d217ce
Parents: 3acb5a0
Author: Hongbin Ma <ma...@apache.org>
Authored: Fri Sep 9 23:45:17 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Sat Sep 10 19:28:59 2016 +0800

----------------------------------------------------------------------
 .../localmeta/cube_desc/test_kylin_cube_without_slr_desc.json     | 3 ---
 .../cube_desc/test_kylin_cube_without_slr_left_join_desc.json     | 3 ---
 2 files changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/67b80aa0/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
index 7de2ae2..d185175 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
@@ -234,9 +234,6 @@
               "item_count_sum",
               "SITE_EXTENDED_1",
               "SITE_EXTENDED_2",
-              "CAL_DT_RAW",
-              "LSTG_FORMAT_NAME_RAW",
-              "LEAF_CATEG_ID_RAW",
               "PRICE_RAW"
             ]
           }

http://git-wip-us.apache.org/repos/asf/kylin/blob/67b80aa0/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
index 3b123c4..b34c7df 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
@@ -266,9 +266,6 @@
               "gmv_max",
               "trans_cnt",
               "item_count_sum",
-              "CAL_DT_RAW",
-              "LSTG_FORMAT_NAME_RAW",
-              "LEAF_CATEG_ID_RAW",
               "PRICE_RAW"
             ]
           }


[4/6] kylin git commit: KYLIN-1922 fix CI

Posted by ma...@apache.org.
KYLIN-1922 fix CI


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

Branch: refs/heads/1.5.4-rc1
Commit: f6d4eb2623647ae6cc7f9b7dc8e0d2060d1f46c5
Parents: cdebd56
Author: Hongbin Ma <ma...@apache.org>
Authored: Fri Sep 9 22:27:17 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Sat Sep 10 19:28:59 2016 +0800

----------------------------------------------------------------------
 .../apache/kylin/query/ITKylinQueryTest.java    | 53 ++++++++------------
 1 file changed, 21 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/f6d4eb26/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java b/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
index 0efea64..5f6af7a 100644
--- a/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
+++ b/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
@@ -32,6 +32,7 @@ import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.debug.BackdoorToggles;
 import org.apache.kylin.common.util.HBaseMetadataTestCase;
 import org.apache.kylin.gridtable.GTScanSelfTerminatedException;
+import org.apache.kylin.gridtable.StorageSideBehavior;
 import org.apache.kylin.metadata.project.ProjectInstance;
 import org.apache.kylin.metadata.realization.RealizationType;
 import org.apache.kylin.query.enumerator.OLAPQuery;
@@ -40,12 +41,9 @@ import org.apache.kylin.query.routing.Candidate;
 import org.apache.kylin.query.routing.rules.RemoveBlackoutRealizationsRule;
 import org.apache.kylin.query.schema.OLAPSchemaFactory;
 import org.apache.kylin.storage.hbase.HBaseStorage;
-import org.apache.kylin.gridtable.StorageSideBehavior;
 import org.apache.kylin.storage.hbase.cube.v1.coprocessor.observer.ObserverEnabler;
 import org.dbunit.database.DatabaseConnection;
 import org.dbunit.database.IDatabaseConnection;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
@@ -122,41 +120,32 @@ public class ITKylinQueryTest extends KylinTestBase {
     @Test
     public void testTimeoutQuery() throws Exception {
 
-        thrown.expect(SQLException.class);
-
-        //should not break at table duplicate check, should fail at model duplicate check
-        thrown.expectCause(new BaseMatcher<Throwable>() {
-            @Override
-            public boolean matches(Object item) {
-                if (item instanceof GTScanSelfTerminatedException) {
-                    return true;
-                }
-                return false;
-            }
-
-            @Override
-            public void describeTo(Description description) {
-            }
-        });
+        try {
 
-        Map<String, String> toggles = Maps.newHashMap();
-        toggles.put(BackdoorToggles.DEBUG_TOGGLE_COPROCESSOR_BEHAVIOR, StorageSideBehavior.SCAN_FILTER_AGGR_CHECKMEM_WITHDELAY.toString());//delay 10ms for every scan
-        BackdoorToggles.setToggles(toggles);
+            Map<String, String> toggles = Maps.newHashMap();
+            toggles.put(BackdoorToggles.DEBUG_TOGGLE_COPROCESSOR_BEHAVIOR, StorageSideBehavior.SCAN_FILTER_AGGR_CHECKMEM_WITHDELAY.toString());//delay 10ms for every scan
+            BackdoorToggles.setToggles(toggles);
 
-        KylinConfig.getInstanceFromEnv().setProperty("kylin.query.cube.visit.timeout.times", "0.03");//set timeout to 9s
+            KylinConfig.getInstanceFromEnv().setProperty("kylin.query.cube.visit.timeout.times", "0.03");//set timeout to 9s
 
-        //these two cubes has RAW measure, will disturb limit push down
-        RemoveBlackoutRealizationsRule.blackouts.add("CUBE[name=test_kylin_cube_without_slr_left_join_empty]");
-        RemoveBlackoutRealizationsRule.blackouts.add("CUBE[name=test_kylin_cube_without_slr_inner_join_empty]");
+            //these two cubes has RAW measure, will disturb limit push down
+            RemoveBlackoutRealizationsRule.blackouts.add("CUBE[name=test_kylin_cube_without_slr_left_join_empty]");
+            RemoveBlackoutRealizationsRule.blackouts.add("CUBE[name=test_kylin_cube_without_slr_inner_join_empty]");
 
-        execAndCompQuery(getQueryFolderPrefix() + "src/test/resources/query/sql_timeout", null, true);
+            execAndCompQuery(getQueryFolderPrefix() + "src/test/resources/query/sql_timeout", null, true);
+        } catch (SQLException e) {
+            if (!(e.getCause() instanceof GTScanSelfTerminatedException)) {
+                throw new RuntimeException();
+            }
+        } finally {
 
-        //these two cubes has RAW measure, will disturb limit push down
-        RemoveBlackoutRealizationsRule.blackouts.remove("CUBE[name=test_kylin_cube_without_slr_left_join_empty]");
-        RemoveBlackoutRealizationsRule.blackouts.remove("CUBE[name=test_kylin_cube_without_slr_inner_join_empty]");
+            //these two cubes has RAW measure, will disturb limit push down
+            RemoveBlackoutRealizationsRule.blackouts.remove("CUBE[name=test_kylin_cube_without_slr_left_join_empty]");
+            RemoveBlackoutRealizationsRule.blackouts.remove("CUBE[name=test_kylin_cube_without_slr_inner_join_empty]");
 
-        KylinConfig.getInstanceFromEnv().setProperty("kylin.query.cube.visit.timeout.times", "1");//set timeout to 9s 
-        BackdoorToggles.cleanToggles();
+            KylinConfig.getInstanceFromEnv().setProperty("kylin.query.cube.visit.timeout.times", "1");//set timeout to 9s 
+            BackdoorToggles.cleanToggles();
+        }
     }
 
     //don't try to ignore this test, try to clean your "temp" folder


[5/6] kylin git commit: Revert "remove unnecessary raw measure"

Posted by ma...@apache.org.
Revert "remove unnecessary raw measure"


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

Branch: refs/heads/1.5.4-rc1
Commit: a3fcefb94990262ffdd329080630e86fe90b53df
Parents: 67b80aa
Author: Hongbin Ma <ma...@apache.org>
Authored: Sat Sep 10 14:40:25 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Sat Sep 10 19:29:00 2016 +0800

----------------------------------------------------------------------
 .../kylin/measure/topn/TopNMeasureType.java     |   2 +
 .../test_case_data/localmeta/cube_desc/ssb.json | 409 ++++++-------
 .../test_kylin_cube_with_slr_desc.json          | 389 +++++-------
 ...st_kylin_cube_with_view_inner_join_desc.json | 388 +++++-------
 ...est_kylin_cube_with_view_left_join_desc.json | 388 +++++-------
 .../test_kylin_cube_without_slr_desc.json       |  61 +-
 ...t_kylin_cube_without_slr_left_join_desc.json | 584 +++++++++----------
 .../test_streaming_table_cube_desc.json         | 245 ++++----
 8 files changed, 1048 insertions(+), 1418 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/a3fcefb9/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java b/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
index 0756056..01eb90c 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
@@ -274,9 +274,11 @@ public class TopNMeasureType extends MeasureType<TopNCounter<ByteArray>> {
 
         if (sum.isSum() == false)
             return false;
+        
         if (sum.getParameter() == null || sum.getParameter().getColRefs() == null || sum.getParameter().getColRefs().size() == 0)
             return false;
 
+
         TblColRef sumCol = sum.getParameter().getColRefs().get(0);
         return sumCol.equals(topnNumCol);
     }

http://git-wip-us.apache.org/repos/asf/kylin/blob/a3fcefb9/examples/test_case_data/localmeta/cube_desc/ssb.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/ssb.json b/examples/test_case_data/localmeta/cube_desc/ssb.json
index 4903979..d3ea10b 100644
--- a/examples/test_case_data/localmeta/cube_desc/ssb.json
+++ b/examples/test_case_data/localmeta/cube_desc/ssb.json
@@ -1,256 +1,179 @@
 {
-  "uuid": "5c44df30-daec-486e-af90-927bf7851057",
-  "name": "ssb",
-  "description": "",
-  "dimensions": [
-    {
-      "name": "SSB.PART_DERIVED",
-      "table": "SSB.PART",
-      "column": null,
-      "derived": [
-        "P_MFGR",
-        "P_CATEGORY",
-        "P_BRAND"
-      ]
-    },
-    {
-      "name": "C_CITY",
-      "table": "SSB.CUSTOMER",
-      "column": "C_CITY",
-      "derived": null
-    },
-    {
-      "name": "C_REGION",
-      "table": "SSB.CUSTOMER",
-      "column": "C_REGION",
-      "derived": null
-    },
-    {
-      "name": "C_NATION",
-      "table": "SSB.CUSTOMER",
-      "column": "C_NATION",
-      "derived": null
-    },
-    {
-      "name": "S_CITY",
-      "table": "SSB.SUPPLIER",
-      "column": "S_CITY",
-      "derived": null
-    },
-    {
-      "name": "S_REGION",
-      "table": "SSB.SUPPLIER",
-      "column": "S_REGION",
-      "derived": null
-    },
-    {
-      "name": "S_NATION",
-      "table": "SSB.SUPPLIER",
-      "column": "S_NATION",
-      "derived": null
-    },
-    {
-      "name": "D_YEAR",
-      "table": "SSB.DATES",
-      "column": "D_YEAR",
-      "derived": null
-    },
-    {
-      "name": "D_YEARMONTH",
-      "table": "SSB.DATES",
-      "column": "D_YEARMONTH",
-      "derived": null
-    },
-    {
-      "name": "D_YEARMONTHNUM",
-      "table": "SSB.DATES",
-      "column": "D_YEARMONTHNUM",
-      "derived": null
-    },
-    {
-      "name": "D_WEEKNUMINYEAR",
-      "table": "SSB.DATES",
-      "column": "D_WEEKNUMINYEAR",
-      "derived": null
-    }
-  ],
-  "measures": [
-    {
-      "name": "_COUNT_",
-      "function": {
-        "expression": "COUNT",
-        "parameter": {
-          "type": "constant",
-          "value": "1",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
+  "uuid" : "5c44df30-daec-486e-af90-927bf7851057",
+  "name" : "ssb",
+  "description" : "",
+  "dimensions" : [ {
+    "name" : "SSB.PART_DERIVED",
+    "table" : "SSB.PART",
+    "column" : null,
+    "derived" : [ "P_MFGR", "P_CATEGORY", "P_BRAND" ]
+  }, {
+    "name" : "C_CITY",
+    "table" : "SSB.CUSTOMER",
+    "column" : "C_CITY",
+    "derived" : null
+  }, {
+    "name" : "C_REGION",
+    "table" : "SSB.CUSTOMER",
+    "column" : "C_REGION",
+    "derived" : null
+  }, {
+    "name" : "C_NATION",
+    "table" : "SSB.CUSTOMER",
+    "column" : "C_NATION",
+    "derived" : null
+  }, {
+    "name" : "S_CITY",
+    "table" : "SSB.SUPPLIER",
+    "column" : "S_CITY",
+    "derived" : null
+  }, {
+    "name" : "S_REGION",
+    "table" : "SSB.SUPPLIER",
+    "column" : "S_REGION",
+    "derived" : null
+  }, {
+    "name" : "S_NATION",
+    "table" : "SSB.SUPPLIER",
+    "column" : "S_NATION",
+    "derived" : null
+  }, {
+    "name" : "D_YEAR",
+    "table" : "SSB.DATES",
+    "column" : "D_YEAR",
+    "derived" : null
+  }, {
+    "name" : "D_YEARMONTH",
+    "table" : "SSB.DATES",
+    "column" : "D_YEARMONTH",
+    "derived" : null
+  }, {
+    "name" : "D_YEARMONTHNUM",
+    "table" : "SSB.DATES",
+    "column" : "D_YEARMONTHNUM",
+    "derived" : null
+  }, {
+    "name" : "D_WEEKNUMINYEAR",
+    "table" : "SSB.DATES",
+    "column" : "D_WEEKNUMINYEAR",
+    "derived" : null
+  } ],
+  "measures" : [ {
+    "name" : "_COUNT_",
+    "function" : {
+      "expression" : "COUNT",
+      "parameter" : {
+        "type" : "constant",
+        "value" : "1",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "bigint"
     },
-    {
-      "name": "TOTAL_REVENUE",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "LO_REVENUE",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "TOTAL_REVENUE",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "LO_REVENUE",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "bigint"
     },
-    {
-      "name": "TOTAL_SUPPLYCOST",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "LO_SUPPLYCOST",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "TOTAL_SUPPLYCOST",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "LO_SUPPLYCOST",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "bigint"
     },
-    {
-      "name": "TOTAL_V_REVENUE",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "V_REVENUE",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "TOTAL_V_REVENUE",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "V_REVENUE",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
-    }
-  ],
-  "rowkey": {
-    "rowkey_columns": [
-      {
-        "column": "LO_PARTKEY",
-        "encoding": "dict"
-      },
-      {
-        "column": "C_CITY",
-        "encoding": "dict"
-      },
-      {
-        "column": "C_REGION",
-        "encoding": "dict"
-      },
-      {
-        "column": "C_NATION",
-        "encoding": "dict"
-      },
-      {
-        "column": "S_CITY",
-        "encoding": "dict"
-      },
-      {
-        "column": "S_REGION",
-        "encoding": "dict"
-      },
-      {
-        "column": "S_NATION",
-        "encoding": "dict"
-      },
-      {
-        "column": "D_YEAR",
-        "encoding": "dict"
-      },
-      {
-        "column": "D_YEARMONTH",
-        "encoding": "dict"
-      },
-      {
-        "column": "D_YEARMONTHNUM",
-        "encoding": "dict"
-      },
-      {
-        "column": "D_WEEKNUMINYEAR",
-        "encoding": "dict"
-      }
-    ]
+      "returntype" : "bigint"
+    },
+    "dependent_measure_ref" : null
+  } ],
+  "rowkey" : {
+    "rowkey_columns" : [ {
+      "column" : "LO_PARTKEY",
+      "encoding" : "dict"
+    }, {
+      "column" : "C_CITY",
+      "encoding" : "dict"
+    }, {
+      "column" : "C_REGION",
+      "encoding" : "dict"
+    }, {
+      "column" : "C_NATION",
+      "encoding" : "dict"
+    }, {
+      "column" : "S_CITY",
+      "encoding" : "dict"
+    }, {
+      "column" : "S_REGION",
+      "encoding" : "dict"
+    }, {
+      "column" : "S_NATION",
+      "encoding" : "dict"
+    }, {
+      "column" : "D_YEAR",
+      "encoding" : "dict"
+    }, {
+      "column" : "D_YEARMONTH",
+      "encoding" : "dict"
+    }, {
+      "column" : "D_YEARMONTHNUM",
+      "encoding" : "dict"
+    }, {
+      "column" : "D_WEEKNUMINYEAR",
+      "encoding" : "dict"
+    } ]
   },
-  "signature": "5iV8LVYs+PmVUju8QNQ5TQ==",
-  "last_modified": 1457503036686,
-  "model_name": "ssb",
-  "null_string": null,
-  "hbase_mapping": {
-    "column_family": [
-      {
-        "name": "F1",
-        "columns": [
-          {
-            "qualifier": "M",
-            "measure_refs": [
-              "_COUNT_",
-              "TOTAL_REVENUE",
-              "TOTAL_SUPPLYCOST",
-              "TOTAL_V_REVENUE"
-            ]
-          }
-        ]
-      }
-    ]
+  "signature" : "5iV8LVYs+PmVUju8QNQ5TQ==",
+  "last_modified" : 1457503036686,
+  "model_name" : "ssb",
+  "null_string" : null,
+  "hbase_mapping" : {
+    "column_family" : [ {
+      "name" : "F1",
+      "columns" : [ {
+        "qualifier" : "M",
+        "measure_refs" : [ "_COUNT_", "TOTAL_REVENUE", "TOTAL_SUPPLYCOST", "TOTAL_V_REVENUE" ]
+      } ]
+    } ]
   },
-  "aggregation_groups": [
-    {
-      "includes": [
-        "LO_PARTKEY",
-        "C_CITY",
-        "C_REGION",
-        "C_NATION",
-        "S_CITY",
-        "S_REGION",
-        "S_NATION",
-        "D_YEAR",
-        "D_YEARMONTH",
-        "D_YEARMONTHNUM",
-        "D_WEEKNUMINYEAR"
-      ],
-      "select_rule": {
-        "hierarchy_dims": [
-          [
-            "C_REGION",
-            "C_NATION",
-            "C_CITY"
-          ],
-          [
-            "S_REGION",
-            "S_NATION",
-            "S_CITY"
-          ],
-          [
-            "D_YEARMONTH",
-            "D_YEARMONTHNUM",
-            "D_WEEKNUMINYEAR"
-          ]
-        ],
-        "mandatory_dims": [
-          "D_YEAR"
-        ],
-        "joint_dims": []
-      }
+  "aggregation_groups" : [ {
+    "includes" : [ "LO_PARTKEY", "C_CITY", "C_REGION", "C_NATION", "S_CITY", "S_REGION", "S_NATION", "D_YEAR", "D_YEARMONTH", "D_YEARMONTHNUM", "D_WEEKNUMINYEAR" ],
+    "select_rule" : {
+      "hierarchy_dims" : [ [ "C_REGION", "C_NATION", "C_CITY" ], [ "S_REGION", "S_NATION", "S_CITY" ], [ "D_YEARMONTH", "D_YEARMONTHNUM", "D_WEEKNUMINYEAR" ] ],
+      "mandatory_dims" : [ "D_YEAR" ],
+      "joint_dims" : [ ]
     }
-  ],
-  "notify_list": [],
-  "status_need_notify": [],
-  "partition_date_start": 694224000000,
-  "partition_date_end": 3153600000000,
-  "auto_merge_time_ranges": [
-    604800000,
-    2419200000
-  ],
-  "retention_range": 0,
-  "engine_type": 2,
-  "storage_type": 2,
-  "override_kylin_properties": {
-    "kylin.hbase.default.compression.codec": "lz4",
-    "kylin.cube.aggrgroup.isMandatoryOnlyValid": "true"
+  } ],
+  "notify_list" : [ ],
+  "status_need_notify" : [ ],
+  "partition_date_start" : 694224000000,
+  "partition_date_end" : 3153600000000,
+  "auto_merge_time_ranges" : [ 604800000, 2419200000 ],
+  "retention_range" : 0,
+  "engine_type" : 2,
+  "storage_type" : 2,
+  "override_kylin_properties" : {
+    "kylin.hbase.default.compression.codec" : "lz4",
+    "kylin.cube.aggrgroup.isMandatoryOnlyValid" : "true"
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/a3fcefb9/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json
index f62d196..4064fcb 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json
@@ -1,245 +1,172 @@
 {
-  "uuid": "a24ca905-1fc6-4f67-985c-38fa5aeafd92",
-  "name": "test_kylin_cube_with_slr_desc",
-  "description": null,
-  "dimensions": [
-    {
-      "name": "CAL_DT",
-      "table": "EDW.TEST_CAL_DT",
-      "column": "{FK}",
-      "derived": [
-        "WEEK_BEG_DT"
-      ]
-    },
-    {
-      "name": "CATEGORY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "{FK}",
-      "derived": [
-        "USER_DEFINED_FIELD1",
-        "USER_DEFINED_FIELD3",
-        "UPD_DATE",
-        "UPD_USER"
-      ]
-    },
-    {
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "META_CATEG_NAME",
-      "derived": null
-    },
-    {
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "CATEG_LVL2_NAME",
-      "derived": null
-    },
-    {
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "CATEG_LVL3_NAME",
-      "derived": null
-    },
-    {
-      "name": "LSTG_FORMAT_NAME",
-      "table": "DEFAULT.TEST_KYLIN_FACT",
-      "column": "LSTG_FORMAT_NAME",
-      "derived": null
-    },
-    {
-      "name": "SITE_ID",
-      "table": "EDW.TEST_SITES",
-      "column": "{FK}",
-      "derived": [
-        "SITE_NAME",
-        "CRE_USER"
-      ]
-    },
-    {
-      "name": "SELLER_TYPE_CD",
-      "table": "EDW.TEST_SELLER_TYPE_DIM",
-      "column": "{FK}",
-      "derived": [
-        "SELLER_TYPE_DESC"
-      ]
-    },
-    {
-      "name": "SELLER_ID",
-      "table": "DEFAULT.TEST_KYLIN_FACT",
-      "column": "SELLER_ID",
-      "derived": null
-    }
-  ],
-  "measures": [
-    {
-      "name": "GMV_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,4)"
+  "uuid" : "a24ca905-1fc6-4f67-985c-38fa5aeafd92",
+ 
+  "name" : "test_kylin_cube_with_slr_desc",
+  "description" : null,
+  "dimensions" : [ {
+    "name" : "CAL_DT",
+    "table" : "EDW.TEST_CAL_DT",
+    "column" : "{FK}",
+    "derived" : [ "WEEK_BEG_DT" ]
+  }, {
+    "name" : "CATEGORY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "{FK}",
+    "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ]
+  }, {
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "META_CATEG_NAME",
+    "derived" : null
+  }, {
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "CATEG_LVL2_NAME",
+    "derived" : null
+  }, {
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "CATEG_LVL3_NAME",
+    "derived" : null
+  }, {
+    "name" : "LSTG_FORMAT_NAME",
+    "table" : "DEFAULT.TEST_KYLIN_FACT",
+    "column" : "LSTG_FORMAT_NAME",
+    "derived" : null
+  }, {
+    "name" : "SITE_ID",
+    "table" : "EDW.TEST_SITES",
+    "column" : "{FK}",
+    "derived" : [ "SITE_NAME", "CRE_USER" ]
+  }, {
+    "name" : "SELLER_TYPE_CD",
+    "table" : "EDW.TEST_SELLER_TYPE_DIM",
+    "column" : "{FK}",
+    "derived" : [ "SELLER_TYPE_DESC" ]
+  }, {
+    "name" : "SELLER_ID",
+    "table" : "DEFAULT.TEST_KYLIN_FACT",
+    "column" : "SELLER_ID",
+    "derived" : null
+  } ],
+  "measures" : [ {
+    "name" : "GMV_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "name": "GMV_MIN",
-      "function": {
-        "expression": "MIN",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "GMV_MIN",
+    "function" : {
+      "expression" : "MIN",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "name": "GMV_MAX",
-      "function": {
-        "expression": "MAX",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "GMV_MAX",
+    "function" : {
+      "expression" : "MAX",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "name": "TRANS_CNT",
-      "function": {
-        "expression": "COUNT",
-        "parameter": {
-          "type": "constant",
-          "value": "1",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "TRANS_CNT",
+    "function" : {
+      "expression" : "COUNT",
+      "parameter" : {
+        "type" : "constant",
+        "value" : "1",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "bigint"
     },
-    {
-      "name": "ITEM_COUNT_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "ITEM_COUNT",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "ITEM_COUNT_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "ITEM_COUNT",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
-    }
-  ],
-  "rowkey": {
-    "rowkey_columns": [
-      {
-        "column": "seller_id",
-        "encoding": "int:4",
-        "isShardBy": true
-      },
-      {
-        "column": "cal_dt",
-        "encoding": "dict"
-      },
-      {
-        "column": "leaf_categ_id",
-        "encoding": "fixed_length:18"
-      },
-      {
-        "column": "meta_categ_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "categ_lvl2_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "categ_lvl3_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "lstg_format_name",
-        "encoding": "fixed_length:12"
-      },
-      {
-        "column": "lstg_site_id",
-        "encoding": "dict"
-      },
-      {
-        "column": "slr_segment_cd",
-        "encoding": "dict"
-      }
-    ]
+      "returntype" : "bigint"
+    },
+    "dependent_measure_ref" : null
+  } ],
+  "rowkey" : {
+    "rowkey_columns" : [ {
+      "column" : "seller_id",
+      "encoding" : "int:4",
+      "isShardBy" : true
+    }, {
+      "column" : "cal_dt",
+      "encoding" : "dict"
+    }, {
+      "column" : "leaf_categ_id",
+      "encoding" : "fixed_length:18"
+    }, {
+      "column" : "meta_categ_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "categ_lvl2_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "categ_lvl3_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "lstg_format_name",
+      "encoding" : "fixed_length:12"
+    }, {
+      "column" : "lstg_site_id",
+      "encoding" : "dict"
+    }, {
+      "column" : "slr_segment_cd",
+      "encoding" : "dict"
+    } ]
   },
-  "signature": null,
-  "last_modified": 1448959801271,
-  "model_name": "test_kylin_inner_join_model_desc",
-  "null_string": null,
-  "hbase_mapping": {
-    "column_family": [
-      {
-        "name": "f1",
-        "columns": [
-          {
-            "qualifier": "m",
-            "measure_refs": [
-              "gmv_sum",
-              "gmv_min",
-              "gmv_max",
-              "trans_cnt",
-              "item_count_sum"
-            ]
-          }
-        ]
-      }
-    ]
+  "signature" : null,
+  "last_modified" : 1448959801271,
+  "model_name" : "test_kylin_inner_join_model_desc",
+  "null_string" : null,
+  "hbase_mapping" : {
+    "column_family" : [ {
+      "name" : "f1",
+      "columns" : [ {
+        "qualifier" : "m",
+        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "item_count_sum" ]
+      } ]
+    } ]
   },
-  "aggregation_groups": [
-    {
-      "includes": [
-        "cal_dt",
-        "categ_lvl2_name",
-        "categ_lvl3_name",
-        "leaf_categ_id",
-        "lstg_format_name",
-        "lstg_site_id",
-        "meta_categ_name",
-        "seller_id",
-        "slr_segment_cd"
-      ],
-      "select_rule": {
-        "hierarchy_dims": [
-          [
-            "META_CATEG_NAME",
-            "CATEG_LVL2_NAME",
-            "CATEG_LVL3_NAME"
-          ]
-        ],
-        "mandatory_dims": [
-          "seller_id"
-        ],
-        "joint_dims": [
-          [
-            "lstg_format_name",
-            "lstg_site_id",
-            "slr_segment_cd"
-          ]
-        ]
-      }
+  "aggregation_groups" : [ {
+    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "lstg_format_name", "lstg_site_id", "meta_categ_name", "seller_id", "slr_segment_cd" ],
+    "select_rule" : {
+      "hierarchy_dims" : [ [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] ],
+      "mandatory_dims" : ["seller_id"],
+      "joint_dims" : [ [ "lstg_format_name", "lstg_site_id", "slr_segment_cd" ] ]
     }
-  ],
-  "notify_list": null,
-  "status_need_notify": [],
-  "auto_merge_time_ranges": null,
-  "retention_range": 0,
-  "engine_type": 2,
-  "storage_type": 2,
-  "partition_date_start": 0
+  } ],
+  "notify_list" : null,
+  "status_need_notify" : [ ],
+  "auto_merge_time_ranges" : null,
+  "retention_range" : 0,
+  "engine_type" : 2,
+  "storage_type" : 2,
+  "partition_date_start" : 0
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/a3fcefb9/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json
index e3a3e70..d4c64b5 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json
@@ -1,249 +1,169 @@
 {
-  "uuid": "9876b7a8-3929-4dff-b59d-2100aadc8dbf",
-  "name": "test_kylin_cube_with_view_inner_join_desc",
-  "description": null,
-  "dimensions": [
-    {
-      "name": "CAL_DT",
-      "table": "EDW.V_TEST_CAL_DT",
-      "column": "{FK}",
-      "derived": [
-        "WEEK_BEG_DT"
-      ]
-    },
-    {
-      "name": "CATEGORY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "{FK}",
-      "derived": [
-        "USER_DEFINED_FIELD1",
-        "USER_DEFINED_FIELD3",
-        "UPD_DATE",
-        "UPD_USER"
-      ]
-    },
-    {
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "META_CATEG_NAME",
-      "derived": null
-    },
-    {
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "CATEG_LVL2_NAME",
-      "derived": null
-    },
-    {
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "CATEG_LVL3_NAME",
-      "derived": null
-    },
-    {
-      "name": "LSTG_FORMAT_NAME",
-      "table": "DEFAULT.TEST_KYLIN_FACT",
-      "column": "LSTG_FORMAT_NAME",
-      "derived": null
-    },
-    {
-      "name": "SITE_ID",
-      "table": "EDW.TEST_SITES",
-      "column": "{FK}",
-      "derived": [
-        "SITE_NAME",
-        "CRE_USER"
-      ]
-    },
-    {
-      "name": "SELLER_TYPE_CD",
-      "table": "EDW.TEST_SELLER_TYPE_DIM",
-      "column": "{FK}",
-      "derived": [
-        "SELLER_TYPE_DESC"
-      ]
-    }
-  ],
-  "measures": [
-    {
-      "name": "GMV_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,4)"
+  "uuid" : "9876b7a8-3929-4dff-b59d-2100aadc8dbf",
+  "name" : "test_kylin_cube_with_view_inner_join_desc",
+  "description" : null,
+  "dimensions" : [ {
+    "name" : "CAL_DT",
+    "table" : "EDW.V_TEST_CAL_DT",
+    "column" : "{FK}",
+    "derived" : [ "WEEK_BEG_DT" ]
+  }, {
+    "name" : "CATEGORY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "{FK}",
+    "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ]
+  }, {
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "META_CATEG_NAME",
+    "derived" : null
+  }, {
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "CATEG_LVL2_NAME",
+    "derived" : null
+  }, {
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "CATEG_LVL3_NAME",
+    "derived" : null
+  }, {
+    "name" : "LSTG_FORMAT_NAME",
+    "table" : "DEFAULT.TEST_KYLIN_FACT",
+    "column" : "LSTG_FORMAT_NAME",
+    "derived" : null
+  }, {
+    "name" : "SITE_ID",
+    "table" : "EDW.TEST_SITES",
+    "column" : "{FK}",
+    "derived" : [ "SITE_NAME", "CRE_USER" ]
+  }, {
+    "name" : "SELLER_TYPE_CD",
+    "table" : "EDW.TEST_SELLER_TYPE_DIM",
+    "column" : "{FK}",
+    "derived" : [ "SELLER_TYPE_DESC" ]
+  } ],
+  "measures" : [ {
+    "name" : "GMV_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "name": "GMV_MIN",
-      "function": {
-        "expression": "MIN",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "GMV_MIN",
+    "function" : {
+      "expression" : "MIN",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "name": "GMV_MAX",
-      "function": {
-        "expression": "MAX",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "GMV_MAX",
+    "function" : {
+      "expression" : "MAX",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "name": "TRANS_CNT",
-      "function": {
-        "expression": "COUNT",
-        "parameter": {
-          "type": "constant",
-          "value": "1",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "TRANS_CNT",
+    "function" : {
+      "expression" : "COUNT",
+      "parameter" : {
+        "type" : "constant",
+        "value" : "1",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "bigint"
     },
-    {
-      "name": "ITEM_COUNT_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "ITEM_COUNT",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
-      },
-      "dependent_measure_ref": null
-    }
-  ],
-  "rowkey": {
-    "rowkey_columns": [
-      {
-        "column": "cal_dt",
-        "encoding": "dict"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "ITEM_COUNT_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "ITEM_COUNT",
+        "next_parameter" : null
       },
-      {
-        "column": "leaf_categ_id",
-        "encoding": "dict"
-      },
-      {
-        "column": "meta_categ_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "categ_lvl2_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "categ_lvl3_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "lstg_format_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "lstg_site_id",
-        "encoding": "dict"
-      },
-      {
-        "column": "slr_segment_cd",
-        "encoding": "dict"
-      }
-    ]
+      "returntype" : "bigint"
+    },
+    "dependent_measure_ref" : null
+  }],
+  "rowkey" : {
+    "rowkey_columns" : [ {
+      "column" : "cal_dt",
+      "encoding" : "dict"
+    }, {
+      "column" : "leaf_categ_id",
+      "encoding" : "dict"
+    }, {
+      "column" : "meta_categ_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "categ_lvl2_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "categ_lvl3_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "lstg_format_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "lstg_site_id",
+      "encoding" : "dict"
+    }, {
+      "column" : "slr_segment_cd",
+      "encoding" : "dict"
+    } ]
   },
-  "signature": null,
-  "last_modified": 1448959801311,
-  "model_name": "test_kylin_inner_join_view_model_desc",
-  "null_string": null,
-  "hbase_mapping": {
-    "column_family": [
-      {
-        "name": "f1",
-        "columns": [
-          {
-            "qualifier": "m",
-            "measure_refs": [
-              "gmv_sum",
-              "gmv_min",
-              "gmv_max",
-              "trans_cnt",
-              "item_count_sum"
-            ]
-          }
-        ]
-      }
-    ]
+  "signature" : null,
+  "last_modified" : 1448959801311,
+  "model_name" : "test_kylin_inner_join_view_model_desc",
+  "null_string" : null,
+  "hbase_mapping" : {
+    "column_family" : [ {
+      "name" : "f1",
+      "columns" : [ {
+        "qualifier" : "m",
+        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "item_count_sum" ]
+      } ]
+    }]
   },
-  "aggregation_groups": [
-    {
-      "includes": [
-        "cal_dt",
-        "categ_lvl2_name",
-        "categ_lvl3_name",
-        "leaf_categ_id",
-        "lstg_format_name",
-        "lstg_site_id",
-        "meta_categ_name"
-      ],
-      "select_rule": {
-        "hierarchy_dims": [],
-        "mandatory_dims": [
-          "cal_dt"
-        ],
-        "joint_dims": [
-          [
-            "categ_lvl2_name",
-            "categ_lvl3_name",
-            "leaf_categ_id",
-            "meta_categ_name"
-          ]
-        ]
-      }
-    },
-    {
-      "includes": [
-        "cal_dt",
-        "categ_lvl2_name",
-        "categ_lvl3_name",
-        "leaf_categ_id",
-        "meta_categ_name"
-      ],
-      "select_rule": {
-        "hierarchy_dims": [
-          [
-            "META_CATEG_NAME",
-            "CATEG_LVL2_NAME",
-            "CATEG_LVL3_NAME"
-          ]
-        ],
-        "mandatory_dims": [
-          "cal_dt"
-        ],
-        "joint_dims": []
-      }
+  "aggregation_groups" : [ {
+    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "lstg_format_name", "lstg_site_id", "meta_categ_name"],
+    "select_rule" : {
+      "hierarchy_dims" : [ ],
+      "mandatory_dims" : [ "cal_dt" ],
+      "joint_dims" : [ [ "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ] ]
+    }
+  }, {
+    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ],
+    "select_rule" : {
+      "hierarchy_dims" : [ [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] ],
+      "mandatory_dims" : [ "cal_dt" ],
+      "joint_dims" : [ ]
     }
-  ],
-  "notify_list": null,
-  "status_need_notify": [],
-  "auto_merge_time_ranges": null,
-  "retention_range": 0,
-  "engine_type": 2,
-  "storage_type": 2,
+  } ],
+  "notify_list" : null,
+  "status_need_notify" : [ ],
+  "auto_merge_time_ranges" : null,
+  "retention_range" : 0,
+  "engine_type" : 2,
+  "storage_type" : 2,
   "partition_date_start": 0
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/a3fcefb9/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json
index b17fbff..0388c0e 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json
@@ -1,249 +1,169 @@
 {
-  "uuid": "6789b7a8-3929-4dff-b59d-2100aadc8dbf",
-  "name": "test_kylin_cube_with_view_left_join_desc",
-  "description": null,
-  "dimensions": [
-    {
-      "name": "CAL_DT",
-      "table": "EDW.V_TEST_CAL_DT",
-      "column": "{FK}",
-      "derived": [
-        "WEEK_BEG_DT"
-      ]
-    },
-    {
-      "name": "CATEGORY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "{FK}",
-      "derived": [
-        "USER_DEFINED_FIELD1",
-        "USER_DEFINED_FIELD3",
-        "UPD_DATE",
-        "UPD_USER"
-      ]
-    },
-    {
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "META_CATEG_NAME",
-      "derived": null
-    },
-    {
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "CATEG_LVL2_NAME",
-      "derived": null
-    },
-    {
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "CATEG_LVL3_NAME",
-      "derived": null
-    },
-    {
-      "name": "LSTG_FORMAT_NAME",
-      "table": "DEFAULT.TEST_KYLIN_FACT",
-      "column": "LSTG_FORMAT_NAME",
-      "derived": null
-    },
-    {
-      "name": "SITE_ID",
-      "table": "EDW.TEST_SITES",
-      "column": "{FK}",
-      "derived": [
-        "SITE_NAME",
-        "CRE_USER"
-      ]
-    },
-    {
-      "name": "SELLER_TYPE_CD",
-      "table": "EDW.TEST_SELLER_TYPE_DIM",
-      "column": "{FK}",
-      "derived": [
-        "SELLER_TYPE_DESC"
-      ]
-    }
-  ],
-  "measures": [
-    {
-      "name": "GMV_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,4)"
+  "uuid" : "6789b7a8-3929-4dff-b59d-2100aadc8dbf",
+  "name" : "test_kylin_cube_with_view_left_join_desc",
+  "description" : null,
+  "dimensions" : [ {
+    "name" : "CAL_DT",
+    "table" : "EDW.V_TEST_CAL_DT",
+    "column" : "{FK}",
+    "derived" : [ "WEEK_BEG_DT" ]
+  }, {
+    "name" : "CATEGORY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "{FK}",
+    "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ]
+  }, {
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "META_CATEG_NAME",
+    "derived" : null
+  }, {
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "CATEG_LVL2_NAME",
+    "derived" : null
+  }, {
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "CATEG_LVL3_NAME",
+    "derived" : null
+  }, {
+    "name" : "LSTG_FORMAT_NAME",
+    "table" : "DEFAULT.TEST_KYLIN_FACT",
+    "column" : "LSTG_FORMAT_NAME",
+    "derived" : null
+  }, {
+    "name" : "SITE_ID",
+    "table" : "EDW.TEST_SITES",
+    "column" : "{FK}",
+    "derived" : [ "SITE_NAME", "CRE_USER" ]
+  }, {
+    "name" : "SELLER_TYPE_CD",
+    "table" : "EDW.TEST_SELLER_TYPE_DIM",
+    "column" : "{FK}",
+    "derived" : [ "SELLER_TYPE_DESC" ]
+  } ],
+  "measures" : [ {
+    "name" : "GMV_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "name": "GMV_MIN",
-      "function": {
-        "expression": "MIN",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "GMV_MIN",
+    "function" : {
+      "expression" : "MIN",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "name": "GMV_MAX",
-      "function": {
-        "expression": "MAX",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "GMV_MAX",
+    "function" : {
+      "expression" : "MAX",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "name": "TRANS_CNT",
-      "function": {
-        "expression": "COUNT",
-        "parameter": {
-          "type": "constant",
-          "value": "1",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "TRANS_CNT",
+    "function" : {
+      "expression" : "COUNT",
+      "parameter" : {
+        "type" : "constant",
+        "value" : "1",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "bigint"
     },
-    {
-      "name": "ITEM_COUNT_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "ITEM_COUNT",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
-      },
-      "dependent_measure_ref": null
-    }
-  ],
-  "rowkey": {
-    "rowkey_columns": [
-      {
-        "column": "cal_dt",
-        "encoding": "dict"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "ITEM_COUNT_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "ITEM_COUNT",
+        "next_parameter" : null
       },
-      {
-        "column": "leaf_categ_id",
-        "encoding": "dict"
-      },
-      {
-        "column": "meta_categ_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "categ_lvl2_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "categ_lvl3_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "lstg_format_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "lstg_site_id",
-        "encoding": "dict"
-      },
-      {
-        "column": "slr_segment_cd",
-        "encoding": "dict"
-      }
-    ]
+      "returntype" : "bigint"
+    },
+    "dependent_measure_ref" : null
+  }],
+  "rowkey" : {
+    "rowkey_columns" : [ {
+      "column" : "cal_dt",
+      "encoding" : "dict"
+    }, {
+      "column" : "leaf_categ_id",
+      "encoding" : "dict"
+    }, {
+      "column" : "meta_categ_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "categ_lvl2_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "categ_lvl3_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "lstg_format_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "lstg_site_id",
+      "encoding" : "dict"
+    }, {
+      "column" : "slr_segment_cd",
+      "encoding" : "dict"
+    } ]
   },
-  "signature": null,
-  "last_modified": 1448959801311,
-  "model_name": "test_kylin_left_join_view_model_desc",
-  "null_string": null,
-  "hbase_mapping": {
-    "column_family": [
-      {
-        "name": "f1",
-        "columns": [
-          {
-            "qualifier": "m",
-            "measure_refs": [
-              "gmv_sum",
-              "gmv_min",
-              "gmv_max",
-              "trans_cnt",
-              "item_count_sum"
-            ]
-          }
-        ]
-      }
-    ]
+  "signature" : null,
+  "last_modified" : 1448959801311,
+  "model_name" : "test_kylin_left_join_view_model_desc",
+  "null_string" : null,
+  "hbase_mapping" : {
+    "column_family" : [ {
+      "name" : "f1",
+      "columns" : [ {
+        "qualifier" : "m",
+        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "item_count_sum" ]
+      } ]
+    }]
   },
-  "aggregation_groups": [
-    {
-      "includes": [
-        "cal_dt",
-        "categ_lvl2_name",
-        "categ_lvl3_name",
-        "leaf_categ_id",
-        "lstg_format_name",
-        "lstg_site_id",
-        "meta_categ_name"
-      ],
-      "select_rule": {
-        "hierarchy_dims": [],
-        "mandatory_dims": [
-          "cal_dt"
-        ],
-        "joint_dims": [
-          [
-            "categ_lvl2_name",
-            "categ_lvl3_name",
-            "leaf_categ_id",
-            "meta_categ_name"
-          ]
-        ]
-      }
-    },
-    {
-      "includes": [
-        "cal_dt",
-        "categ_lvl2_name",
-        "categ_lvl3_name",
-        "leaf_categ_id",
-        "meta_categ_name"
-      ],
-      "select_rule": {
-        "hierarchy_dims": [
-          [
-            "META_CATEG_NAME",
-            "CATEG_LVL2_NAME",
-            "CATEG_LVL3_NAME"
-          ]
-        ],
-        "mandatory_dims": [
-          "cal_dt"
-        ],
-        "joint_dims": []
-      }
+  "aggregation_groups" : [ {
+    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "lstg_format_name", "lstg_site_id", "meta_categ_name"],
+    "select_rule" : {
+      "hierarchy_dims" : [ ],
+      "mandatory_dims" : [ "cal_dt" ],
+      "joint_dims" : [ [ "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ] ]
+    }
+  }, {
+    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ],
+    "select_rule" : {
+      "hierarchy_dims" : [ [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] ],
+      "mandatory_dims" : [ "cal_dt" ],
+      "joint_dims" : [ ]
     }
-  ],
-  "notify_list": null,
-  "status_need_notify": [],
-  "auto_merge_time_ranges": null,
-  "retention_range": 0,
-  "engine_type": 2,
-  "storage_type": 2,
+  } ],
+  "notify_list" : null,
+  "status_need_notify" : [ ],
+  "auto_merge_time_ranges" : null,
+  "retention_range" : 0,
+  "engine_type" : 2,
+  "storage_type" : 2,
   "partition_date_start": 0
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/a3fcefb9/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
index d185175..28328e4 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
@@ -1,4 +1,5 @@
 {
+ 
   "uuid": "9ac9b7a8-3929-4dff-b59d-2100aadc8dbf",
   "name": "test_kylin_cube_without_slr_desc",
   "description": null,
@@ -159,19 +160,54 @@
         "returntype": "extendedcolumn(100)"
       },
       "dependent_measure_ref": null
-    },
-    {
-      "name": "PRICE_RAW",
-      "function": {
-        "expression": "RAW",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
+    }, {
+      "name" : "CAL_DT_RAW",
+      "function" : {
+        "expression" : "RAW",
+        "parameter" : {
+          "type" : "column",
+          "value" : "CAL_DT",
+          "next_parameter" : null
         },
-        "returntype": "raw"
+        "returntype" : "raw"
       },
-      "dependent_measure_ref": null
+      "dependent_measure_ref" : null
+    }, {
+      "name" : "LSTG_FORMAT_NAME_RAW",
+      "function" : {
+        "expression" : "RAW",
+        "parameter" : {
+          "type" : "column",
+          "value" : "LSTG_FORMAT_NAME",
+          "next_parameter" : null
+        },
+        "returntype" : "raw"
+      },
+      "dependent_measure_ref" : null
+    }, {
+      "name" : "LEAF_CATEG_ID_RAW",
+      "function" : {
+        "expression" : "RAW",
+        "parameter" : {
+          "type" : "column",
+          "value" : "LEAF_CATEG_ID",
+          "next_parameter" : null
+        },
+        "returntype" : "raw"
+      },
+      "dependent_measure_ref" : null
+    }, {
+      "name" : "PRICE_RAW",
+      "function" : {
+        "expression" : "RAW",
+        "parameter" : {
+          "type" : "column",
+          "value" : "PRICE",
+          "next_parameter" : null
+        },
+        "returntype" : "raw"
+      },
+      "dependent_measure_ref" : null
     }
   ],
   "rowkey": {
@@ -234,6 +270,9 @@
               "item_count_sum",
               "SITE_EXTENDED_1",
               "SITE_EXTENDED_2",
+              "CAL_DT_RAW",
+              "LSTG_FORMAT_NAME_RAW",
+              "LEAF_CATEG_ID_RAW",
               "PRICE_RAW"
             ]
           }

http://git-wip-us.apache.org/repos/asf/kylin/blob/a3fcefb9/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
index b34c7df..0470dc6 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
@@ -1,357 +1,293 @@
 {
-  "uuid": "9ac9b7a8-3929-4dff-b59d-2100aadc8dbf",
-  "name": "test_kylin_cube_without_slr_left_join_desc",
-  "description": null,
-  "dimensions": [
-    {
-      "name": "CAL_DT",
-      "table": "EDW.TEST_CAL_DT",
-      "column": "{FK}",
-      "derived": [
-        "WEEK_BEG_DT"
-      ]
-    },
-    {
-      "name": "CATEGORY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "{FK}",
-      "derived": [
-        "USER_DEFINED_FIELD1",
-        "USER_DEFINED_FIELD3",
-        "UPD_DATE",
-        "UPD_USER"
-      ]
-    },
-    {
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "META_CATEG_NAME",
-      "derived": null
-    },
-    {
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "CATEG_LVL2_NAME",
-      "derived": null
-    },
-    {
-      "name": "CATEGORY_HIERARCHY",
-      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
-      "column": "CATEG_LVL3_NAME",
-      "derived": null
+  "uuid" : "9ac9b7a8-3929-4dff-b59d-2100aadc8dbf",
+  "name" : "test_kylin_cube_without_slr_left_join_desc",
+  "description" : null,
+  "dimensions" : [ {
+    "name" : "CAL_DT",
+    "table" : "EDW.TEST_CAL_DT",
+    "column" : "{FK}",
+    "derived" : [ "WEEK_BEG_DT" ]
+  }, {
+    "name" : "CATEGORY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "{FK}",
+    "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ]
+  }, {
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "META_CATEG_NAME",
+    "derived" : null
+  }, {
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "CATEG_LVL2_NAME",
+    "derived" : null
+  }, {
+    "name" : "CATEGORY_HIERARCHY",
+    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
+    "column" : "CATEG_LVL3_NAME",
+    "derived" : null
+  }, {
+    "name" : "LSTG_FORMAT_NAME",
+    "table" : "DEFAULT.TEST_KYLIN_FACT",
+    "column" : "LSTG_FORMAT_NAME",
+    "derived" : null
+  }, {
+    "name" : "SITE_ID",
+    "table" : "EDW.TEST_SITES",
+    "column" : "{FK}",
+    "derived" : [ "SITE_NAME", "CRE_USER" ]
+  }, {
+    "name" : "SELLER_TYPE_CD",
+    "table" : "EDW.TEST_SELLER_TYPE_DIM",
+    "column" : "{FK}",
+    "derived" : [ "SELLER_TYPE_DESC" ]
+  } ],
+  "measures" : [ {
+    "name" : "GMV_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
+      },
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "name": "LSTG_FORMAT_NAME",
-      "table": "DEFAULT.TEST_KYLIN_FACT",
-      "column": "LSTG_FORMAT_NAME",
-      "derived": null
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "GMV_MIN",
+    "function" : {
+      "expression" : "MIN",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
+      },
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "name": "SITE_ID",
-      "table": "EDW.TEST_SITES",
-      "column": "{FK}",
-      "derived": [
-        "SITE_NAME",
-        "CRE_USER"
-      ]
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "GMV_MAX",
+    "function" : {
+      "expression" : "MAX",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
+      },
+      "returntype" : "decimal(19,4)"
     },
-    {
-      "name": "SELLER_TYPE_CD",
-      "table": "EDW.TEST_SELLER_TYPE_DIM",
-      "column": "{FK}",
-      "derived": [
-        "SELLER_TYPE_DESC"
-      ]
-    }
-  ],
-  "measures": [
-    {
-      "name": "GMV_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "TRANS_CNT",
+    "function" : {
+      "expression" : "COUNT",
+      "parameter" : {
+        "type" : "constant",
+        "value" : "1",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "bigint"
     },
-    {
-      "name": "GMV_MIN",
-      "function": {
-        "expression": "MIN",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "ITEM_COUNT_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "ITEM_COUNT",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "bigint"
     },
-    {
-      "name": "GMV_MAX",
-      "function": {
-        "expression": "MAX",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,4)"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "SELLER_CNT_BITMAP",
+    "function" : {
+      "expression" : "COUNT_DISTINCT",
+      "parameter" : {
+        "type" : "column",
+        "value" : "SELLER_ID",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "bitmap"
     },
-    {
-      "name": "TRANS_CNT",
-      "function": {
-        "expression": "COUNT",
-        "parameter": {
-          "type": "constant",
-          "value": "1",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "SITE_NAME_BITMAP",
+    "function" : {
+      "expression" : "COUNT_DISTINCT",
+      "parameter" : {
+        "type" : "column",
+        "value" : "SITE_NAME",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "bitmap"
     },
-    {
-      "name": "ITEM_COUNT_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "ITEM_COUNT",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "SELLER_FORMAT_CNT",
+    "function" : {
+      "expression" : "COUNT_DISTINCT",
+      "parameter" : {
+        "type" : "column",
+        "value" : "LSTG_FORMAT_NAME",
+        "next_parameter" : {
+          "type" : "column",
+          "value" : "SELLER_ID",
+          "next_parameter" : null
+        }
       },
-      "dependent_measure_ref": null
+      "returntype" : "hllc(10)"
     },
-    {
-      "name": "SELLER_CNT_BITMAP",
-      "function": {
-        "expression": "COUNT_DISTINCT",
-        "parameter": {
-          "type": "column",
-          "value": "SELLER_ID",
-          "next_parameter": null
-        },
-        "returntype": "bitmap"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "TOP_SELLER",
+    "function" : {
+      "expression" : "TOP_N",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : {
+          "type" : "column",
+          "value" : "SELLER_ID",
+          "next_parameter" : null
+        }
       },
-      "dependent_measure_ref": null
+      "returntype" : "topn(100)",
+      "configuration": {"topn.encoding.SELLER_ID" : "int:4"}
     },
-    {
-      "name": "SITE_NAME_BITMAP",
-      "function": {
-        "expression": "COUNT_DISTINCT",
-        "parameter": {
-          "type": "column",
-          "value": "SITE_NAME",
-          "next_parameter": null
-        },
-        "returntype": "bitmap"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "CAL_DT_RAW",
+    "function" : {
+      "expression" : "RAW",
+      "parameter" : {
+        "type" : "column",
+        "value" : "CAL_DT",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "raw"
     },
-    {
-      "name": "SELLER_FORMAT_CNT",
-      "function": {
-        "expression": "COUNT_DISTINCT",
-        "parameter": {
-          "type": "column",
-          "value": "LSTG_FORMAT_NAME",
-          "next_parameter": {
-            "type": "column",
-            "value": "SELLER_ID",
-            "next_parameter": null
-          }
-        },
-        "returntype": "hllc(10)"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "LSTG_FORMAT_NAME_RAW",
+    "function" : {
+      "expression" : "RAW",
+      "parameter" : {
+        "type" : "column",
+        "value" : "LSTG_FORMAT_NAME",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "raw"
     },
-    {
-      "name": "TOP_SELLER",
-      "function": {
-        "expression": "TOP_N",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": {
-            "type": "column",
-            "value": "SELLER_ID",
-            "next_parameter": null
-          }
-        },
-        "returntype": "topn(100)",
-        "configuration": {
-          "topn.encoding.SELLER_ID": "int:4"
-        }
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "LEAF_CATEG_ID_RAW",
+    "function" : {
+      "expression" : "RAW",
+      "parameter" : {
+        "type" : "column",
+        "value" : "LEAF_CATEG_ID",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "raw"
     },
-    {
-      "name": "PRICE_RAW",
-      "function": {
-        "expression": "RAW",
-        "parameter": {
-          "type": "column",
-          "value": "PRICE",
-          "next_parameter": null
-        },
-        "returntype": "raw"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "PRICE_RAW",
+    "function" : {
+      "expression" : "RAW",
+      "parameter" : {
+        "type" : "column",
+        "value" : "PRICE",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
-    }
-  ],
-  "dictionaries": [
+      "returntype" : "raw"
+    },
+    "dependent_measure_ref" : null
+  } ],
+  "dictionaries" : [
     {
-      "column": "SITE_NAME",
+      "column" : "SITE_NAME",
       "builder": "org.apache.kylin.dict.GlobalDictionaryBuilder"
     }
   ],
-  "rowkey": {
-    "rowkey_columns": [
-      {
-        "column": "cal_dt",
-        "encoding": "dict"
-      },
-      {
-        "column": "leaf_categ_id",
-        "encoding": "dict"
-      },
-      {
-        "column": "meta_categ_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "categ_lvl2_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "categ_lvl3_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "lstg_format_name",
-        "encoding": "dict"
-      },
-      {
-        "column": "lstg_site_id",
-        "encoding": "dict"
-      },
-      {
-        "column": "slr_segment_cd",
-        "encoding": "dict"
-      }
-    ]
+  "rowkey" : {
+    "rowkey_columns" : [ {
+      "column" : "cal_dt",
+      "encoding" : "dict"
+    }, {
+      "column" : "leaf_categ_id",
+      "encoding" : "dict"
+    }, {
+      "column" : "meta_categ_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "categ_lvl2_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "categ_lvl3_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "lstg_format_name",
+      "encoding" : "dict"
+    }, {
+      "column" : "lstg_site_id",
+      "encoding" : "dict"
+    }, {
+      "column" : "slr_segment_cd",
+      "encoding" : "dict"
+    } ]
   },
-  "signature": null,
-  "last_modified": 1448959801311,
-  "model_name": "test_kylin_left_join_model_desc",
-  "null_string": null,
-  "hbase_mapping": {
-    "column_family": [
-      {
-        "name": "f1",
-        "columns": [
-          {
-            "qualifier": "m",
-            "measure_refs": [
-              "gmv_sum",
-              "gmv_min",
-              "gmv_max",
-              "trans_cnt",
-              "item_count_sum",
-              "PRICE_RAW"
-            ]
-          }
-        ]
-      },
-      {
-        "name": "f2",
-        "columns": [
-          {
-            "qualifier": "m",
-            "measure_refs": [
-              "seller_cnt_bitmap",
-              "site_name_bitmap",
-              "seller_format_cnt"
-            ]
-          }
-        ]
-      },
-      {
-        "name": "f3",
-        "columns": [
-          {
-            "qualifier": "m",
-            "measure_refs": [
-              "top_seller"
-            ]
-          }
-        ]
-      }
-    ]
+  "signature" : null,
+  "last_modified" : 1448959801311,
+  "model_name" : "test_kylin_left_join_model_desc",
+  "null_string" : null,
+  "hbase_mapping" : {
+    "column_family" : [ {
+      "name" : "f1",
+      "columns" : [ {
+        "qualifier" : "m",
+        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "item_count_sum", "CAL_DT_RAW", "LSTG_FORMAT_NAME_RAW", "LEAF_CATEG_ID_RAW", "PRICE_RAW" ]
+      } ]
+    }, {
+      "name" : "f2",
+      "columns" : [ {
+        "qualifier" : "m",
+        "measure_refs" : [ "seller_cnt_bitmap", "site_name_bitmap", "seller_format_cnt"]
+      } ]
+    }, {
+      "name" : "f3",
+      "columns" : [ {
+        "qualifier" : "m",
+        "measure_refs" : [ "top_seller" ]
+      } ]
+    } ]
   },
-  "aggregation_groups": [
-    {
-      "includes": [
-        "cal_dt",
-        "categ_lvl2_name",
-        "categ_lvl3_name",
-        "leaf_categ_id",
-        "lstg_format_name",
-        "lstg_site_id",
-        "meta_categ_name"
-      ],
-      "select_rule": {
-        "hierarchy_dims": [],
-        "mandatory_dims": [
-          "cal_dt"
-        ],
-        "joint_dims": [
-          [
-            "categ_lvl2_name",
-            "categ_lvl3_name",
-            "leaf_categ_id",
-            "meta_categ_name"
-          ]
-        ]
-      }
-    },
-    {
-      "includes": [
-        "cal_dt",
-        "categ_lvl2_name",
-        "categ_lvl3_name",
-        "leaf_categ_id",
-        "meta_categ_name"
-      ],
-      "select_rule": {
-        "hierarchy_dims": [
-          [
-            "META_CATEG_NAME",
-            "CATEG_LVL2_NAME",
-            "CATEG_LVL3_NAME"
-          ]
-        ],
-        "mandatory_dims": [
-          "cal_dt"
-        ],
-        "joint_dims": []
-      }
+  "aggregation_groups" : [ {
+    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "lstg_format_name", "lstg_site_id", "meta_categ_name"],
+    "select_rule" : {
+      "hierarchy_dims" : [ ],
+      "mandatory_dims" : [ "cal_dt" ],
+      "joint_dims" : [ [ "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ] ]
     }
-  ],
-  "notify_list": null,
-  "status_need_notify": [],
-  "auto_merge_time_ranges": null,
-  "retention_range": 0,
-  "engine_type": 2,
-  "storage_type": 2,
+  }, {
+    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ],
+    "select_rule" : {
+      "hierarchy_dims" : [ [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] ],
+      "mandatory_dims" : [ "cal_dt" ],
+      "joint_dims" : [ ]
+    }
+  } ],
+  "notify_list" : null,
+  "status_need_notify" : [ ],
+  "auto_merge_time_ranges" : null,
+  "retention_range" : 0,
+  "engine_type" : 2,
+  "storage_type" : 2,
   "override_kylin_properties": {
     "kylin.job.cubing.inmem.sampling.hll.precision": "16",
     "kylin.hive.create.flat.table.method": "2"

http://git-wip-us.apache.org/repos/asf/kylin/blob/a3fcefb9/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json b/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
index f2c4e72..ef10c1e 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
@@ -1,155 +1,118 @@
 {
-  "uuid": "901ed15e-7769-4c66-b7ae-fbdc971cd192",
-  "name": "test_streaming_table_cube_desc",
-  "description": "",
-  "dimensions": [
-    {
-      "name": "DEFAULT.STREAMING_TABLE.SITE",
-      "table": "DEFAULT.STREAMING_TABLE",
-      "column": "SITE",
-      "derived": null
-    },
-    {
-      "name": "DEFAULT.STREAMING_TABLE.ITM",
-      "table": "DEFAULT.STREAMING_TABLE",
-      "column": "ITM",
-      "derived": null
-    },
-    {
-      "name": "TIME",
-      "table": "DEFAULT.STREAMING_TABLE",
-      "column": "DAY_START",
-      "derived": null
-    },
-    {
-      "name": "TIME",
-      "table": "DEFAULT.STREAMING_TABLE",
-      "column": "HOUR_START",
-      "derived": null
-    },
-    {
-      "name": "TIME",
-      "table": "DEFAULT.STREAMING_TABLE",
-      "column": "MINUTE_START",
-      "derived": null
-    }
-  ],
-  "measures": [
-    {
-      "name": "_COUNT_",
-      "function": {
-        "expression": "COUNT",
-        "parameter": {
-          "type": "constant",
-          "value": "1",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
+  "uuid" : "901ed15e-7769-4c66-b7ae-fbdc971cd192",
+ 
+  "name" : "test_streaming_table_cube_desc",
+  "description" : "",
+  "dimensions" : [ {
+    "name" : "DEFAULT.STREAMING_TABLE.SITE",
+    "table" : "DEFAULT.STREAMING_TABLE",
+    "column" : "SITE",
+    "derived" : null
+  }, {
+    "name" : "DEFAULT.STREAMING_TABLE.ITM",
+    "table" : "DEFAULT.STREAMING_TABLE",
+    "column" : "ITM",
+    "derived" : null
+  }, {
+    "name" : "TIME",
+    "table" : "DEFAULT.STREAMING_TABLE",
+    "column" : "DAY_START",
+    "derived" : null
+  }, {
+    "name" : "TIME",
+    "table" : "DEFAULT.STREAMING_TABLE",
+    "column" : "HOUR_START",
+    "derived" : null
+  }, {
+    "name" : "TIME",
+    "table" : "DEFAULT.STREAMING_TABLE",
+    "column" : "MINUTE_START",
+    "derived" : null
+  } ],
+  "measures" : [ {
+    "name" : "_COUNT_",
+    "function" : {
+      "expression" : "COUNT",
+      "parameter" : {
+        "type" : "constant",
+        "value" : "1",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "bigint"
     },
-    {
-      "name": "GMV_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "GMV",
-          "next_parameter": null
-        },
-        "returntype": "decimal(19,6)"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "GMV_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "GMV",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
+      "returntype" : "decimal(19,6)"
     },
-    {
-      "name": "ITEM_COUNT_SUM",
-      "function": {
-        "expression": "SUM",
-        "parameter": {
-          "type": "column",
-          "value": "ITEM_COUNT",
-          "next_parameter": null
-        },
-        "returntype": "bigint"
+    "dependent_measure_ref" : null
+  }, {
+    "name" : "ITEM_COUNT_SUM",
+    "function" : {
+      "expression" : "SUM",
+      "parameter" : {
+        "type" : "column",
+        "value" : "ITEM_COUNT",
+        "next_parameter" : null
       },
-      "dependent_measure_ref": null
-    }
-  ],
-  "rowkey": {
-    "rowkey_columns": [
-      {
-        "column": "DAY_START",
-        "encoding": "dict"
-      },
-      {
-        "column": "HOUR_START",
-        "encoding": "dict"
-      },
-      {
-        "column": "MINUTE_START",
-        "encoding": "dict"
-      },
-      {
-        "column": "SITE",
-        "encoding": "dict"
-      },
-      {
-        "column": "ITM",
-        "encoding": "dict"
-      }
-    ]
+      "returntype" : "bigint"
+    },
+    "dependent_measure_ref" : null
+  } ],
+  "rowkey" : {
+    "rowkey_columns" : [ {
+      "column" : "DAY_START",
+      "encoding" : "dict"
+    }, {
+      "column" : "HOUR_START",
+      "encoding" : "dict"
+    }, {
+      "column" : "MINUTE_START",
+      "encoding" : "dict"
+    }, {
+      "column" : "SITE",
+      "encoding" : "dict"
+    }, {
+      "column" : "ITM",
+      "encoding" : "dict"
+    } ]
   },
-  "signature": null,
-  "last_modified": 1448959801314,
-  "model_name": "test_streaming_table_model_desc",
-  "null_string": null,
-  "hbase_mapping": {
-    "column_family": [
-      {
-        "name": "F1",
-        "columns": [
-          {
-            "qualifier": "M",
-            "measure_refs": [
-              "_COUNT_",
-              "GMV_SUM",
-              "ITEM_COUNT_SUM"
-            ]
-          }
-        ]
-      }
-    ]
+  "signature" : null,
+  "last_modified" : 1448959801314,
+  "model_name" : "test_streaming_table_model_desc",
+  "null_string" : null,
+  "hbase_mapping" : {
+    "column_family" : [ {
+      "name" : "F1",
+      "columns" : [ {
+        "qualifier" : "M",
+        "measure_refs" : [ "_COUNT_", "GMV_SUM", "ITEM_COUNT_SUM" ]
+      } ]
+    } ]
   },
-  "aggregation_groups": [
-    {
-      "includes": [
-        "DAY_START",
-        "HOUR_START",
-        "ITM",
-        "MINUTE_START",
-        "SITE"
-      ],
-      "select_rule": {
-        "hierarchy_dims": [
-          [
-            "DAY_START",
-            "HOUR_START",
-            "MINUTE_START"
-          ]
-        ],
-        "mandatory_dims": [],
-        "joint_dims": []
-      }
+  "aggregation_groups" : [ {
+    "includes" : [ "DAY_START", "HOUR_START", "ITM", "MINUTE_START", "SITE" ],
+    "select_rule" : {
+      "hierarchy_dims" : [ [ "DAY_START", "HOUR_START", "MINUTE_START" ] ],
+      "mandatory_dims" : [ ],
+      "joint_dims" : [ ]
     }
-  ],
+  } ],
   "override_kylin_properties": {
     "kylin.cube.algorithm": "inmem"
   },
-  "notify_list": [],
-  "status_need_notify": [],
-  "auto_merge_time_ranges": null,
-  "retention_range": 0,
-  "engine_type": 2,
-  "storage_type": 2,
+  "notify_list" : [ ],
+  "status_need_notify" : [ ],
+  "auto_merge_time_ranges" : null,
+  "retention_range" : 0,
+  "engine_type" : 2,
+  "storage_type" : 2,
   "partition_date_start": 0
 }
\ No newline at end of file


[2/6] kylin git commit: minor, remove unnecessary raw measures

Posted by ma...@apache.org.
minor, remove unnecessary raw measures


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

Branch: refs/heads/1.5.4-rc1
Commit: cdebd569aeac4d47850c0d5e2bd84fcd8ff250cc
Parents: f15ef5e
Author: Hongbin Ma <ma...@apache.org>
Authored: Fri Sep 9 18:57:01 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Sat Sep 10 19:28:59 2016 +0800

----------------------------------------------------------------------
 .../kylin/measure/topn/TopNMeasureType.java     |   2 +
 .../test_case_data/localmeta/cube_desc/ssb.json | 409 +++++++------
 .../test_kylin_cube_with_slr_desc.json          | 389 +++++++-----
 ...st_kylin_cube_with_view_inner_join_desc.json | 388 +++++++-----
 ...est_kylin_cube_with_view_left_join_desc.json | 388 +++++++-----
 .../test_kylin_cube_without_slr_desc.json       |  58 +-
 ...t_kylin_cube_without_slr_left_join_desc.json | 587 +++++++++++--------
 .../test_streaming_table_cube_desc.json         | 245 ++++----
 8 files changed, 1423 insertions(+), 1043 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/cdebd569/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java b/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
index ed22d61..0756056 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
@@ -274,6 +274,8 @@ public class TopNMeasureType extends MeasureType<TopNCounter<ByteArray>> {
 
         if (sum.isSum() == false)
             return false;
+        if (sum.getParameter() == null || sum.getParameter().getColRefs() == null || sum.getParameter().getColRefs().size() == 0)
+            return false;
 
         TblColRef sumCol = sum.getParameter().getColRefs().get(0);
         return sumCol.equals(topnNumCol);

http://git-wip-us.apache.org/repos/asf/kylin/blob/cdebd569/examples/test_case_data/localmeta/cube_desc/ssb.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/ssb.json b/examples/test_case_data/localmeta/cube_desc/ssb.json
index d3ea10b..4903979 100644
--- a/examples/test_case_data/localmeta/cube_desc/ssb.json
+++ b/examples/test_case_data/localmeta/cube_desc/ssb.json
@@ -1,179 +1,256 @@
 {
-  "uuid" : "5c44df30-daec-486e-af90-927bf7851057",
-  "name" : "ssb",
-  "description" : "",
-  "dimensions" : [ {
-    "name" : "SSB.PART_DERIVED",
-    "table" : "SSB.PART",
-    "column" : null,
-    "derived" : [ "P_MFGR", "P_CATEGORY", "P_BRAND" ]
-  }, {
-    "name" : "C_CITY",
-    "table" : "SSB.CUSTOMER",
-    "column" : "C_CITY",
-    "derived" : null
-  }, {
-    "name" : "C_REGION",
-    "table" : "SSB.CUSTOMER",
-    "column" : "C_REGION",
-    "derived" : null
-  }, {
-    "name" : "C_NATION",
-    "table" : "SSB.CUSTOMER",
-    "column" : "C_NATION",
-    "derived" : null
-  }, {
-    "name" : "S_CITY",
-    "table" : "SSB.SUPPLIER",
-    "column" : "S_CITY",
-    "derived" : null
-  }, {
-    "name" : "S_REGION",
-    "table" : "SSB.SUPPLIER",
-    "column" : "S_REGION",
-    "derived" : null
-  }, {
-    "name" : "S_NATION",
-    "table" : "SSB.SUPPLIER",
-    "column" : "S_NATION",
-    "derived" : null
-  }, {
-    "name" : "D_YEAR",
-    "table" : "SSB.DATES",
-    "column" : "D_YEAR",
-    "derived" : null
-  }, {
-    "name" : "D_YEARMONTH",
-    "table" : "SSB.DATES",
-    "column" : "D_YEARMONTH",
-    "derived" : null
-  }, {
-    "name" : "D_YEARMONTHNUM",
-    "table" : "SSB.DATES",
-    "column" : "D_YEARMONTHNUM",
-    "derived" : null
-  }, {
-    "name" : "D_WEEKNUMINYEAR",
-    "table" : "SSB.DATES",
-    "column" : "D_WEEKNUMINYEAR",
-    "derived" : null
-  } ],
-  "measures" : [ {
-    "name" : "_COUNT_",
-    "function" : {
-      "expression" : "COUNT",
-      "parameter" : {
-        "type" : "constant",
-        "value" : "1",
-        "next_parameter" : null
-      },
-      "returntype" : "bigint"
+  "uuid": "5c44df30-daec-486e-af90-927bf7851057",
+  "name": "ssb",
+  "description": "",
+  "dimensions": [
+    {
+      "name": "SSB.PART_DERIVED",
+      "table": "SSB.PART",
+      "column": null,
+      "derived": [
+        "P_MFGR",
+        "P_CATEGORY",
+        "P_BRAND"
+      ]
+    },
+    {
+      "name": "C_CITY",
+      "table": "SSB.CUSTOMER",
+      "column": "C_CITY",
+      "derived": null
+    },
+    {
+      "name": "C_REGION",
+      "table": "SSB.CUSTOMER",
+      "column": "C_REGION",
+      "derived": null
+    },
+    {
+      "name": "C_NATION",
+      "table": "SSB.CUSTOMER",
+      "column": "C_NATION",
+      "derived": null
+    },
+    {
+      "name": "S_CITY",
+      "table": "SSB.SUPPLIER",
+      "column": "S_CITY",
+      "derived": null
+    },
+    {
+      "name": "S_REGION",
+      "table": "SSB.SUPPLIER",
+      "column": "S_REGION",
+      "derived": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "TOTAL_REVENUE",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "LO_REVENUE",
-        "next_parameter" : null
+    {
+      "name": "S_NATION",
+      "table": "SSB.SUPPLIER",
+      "column": "S_NATION",
+      "derived": null
+    },
+    {
+      "name": "D_YEAR",
+      "table": "SSB.DATES",
+      "column": "D_YEAR",
+      "derived": null
+    },
+    {
+      "name": "D_YEARMONTH",
+      "table": "SSB.DATES",
+      "column": "D_YEARMONTH",
+      "derived": null
+    },
+    {
+      "name": "D_YEARMONTHNUM",
+      "table": "SSB.DATES",
+      "column": "D_YEARMONTHNUM",
+      "derived": null
+    },
+    {
+      "name": "D_WEEKNUMINYEAR",
+      "table": "SSB.DATES",
+      "column": "D_WEEKNUMINYEAR",
+      "derived": null
+    }
+  ],
+  "measures": [
+    {
+      "name": "_COUNT_",
+      "function": {
+        "expression": "COUNT",
+        "parameter": {
+          "type": "constant",
+          "value": "1",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
       },
-      "returntype" : "bigint"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "TOTAL_SUPPLYCOST",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "LO_SUPPLYCOST",
-        "next_parameter" : null
+    {
+      "name": "TOTAL_REVENUE",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "LO_REVENUE",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
       },
-      "returntype" : "bigint"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "TOTAL_V_REVENUE",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "V_REVENUE",
-        "next_parameter" : null
+    {
+      "name": "TOTAL_SUPPLYCOST",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "LO_SUPPLYCOST",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
       },
-      "returntype" : "bigint"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  } ],
-  "rowkey" : {
-    "rowkey_columns" : [ {
-      "column" : "LO_PARTKEY",
-      "encoding" : "dict"
-    }, {
-      "column" : "C_CITY",
-      "encoding" : "dict"
-    }, {
-      "column" : "C_REGION",
-      "encoding" : "dict"
-    }, {
-      "column" : "C_NATION",
-      "encoding" : "dict"
-    }, {
-      "column" : "S_CITY",
-      "encoding" : "dict"
-    }, {
-      "column" : "S_REGION",
-      "encoding" : "dict"
-    }, {
-      "column" : "S_NATION",
-      "encoding" : "dict"
-    }, {
-      "column" : "D_YEAR",
-      "encoding" : "dict"
-    }, {
-      "column" : "D_YEARMONTH",
-      "encoding" : "dict"
-    }, {
-      "column" : "D_YEARMONTHNUM",
-      "encoding" : "dict"
-    }, {
-      "column" : "D_WEEKNUMINYEAR",
-      "encoding" : "dict"
-    } ]
+    {
+      "name": "TOTAL_V_REVENUE",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "V_REVENUE",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
+      },
+      "dependent_measure_ref": null
+    }
+  ],
+  "rowkey": {
+    "rowkey_columns": [
+      {
+        "column": "LO_PARTKEY",
+        "encoding": "dict"
+      },
+      {
+        "column": "C_CITY",
+        "encoding": "dict"
+      },
+      {
+        "column": "C_REGION",
+        "encoding": "dict"
+      },
+      {
+        "column": "C_NATION",
+        "encoding": "dict"
+      },
+      {
+        "column": "S_CITY",
+        "encoding": "dict"
+      },
+      {
+        "column": "S_REGION",
+        "encoding": "dict"
+      },
+      {
+        "column": "S_NATION",
+        "encoding": "dict"
+      },
+      {
+        "column": "D_YEAR",
+        "encoding": "dict"
+      },
+      {
+        "column": "D_YEARMONTH",
+        "encoding": "dict"
+      },
+      {
+        "column": "D_YEARMONTHNUM",
+        "encoding": "dict"
+      },
+      {
+        "column": "D_WEEKNUMINYEAR",
+        "encoding": "dict"
+      }
+    ]
   },
-  "signature" : "5iV8LVYs+PmVUju8QNQ5TQ==",
-  "last_modified" : 1457503036686,
-  "model_name" : "ssb",
-  "null_string" : null,
-  "hbase_mapping" : {
-    "column_family" : [ {
-      "name" : "F1",
-      "columns" : [ {
-        "qualifier" : "M",
-        "measure_refs" : [ "_COUNT_", "TOTAL_REVENUE", "TOTAL_SUPPLYCOST", "TOTAL_V_REVENUE" ]
-      } ]
-    } ]
+  "signature": "5iV8LVYs+PmVUju8QNQ5TQ==",
+  "last_modified": 1457503036686,
+  "model_name": "ssb",
+  "null_string": null,
+  "hbase_mapping": {
+    "column_family": [
+      {
+        "name": "F1",
+        "columns": [
+          {
+            "qualifier": "M",
+            "measure_refs": [
+              "_COUNT_",
+              "TOTAL_REVENUE",
+              "TOTAL_SUPPLYCOST",
+              "TOTAL_V_REVENUE"
+            ]
+          }
+        ]
+      }
+    ]
   },
-  "aggregation_groups" : [ {
-    "includes" : [ "LO_PARTKEY", "C_CITY", "C_REGION", "C_NATION", "S_CITY", "S_REGION", "S_NATION", "D_YEAR", "D_YEARMONTH", "D_YEARMONTHNUM", "D_WEEKNUMINYEAR" ],
-    "select_rule" : {
-      "hierarchy_dims" : [ [ "C_REGION", "C_NATION", "C_CITY" ], [ "S_REGION", "S_NATION", "S_CITY" ], [ "D_YEARMONTH", "D_YEARMONTHNUM", "D_WEEKNUMINYEAR" ] ],
-      "mandatory_dims" : [ "D_YEAR" ],
-      "joint_dims" : [ ]
+  "aggregation_groups": [
+    {
+      "includes": [
+        "LO_PARTKEY",
+        "C_CITY",
+        "C_REGION",
+        "C_NATION",
+        "S_CITY",
+        "S_REGION",
+        "S_NATION",
+        "D_YEAR",
+        "D_YEARMONTH",
+        "D_YEARMONTHNUM",
+        "D_WEEKNUMINYEAR"
+      ],
+      "select_rule": {
+        "hierarchy_dims": [
+          [
+            "C_REGION",
+            "C_NATION",
+            "C_CITY"
+          ],
+          [
+            "S_REGION",
+            "S_NATION",
+            "S_CITY"
+          ],
+          [
+            "D_YEARMONTH",
+            "D_YEARMONTHNUM",
+            "D_WEEKNUMINYEAR"
+          ]
+        ],
+        "mandatory_dims": [
+          "D_YEAR"
+        ],
+        "joint_dims": []
+      }
     }
-  } ],
-  "notify_list" : [ ],
-  "status_need_notify" : [ ],
-  "partition_date_start" : 694224000000,
-  "partition_date_end" : 3153600000000,
-  "auto_merge_time_ranges" : [ 604800000, 2419200000 ],
-  "retention_range" : 0,
-  "engine_type" : 2,
-  "storage_type" : 2,
-  "override_kylin_properties" : {
-    "kylin.hbase.default.compression.codec" : "lz4",
-    "kylin.cube.aggrgroup.isMandatoryOnlyValid" : "true"
+  ],
+  "notify_list": [],
+  "status_need_notify": [],
+  "partition_date_start": 694224000000,
+  "partition_date_end": 3153600000000,
+  "auto_merge_time_ranges": [
+    604800000,
+    2419200000
+  ],
+  "retention_range": 0,
+  "engine_type": 2,
+  "storage_type": 2,
+  "override_kylin_properties": {
+    "kylin.hbase.default.compression.codec": "lz4",
+    "kylin.cube.aggrgroup.isMandatoryOnlyValid": "true"
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/cdebd569/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json
index 4064fcb..f62d196 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_desc.json
@@ -1,172 +1,245 @@
 {
-  "uuid" : "a24ca905-1fc6-4f67-985c-38fa5aeafd92",
- 
-  "name" : "test_kylin_cube_with_slr_desc",
-  "description" : null,
-  "dimensions" : [ {
-    "name" : "CAL_DT",
-    "table" : "EDW.TEST_CAL_DT",
-    "column" : "{FK}",
-    "derived" : [ "WEEK_BEG_DT" ]
-  }, {
-    "name" : "CATEGORY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "{FK}",
-    "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ]
-  }, {
-    "name" : "CATEGORY_HIERARCHY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "META_CATEG_NAME",
-    "derived" : null
-  }, {
-    "name" : "CATEGORY_HIERARCHY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "CATEG_LVL2_NAME",
-    "derived" : null
-  }, {
-    "name" : "CATEGORY_HIERARCHY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "CATEG_LVL3_NAME",
-    "derived" : null
-  }, {
-    "name" : "LSTG_FORMAT_NAME",
-    "table" : "DEFAULT.TEST_KYLIN_FACT",
-    "column" : "LSTG_FORMAT_NAME",
-    "derived" : null
-  }, {
-    "name" : "SITE_ID",
-    "table" : "EDW.TEST_SITES",
-    "column" : "{FK}",
-    "derived" : [ "SITE_NAME", "CRE_USER" ]
-  }, {
-    "name" : "SELLER_TYPE_CD",
-    "table" : "EDW.TEST_SELLER_TYPE_DIM",
-    "column" : "{FK}",
-    "derived" : [ "SELLER_TYPE_DESC" ]
-  }, {
-    "name" : "SELLER_ID",
-    "table" : "DEFAULT.TEST_KYLIN_FACT",
-    "column" : "SELLER_ID",
-    "derived" : null
-  } ],
-  "measures" : [ {
-    "name" : "GMV_SUM",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
-      },
-      "returntype" : "decimal(19,4)"
+  "uuid": "a24ca905-1fc6-4f67-985c-38fa5aeafd92",
+  "name": "test_kylin_cube_with_slr_desc",
+  "description": null,
+  "dimensions": [
+    {
+      "name": "CAL_DT",
+      "table": "EDW.TEST_CAL_DT",
+      "column": "{FK}",
+      "derived": [
+        "WEEK_BEG_DT"
+      ]
+    },
+    {
+      "name": "CATEGORY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "{FK}",
+      "derived": [
+        "USER_DEFINED_FIELD1",
+        "USER_DEFINED_FIELD3",
+        "UPD_DATE",
+        "UPD_USER"
+      ]
+    },
+    {
+      "name": "CATEGORY_HIERARCHY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "META_CATEG_NAME",
+      "derived": null
+    },
+    {
+      "name": "CATEGORY_HIERARCHY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "CATEG_LVL2_NAME",
+      "derived": null
+    },
+    {
+      "name": "CATEGORY_HIERARCHY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "CATEG_LVL3_NAME",
+      "derived": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "GMV_MIN",
-    "function" : {
-      "expression" : "MIN",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
+    {
+      "name": "LSTG_FORMAT_NAME",
+      "table": "DEFAULT.TEST_KYLIN_FACT",
+      "column": "LSTG_FORMAT_NAME",
+      "derived": null
+    },
+    {
+      "name": "SITE_ID",
+      "table": "EDW.TEST_SITES",
+      "column": "{FK}",
+      "derived": [
+        "SITE_NAME",
+        "CRE_USER"
+      ]
+    },
+    {
+      "name": "SELLER_TYPE_CD",
+      "table": "EDW.TEST_SELLER_TYPE_DIM",
+      "column": "{FK}",
+      "derived": [
+        "SELLER_TYPE_DESC"
+      ]
+    },
+    {
+      "name": "SELLER_ID",
+      "table": "DEFAULT.TEST_KYLIN_FACT",
+      "column": "SELLER_ID",
+      "derived": null
+    }
+  ],
+  "measures": [
+    {
+      "name": "GMV_SUM",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,4)"
       },
-      "returntype" : "decimal(19,4)"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "GMV_MAX",
-    "function" : {
-      "expression" : "MAX",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
+    {
+      "name": "GMV_MIN",
+      "function": {
+        "expression": "MIN",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,4)"
       },
-      "returntype" : "decimal(19,4)"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "TRANS_CNT",
-    "function" : {
-      "expression" : "COUNT",
-      "parameter" : {
-        "type" : "constant",
-        "value" : "1",
-        "next_parameter" : null
+    {
+      "name": "GMV_MAX",
+      "function": {
+        "expression": "MAX",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,4)"
       },
-      "returntype" : "bigint"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "ITEM_COUNT_SUM",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "ITEM_COUNT",
-        "next_parameter" : null
+    {
+      "name": "TRANS_CNT",
+      "function": {
+        "expression": "COUNT",
+        "parameter": {
+          "type": "constant",
+          "value": "1",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
       },
-      "returntype" : "bigint"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  } ],
-  "rowkey" : {
-    "rowkey_columns" : [ {
-      "column" : "seller_id",
-      "encoding" : "int:4",
-      "isShardBy" : true
-    }, {
-      "column" : "cal_dt",
-      "encoding" : "dict"
-    }, {
-      "column" : "leaf_categ_id",
-      "encoding" : "fixed_length:18"
-    }, {
-      "column" : "meta_categ_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "categ_lvl2_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "categ_lvl3_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "lstg_format_name",
-      "encoding" : "fixed_length:12"
-    }, {
-      "column" : "lstg_site_id",
-      "encoding" : "dict"
-    }, {
-      "column" : "slr_segment_cd",
-      "encoding" : "dict"
-    } ]
+    {
+      "name": "ITEM_COUNT_SUM",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "ITEM_COUNT",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
+      },
+      "dependent_measure_ref": null
+    }
+  ],
+  "rowkey": {
+    "rowkey_columns": [
+      {
+        "column": "seller_id",
+        "encoding": "int:4",
+        "isShardBy": true
+      },
+      {
+        "column": "cal_dt",
+        "encoding": "dict"
+      },
+      {
+        "column": "leaf_categ_id",
+        "encoding": "fixed_length:18"
+      },
+      {
+        "column": "meta_categ_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "categ_lvl2_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "categ_lvl3_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "lstg_format_name",
+        "encoding": "fixed_length:12"
+      },
+      {
+        "column": "lstg_site_id",
+        "encoding": "dict"
+      },
+      {
+        "column": "slr_segment_cd",
+        "encoding": "dict"
+      }
+    ]
   },
-  "signature" : null,
-  "last_modified" : 1448959801271,
-  "model_name" : "test_kylin_inner_join_model_desc",
-  "null_string" : null,
-  "hbase_mapping" : {
-    "column_family" : [ {
-      "name" : "f1",
-      "columns" : [ {
-        "qualifier" : "m",
-        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "item_count_sum" ]
-      } ]
-    } ]
+  "signature": null,
+  "last_modified": 1448959801271,
+  "model_name": "test_kylin_inner_join_model_desc",
+  "null_string": null,
+  "hbase_mapping": {
+    "column_family": [
+      {
+        "name": "f1",
+        "columns": [
+          {
+            "qualifier": "m",
+            "measure_refs": [
+              "gmv_sum",
+              "gmv_min",
+              "gmv_max",
+              "trans_cnt",
+              "item_count_sum"
+            ]
+          }
+        ]
+      }
+    ]
   },
-  "aggregation_groups" : [ {
-    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "lstg_format_name", "lstg_site_id", "meta_categ_name", "seller_id", "slr_segment_cd" ],
-    "select_rule" : {
-      "hierarchy_dims" : [ [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] ],
-      "mandatory_dims" : ["seller_id"],
-      "joint_dims" : [ [ "lstg_format_name", "lstg_site_id", "slr_segment_cd" ] ]
+  "aggregation_groups": [
+    {
+      "includes": [
+        "cal_dt",
+        "categ_lvl2_name",
+        "categ_lvl3_name",
+        "leaf_categ_id",
+        "lstg_format_name",
+        "lstg_site_id",
+        "meta_categ_name",
+        "seller_id",
+        "slr_segment_cd"
+      ],
+      "select_rule": {
+        "hierarchy_dims": [
+          [
+            "META_CATEG_NAME",
+            "CATEG_LVL2_NAME",
+            "CATEG_LVL3_NAME"
+          ]
+        ],
+        "mandatory_dims": [
+          "seller_id"
+        ],
+        "joint_dims": [
+          [
+            "lstg_format_name",
+            "lstg_site_id",
+            "slr_segment_cd"
+          ]
+        ]
+      }
     }
-  } ],
-  "notify_list" : null,
-  "status_need_notify" : [ ],
-  "auto_merge_time_ranges" : null,
-  "retention_range" : 0,
-  "engine_type" : 2,
-  "storage_type" : 2,
-  "partition_date_start" : 0
+  ],
+  "notify_list": null,
+  "status_need_notify": [],
+  "auto_merge_time_ranges": null,
+  "retention_range": 0,
+  "engine_type": 2,
+  "storage_type": 2,
+  "partition_date_start": 0
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/cdebd569/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json
index d4c64b5..e3a3e70 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_inner_join_desc.json
@@ -1,169 +1,249 @@
 {
-  "uuid" : "9876b7a8-3929-4dff-b59d-2100aadc8dbf",
-  "name" : "test_kylin_cube_with_view_inner_join_desc",
-  "description" : null,
-  "dimensions" : [ {
-    "name" : "CAL_DT",
-    "table" : "EDW.V_TEST_CAL_DT",
-    "column" : "{FK}",
-    "derived" : [ "WEEK_BEG_DT" ]
-  }, {
-    "name" : "CATEGORY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "{FK}",
-    "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ]
-  }, {
-    "name" : "CATEGORY_HIERARCHY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "META_CATEG_NAME",
-    "derived" : null
-  }, {
-    "name" : "CATEGORY_HIERARCHY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "CATEG_LVL2_NAME",
-    "derived" : null
-  }, {
-    "name" : "CATEGORY_HIERARCHY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "CATEG_LVL3_NAME",
-    "derived" : null
-  }, {
-    "name" : "LSTG_FORMAT_NAME",
-    "table" : "DEFAULT.TEST_KYLIN_FACT",
-    "column" : "LSTG_FORMAT_NAME",
-    "derived" : null
-  }, {
-    "name" : "SITE_ID",
-    "table" : "EDW.TEST_SITES",
-    "column" : "{FK}",
-    "derived" : [ "SITE_NAME", "CRE_USER" ]
-  }, {
-    "name" : "SELLER_TYPE_CD",
-    "table" : "EDW.TEST_SELLER_TYPE_DIM",
-    "column" : "{FK}",
-    "derived" : [ "SELLER_TYPE_DESC" ]
-  } ],
-  "measures" : [ {
-    "name" : "GMV_SUM",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
-      },
-      "returntype" : "decimal(19,4)"
+  "uuid": "9876b7a8-3929-4dff-b59d-2100aadc8dbf",
+  "name": "test_kylin_cube_with_view_inner_join_desc",
+  "description": null,
+  "dimensions": [
+    {
+      "name": "CAL_DT",
+      "table": "EDW.V_TEST_CAL_DT",
+      "column": "{FK}",
+      "derived": [
+        "WEEK_BEG_DT"
+      ]
+    },
+    {
+      "name": "CATEGORY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "{FK}",
+      "derived": [
+        "USER_DEFINED_FIELD1",
+        "USER_DEFINED_FIELD3",
+        "UPD_DATE",
+        "UPD_USER"
+      ]
+    },
+    {
+      "name": "CATEGORY_HIERARCHY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "META_CATEG_NAME",
+      "derived": null
+    },
+    {
+      "name": "CATEGORY_HIERARCHY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "CATEG_LVL2_NAME",
+      "derived": null
+    },
+    {
+      "name": "CATEGORY_HIERARCHY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "CATEG_LVL3_NAME",
+      "derived": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "GMV_MIN",
-    "function" : {
-      "expression" : "MIN",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
+    {
+      "name": "LSTG_FORMAT_NAME",
+      "table": "DEFAULT.TEST_KYLIN_FACT",
+      "column": "LSTG_FORMAT_NAME",
+      "derived": null
+    },
+    {
+      "name": "SITE_ID",
+      "table": "EDW.TEST_SITES",
+      "column": "{FK}",
+      "derived": [
+        "SITE_NAME",
+        "CRE_USER"
+      ]
+    },
+    {
+      "name": "SELLER_TYPE_CD",
+      "table": "EDW.TEST_SELLER_TYPE_DIM",
+      "column": "{FK}",
+      "derived": [
+        "SELLER_TYPE_DESC"
+      ]
+    }
+  ],
+  "measures": [
+    {
+      "name": "GMV_SUM",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,4)"
       },
-      "returntype" : "decimal(19,4)"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "GMV_MAX",
-    "function" : {
-      "expression" : "MAX",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
+    {
+      "name": "GMV_MIN",
+      "function": {
+        "expression": "MIN",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,4)"
       },
-      "returntype" : "decimal(19,4)"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "TRANS_CNT",
-    "function" : {
-      "expression" : "COUNT",
-      "parameter" : {
-        "type" : "constant",
-        "value" : "1",
-        "next_parameter" : null
+    {
+      "name": "GMV_MAX",
+      "function": {
+        "expression": "MAX",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,4)"
       },
-      "returntype" : "bigint"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "ITEM_COUNT_SUM",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "ITEM_COUNT",
-        "next_parameter" : null
+    {
+      "name": "TRANS_CNT",
+      "function": {
+        "expression": "COUNT",
+        "parameter": {
+          "type": "constant",
+          "value": "1",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
       },
-      "returntype" : "bigint"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }],
-  "rowkey" : {
-    "rowkey_columns" : [ {
-      "column" : "cal_dt",
-      "encoding" : "dict"
-    }, {
-      "column" : "leaf_categ_id",
-      "encoding" : "dict"
-    }, {
-      "column" : "meta_categ_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "categ_lvl2_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "categ_lvl3_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "lstg_format_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "lstg_site_id",
-      "encoding" : "dict"
-    }, {
-      "column" : "slr_segment_cd",
-      "encoding" : "dict"
-    } ]
+    {
+      "name": "ITEM_COUNT_SUM",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "ITEM_COUNT",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
+      },
+      "dependent_measure_ref": null
+    }
+  ],
+  "rowkey": {
+    "rowkey_columns": [
+      {
+        "column": "cal_dt",
+        "encoding": "dict"
+      },
+      {
+        "column": "leaf_categ_id",
+        "encoding": "dict"
+      },
+      {
+        "column": "meta_categ_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "categ_lvl2_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "categ_lvl3_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "lstg_format_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "lstg_site_id",
+        "encoding": "dict"
+      },
+      {
+        "column": "slr_segment_cd",
+        "encoding": "dict"
+      }
+    ]
   },
-  "signature" : null,
-  "last_modified" : 1448959801311,
-  "model_name" : "test_kylin_inner_join_view_model_desc",
-  "null_string" : null,
-  "hbase_mapping" : {
-    "column_family" : [ {
-      "name" : "f1",
-      "columns" : [ {
-        "qualifier" : "m",
-        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "item_count_sum" ]
-      } ]
-    }]
+  "signature": null,
+  "last_modified": 1448959801311,
+  "model_name": "test_kylin_inner_join_view_model_desc",
+  "null_string": null,
+  "hbase_mapping": {
+    "column_family": [
+      {
+        "name": "f1",
+        "columns": [
+          {
+            "qualifier": "m",
+            "measure_refs": [
+              "gmv_sum",
+              "gmv_min",
+              "gmv_max",
+              "trans_cnt",
+              "item_count_sum"
+            ]
+          }
+        ]
+      }
+    ]
   },
-  "aggregation_groups" : [ {
-    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "lstg_format_name", "lstg_site_id", "meta_categ_name"],
-    "select_rule" : {
-      "hierarchy_dims" : [ ],
-      "mandatory_dims" : [ "cal_dt" ],
-      "joint_dims" : [ [ "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ] ]
-    }
-  }, {
-    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ],
-    "select_rule" : {
-      "hierarchy_dims" : [ [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] ],
-      "mandatory_dims" : [ "cal_dt" ],
-      "joint_dims" : [ ]
+  "aggregation_groups": [
+    {
+      "includes": [
+        "cal_dt",
+        "categ_lvl2_name",
+        "categ_lvl3_name",
+        "leaf_categ_id",
+        "lstg_format_name",
+        "lstg_site_id",
+        "meta_categ_name"
+      ],
+      "select_rule": {
+        "hierarchy_dims": [],
+        "mandatory_dims": [
+          "cal_dt"
+        ],
+        "joint_dims": [
+          [
+            "categ_lvl2_name",
+            "categ_lvl3_name",
+            "leaf_categ_id",
+            "meta_categ_name"
+          ]
+        ]
+      }
+    },
+    {
+      "includes": [
+        "cal_dt",
+        "categ_lvl2_name",
+        "categ_lvl3_name",
+        "leaf_categ_id",
+        "meta_categ_name"
+      ],
+      "select_rule": {
+        "hierarchy_dims": [
+          [
+            "META_CATEG_NAME",
+            "CATEG_LVL2_NAME",
+            "CATEG_LVL3_NAME"
+          ]
+        ],
+        "mandatory_dims": [
+          "cal_dt"
+        ],
+        "joint_dims": []
+      }
     }
-  } ],
-  "notify_list" : null,
-  "status_need_notify" : [ ],
-  "auto_merge_time_ranges" : null,
-  "retention_range" : 0,
-  "engine_type" : 2,
-  "storage_type" : 2,
+  ],
+  "notify_list": null,
+  "status_need_notify": [],
+  "auto_merge_time_ranges": null,
+  "retention_range": 0,
+  "engine_type": 2,
+  "storage_type": 2,
   "partition_date_start": 0
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/cdebd569/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json
index 0388c0e..b17fbff 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_view_left_join_desc.json
@@ -1,169 +1,249 @@
 {
-  "uuid" : "6789b7a8-3929-4dff-b59d-2100aadc8dbf",
-  "name" : "test_kylin_cube_with_view_left_join_desc",
-  "description" : null,
-  "dimensions" : [ {
-    "name" : "CAL_DT",
-    "table" : "EDW.V_TEST_CAL_DT",
-    "column" : "{FK}",
-    "derived" : [ "WEEK_BEG_DT" ]
-  }, {
-    "name" : "CATEGORY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "{FK}",
-    "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ]
-  }, {
-    "name" : "CATEGORY_HIERARCHY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "META_CATEG_NAME",
-    "derived" : null
-  }, {
-    "name" : "CATEGORY_HIERARCHY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "CATEG_LVL2_NAME",
-    "derived" : null
-  }, {
-    "name" : "CATEGORY_HIERARCHY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "CATEG_LVL3_NAME",
-    "derived" : null
-  }, {
-    "name" : "LSTG_FORMAT_NAME",
-    "table" : "DEFAULT.TEST_KYLIN_FACT",
-    "column" : "LSTG_FORMAT_NAME",
-    "derived" : null
-  }, {
-    "name" : "SITE_ID",
-    "table" : "EDW.TEST_SITES",
-    "column" : "{FK}",
-    "derived" : [ "SITE_NAME", "CRE_USER" ]
-  }, {
-    "name" : "SELLER_TYPE_CD",
-    "table" : "EDW.TEST_SELLER_TYPE_DIM",
-    "column" : "{FK}",
-    "derived" : [ "SELLER_TYPE_DESC" ]
-  } ],
-  "measures" : [ {
-    "name" : "GMV_SUM",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
-      },
-      "returntype" : "decimal(19,4)"
+  "uuid": "6789b7a8-3929-4dff-b59d-2100aadc8dbf",
+  "name": "test_kylin_cube_with_view_left_join_desc",
+  "description": null,
+  "dimensions": [
+    {
+      "name": "CAL_DT",
+      "table": "EDW.V_TEST_CAL_DT",
+      "column": "{FK}",
+      "derived": [
+        "WEEK_BEG_DT"
+      ]
+    },
+    {
+      "name": "CATEGORY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "{FK}",
+      "derived": [
+        "USER_DEFINED_FIELD1",
+        "USER_DEFINED_FIELD3",
+        "UPD_DATE",
+        "UPD_USER"
+      ]
+    },
+    {
+      "name": "CATEGORY_HIERARCHY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "META_CATEG_NAME",
+      "derived": null
+    },
+    {
+      "name": "CATEGORY_HIERARCHY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "CATEG_LVL2_NAME",
+      "derived": null
+    },
+    {
+      "name": "CATEGORY_HIERARCHY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "CATEG_LVL3_NAME",
+      "derived": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "GMV_MIN",
-    "function" : {
-      "expression" : "MIN",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
+    {
+      "name": "LSTG_FORMAT_NAME",
+      "table": "DEFAULT.TEST_KYLIN_FACT",
+      "column": "LSTG_FORMAT_NAME",
+      "derived": null
+    },
+    {
+      "name": "SITE_ID",
+      "table": "EDW.TEST_SITES",
+      "column": "{FK}",
+      "derived": [
+        "SITE_NAME",
+        "CRE_USER"
+      ]
+    },
+    {
+      "name": "SELLER_TYPE_CD",
+      "table": "EDW.TEST_SELLER_TYPE_DIM",
+      "column": "{FK}",
+      "derived": [
+        "SELLER_TYPE_DESC"
+      ]
+    }
+  ],
+  "measures": [
+    {
+      "name": "GMV_SUM",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,4)"
       },
-      "returntype" : "decimal(19,4)"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "GMV_MAX",
-    "function" : {
-      "expression" : "MAX",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
+    {
+      "name": "GMV_MIN",
+      "function": {
+        "expression": "MIN",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,4)"
       },
-      "returntype" : "decimal(19,4)"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "TRANS_CNT",
-    "function" : {
-      "expression" : "COUNT",
-      "parameter" : {
-        "type" : "constant",
-        "value" : "1",
-        "next_parameter" : null
+    {
+      "name": "GMV_MAX",
+      "function": {
+        "expression": "MAX",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,4)"
       },
-      "returntype" : "bigint"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "ITEM_COUNT_SUM",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "ITEM_COUNT",
-        "next_parameter" : null
+    {
+      "name": "TRANS_CNT",
+      "function": {
+        "expression": "COUNT",
+        "parameter": {
+          "type": "constant",
+          "value": "1",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
       },
-      "returntype" : "bigint"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }],
-  "rowkey" : {
-    "rowkey_columns" : [ {
-      "column" : "cal_dt",
-      "encoding" : "dict"
-    }, {
-      "column" : "leaf_categ_id",
-      "encoding" : "dict"
-    }, {
-      "column" : "meta_categ_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "categ_lvl2_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "categ_lvl3_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "lstg_format_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "lstg_site_id",
-      "encoding" : "dict"
-    }, {
-      "column" : "slr_segment_cd",
-      "encoding" : "dict"
-    } ]
+    {
+      "name": "ITEM_COUNT_SUM",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "ITEM_COUNT",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
+      },
+      "dependent_measure_ref": null
+    }
+  ],
+  "rowkey": {
+    "rowkey_columns": [
+      {
+        "column": "cal_dt",
+        "encoding": "dict"
+      },
+      {
+        "column": "leaf_categ_id",
+        "encoding": "dict"
+      },
+      {
+        "column": "meta_categ_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "categ_lvl2_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "categ_lvl3_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "lstg_format_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "lstg_site_id",
+        "encoding": "dict"
+      },
+      {
+        "column": "slr_segment_cd",
+        "encoding": "dict"
+      }
+    ]
   },
-  "signature" : null,
-  "last_modified" : 1448959801311,
-  "model_name" : "test_kylin_left_join_view_model_desc",
-  "null_string" : null,
-  "hbase_mapping" : {
-    "column_family" : [ {
-      "name" : "f1",
-      "columns" : [ {
-        "qualifier" : "m",
-        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "item_count_sum" ]
-      } ]
-    }]
+  "signature": null,
+  "last_modified": 1448959801311,
+  "model_name": "test_kylin_left_join_view_model_desc",
+  "null_string": null,
+  "hbase_mapping": {
+    "column_family": [
+      {
+        "name": "f1",
+        "columns": [
+          {
+            "qualifier": "m",
+            "measure_refs": [
+              "gmv_sum",
+              "gmv_min",
+              "gmv_max",
+              "trans_cnt",
+              "item_count_sum"
+            ]
+          }
+        ]
+      }
+    ]
   },
-  "aggregation_groups" : [ {
-    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "lstg_format_name", "lstg_site_id", "meta_categ_name"],
-    "select_rule" : {
-      "hierarchy_dims" : [ ],
-      "mandatory_dims" : [ "cal_dt" ],
-      "joint_dims" : [ [ "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ] ]
-    }
-  }, {
-    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ],
-    "select_rule" : {
-      "hierarchy_dims" : [ [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] ],
-      "mandatory_dims" : [ "cal_dt" ],
-      "joint_dims" : [ ]
+  "aggregation_groups": [
+    {
+      "includes": [
+        "cal_dt",
+        "categ_lvl2_name",
+        "categ_lvl3_name",
+        "leaf_categ_id",
+        "lstg_format_name",
+        "lstg_site_id",
+        "meta_categ_name"
+      ],
+      "select_rule": {
+        "hierarchy_dims": [],
+        "mandatory_dims": [
+          "cal_dt"
+        ],
+        "joint_dims": [
+          [
+            "categ_lvl2_name",
+            "categ_lvl3_name",
+            "leaf_categ_id",
+            "meta_categ_name"
+          ]
+        ]
+      }
+    },
+    {
+      "includes": [
+        "cal_dt",
+        "categ_lvl2_name",
+        "categ_lvl3_name",
+        "leaf_categ_id",
+        "meta_categ_name"
+      ],
+      "select_rule": {
+        "hierarchy_dims": [
+          [
+            "META_CATEG_NAME",
+            "CATEG_LVL2_NAME",
+            "CATEG_LVL3_NAME"
+          ]
+        ],
+        "mandatory_dims": [
+          "cal_dt"
+        ],
+        "joint_dims": []
+      }
     }
-  } ],
-  "notify_list" : null,
-  "status_need_notify" : [ ],
-  "auto_merge_time_ranges" : null,
-  "retention_range" : 0,
-  "engine_type" : 2,
-  "storage_type" : 2,
+  ],
+  "notify_list": null,
+  "status_need_notify": [],
+  "auto_merge_time_ranges": null,
+  "retention_range": 0,
+  "engine_type": 2,
+  "storage_type": 2,
   "partition_date_start": 0
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/cdebd569/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
index 28328e4..7de2ae2 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
@@ -1,5 +1,4 @@
 {
- 
   "uuid": "9ac9b7a8-3929-4dff-b59d-2100aadc8dbf",
   "name": "test_kylin_cube_without_slr_desc",
   "description": null,
@@ -160,54 +159,19 @@
         "returntype": "extendedcolumn(100)"
       },
       "dependent_measure_ref": null
-    }, {
-      "name" : "CAL_DT_RAW",
-      "function" : {
-        "expression" : "RAW",
-        "parameter" : {
-          "type" : "column",
-          "value" : "CAL_DT",
-          "next_parameter" : null
-        },
-        "returntype" : "raw"
-      },
-      "dependent_measure_ref" : null
-    }, {
-      "name" : "LSTG_FORMAT_NAME_RAW",
-      "function" : {
-        "expression" : "RAW",
-        "parameter" : {
-          "type" : "column",
-          "value" : "LSTG_FORMAT_NAME",
-          "next_parameter" : null
-        },
-        "returntype" : "raw"
-      },
-      "dependent_measure_ref" : null
-    }, {
-      "name" : "LEAF_CATEG_ID_RAW",
-      "function" : {
-        "expression" : "RAW",
-        "parameter" : {
-          "type" : "column",
-          "value" : "LEAF_CATEG_ID",
-          "next_parameter" : null
-        },
-        "returntype" : "raw"
-      },
-      "dependent_measure_ref" : null
-    }, {
-      "name" : "PRICE_RAW",
-      "function" : {
-        "expression" : "RAW",
-        "parameter" : {
-          "type" : "column",
-          "value" : "PRICE",
-          "next_parameter" : null
+    },
+    {
+      "name": "PRICE_RAW",
+      "function": {
+        "expression": "RAW",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
         },
-        "returntype" : "raw"
+        "returntype": "raw"
       },
-      "dependent_measure_ref" : null
+      "dependent_measure_ref": null
     }
   ],
   "rowkey": {

http://git-wip-us.apache.org/repos/asf/kylin/blob/cdebd569/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
index 0470dc6..3b123c4 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
@@ -1,293 +1,360 @@
 {
-  "uuid" : "9ac9b7a8-3929-4dff-b59d-2100aadc8dbf",
-  "name" : "test_kylin_cube_without_slr_left_join_desc",
-  "description" : null,
-  "dimensions" : [ {
-    "name" : "CAL_DT",
-    "table" : "EDW.TEST_CAL_DT",
-    "column" : "{FK}",
-    "derived" : [ "WEEK_BEG_DT" ]
-  }, {
-    "name" : "CATEGORY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "{FK}",
-    "derived" : [ "USER_DEFINED_FIELD1", "USER_DEFINED_FIELD3", "UPD_DATE", "UPD_USER" ]
-  }, {
-    "name" : "CATEGORY_HIERARCHY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "META_CATEG_NAME",
-    "derived" : null
-  }, {
-    "name" : "CATEGORY_HIERARCHY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "CATEG_LVL2_NAME",
-    "derived" : null
-  }, {
-    "name" : "CATEGORY_HIERARCHY",
-    "table" : "DEFAULT.TEST_CATEGORY_GROUPINGS",
-    "column" : "CATEG_LVL3_NAME",
-    "derived" : null
-  }, {
-    "name" : "LSTG_FORMAT_NAME",
-    "table" : "DEFAULT.TEST_KYLIN_FACT",
-    "column" : "LSTG_FORMAT_NAME",
-    "derived" : null
-  }, {
-    "name" : "SITE_ID",
-    "table" : "EDW.TEST_SITES",
-    "column" : "{FK}",
-    "derived" : [ "SITE_NAME", "CRE_USER" ]
-  }, {
-    "name" : "SELLER_TYPE_CD",
-    "table" : "EDW.TEST_SELLER_TYPE_DIM",
-    "column" : "{FK}",
-    "derived" : [ "SELLER_TYPE_DESC" ]
-  } ],
-  "measures" : [ {
-    "name" : "GMV_SUM",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
-      },
-      "returntype" : "decimal(19,4)"
+  "uuid": "9ac9b7a8-3929-4dff-b59d-2100aadc8dbf",
+  "name": "test_kylin_cube_without_slr_left_join_desc",
+  "description": null,
+  "dimensions": [
+    {
+      "name": "CAL_DT",
+      "table": "EDW.TEST_CAL_DT",
+      "column": "{FK}",
+      "derived": [
+        "WEEK_BEG_DT"
+      ]
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "GMV_MIN",
-    "function" : {
-      "expression" : "MIN",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
-      },
-      "returntype" : "decimal(19,4)"
+    {
+      "name": "CATEGORY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "{FK}",
+      "derived": [
+        "USER_DEFINED_FIELD1",
+        "USER_DEFINED_FIELD3",
+        "UPD_DATE",
+        "UPD_USER"
+      ]
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "GMV_MAX",
-    "function" : {
-      "expression" : "MAX",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
-      },
-      "returntype" : "decimal(19,4)"
+    {
+      "name": "CATEGORY_HIERARCHY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "META_CATEG_NAME",
+      "derived": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "TRANS_CNT",
-    "function" : {
-      "expression" : "COUNT",
-      "parameter" : {
-        "type" : "constant",
-        "value" : "1",
-        "next_parameter" : null
-      },
-      "returntype" : "bigint"
+    {
+      "name": "CATEGORY_HIERARCHY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "CATEG_LVL2_NAME",
+      "derived": null
+    },
+    {
+      "name": "CATEGORY_HIERARCHY",
+      "table": "DEFAULT.TEST_CATEGORY_GROUPINGS",
+      "column": "CATEG_LVL3_NAME",
+      "derived": null
+    },
+    {
+      "name": "LSTG_FORMAT_NAME",
+      "table": "DEFAULT.TEST_KYLIN_FACT",
+      "column": "LSTG_FORMAT_NAME",
+      "derived": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "ITEM_COUNT_SUM",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "ITEM_COUNT",
-        "next_parameter" : null
+    {
+      "name": "SITE_ID",
+      "table": "EDW.TEST_SITES",
+      "column": "{FK}",
+      "derived": [
+        "SITE_NAME",
+        "CRE_USER"
+      ]
+    },
+    {
+      "name": "SELLER_TYPE_CD",
+      "table": "EDW.TEST_SELLER_TYPE_DIM",
+      "column": "{FK}",
+      "derived": [
+        "SELLER_TYPE_DESC"
+      ]
+    }
+  ],
+  "measures": [
+    {
+      "name": "GMV_SUM",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,4)"
       },
-      "returntype" : "bigint"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "SELLER_CNT_BITMAP",
-    "function" : {
-      "expression" : "COUNT_DISTINCT",
-      "parameter" : {
-        "type" : "column",
-        "value" : "SELLER_ID",
-        "next_parameter" : null
+    {
+      "name": "GMV_MIN",
+      "function": {
+        "expression": "MIN",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,4)"
       },
-      "returntype" : "bitmap"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "SITE_NAME_BITMAP",
-    "function" : {
-      "expression" : "COUNT_DISTINCT",
-      "parameter" : {
-        "type" : "column",
-        "value" : "SITE_NAME",
-        "next_parameter" : null
+    {
+      "name": "GMV_MAX",
+      "function": {
+        "expression": "MAX",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,4)"
       },
-      "returntype" : "bitmap"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "SELLER_FORMAT_CNT",
-    "function" : {
-      "expression" : "COUNT_DISTINCT",
-      "parameter" : {
-        "type" : "column",
-        "value" : "LSTG_FORMAT_NAME",
-        "next_parameter" : {
-          "type" : "column",
-          "value" : "SELLER_ID",
-          "next_parameter" : null
-        }
+    {
+      "name": "TRANS_CNT",
+      "function": {
+        "expression": "COUNT",
+        "parameter": {
+          "type": "constant",
+          "value": "1",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
       },
-      "returntype" : "hllc(10)"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "TOP_SELLER",
-    "function" : {
-      "expression" : "TOP_N",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : {
-          "type" : "column",
-          "value" : "SELLER_ID",
-          "next_parameter" : null
-        }
+    {
+      "name": "ITEM_COUNT_SUM",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "ITEM_COUNT",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
       },
-      "returntype" : "topn(100)",
-      "configuration": {"topn.encoding.SELLER_ID" : "int:4"}
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "CAL_DT_RAW",
-    "function" : {
-      "expression" : "RAW",
-      "parameter" : {
-        "type" : "column",
-        "value" : "CAL_DT",
-        "next_parameter" : null
+    {
+      "name": "SELLER_CNT_BITMAP",
+      "function": {
+        "expression": "COUNT_DISTINCT",
+        "parameter": {
+          "type": "column",
+          "value": "SELLER_ID",
+          "next_parameter": null
+        },
+        "returntype": "bitmap"
       },
-      "returntype" : "raw"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "LSTG_FORMAT_NAME_RAW",
-    "function" : {
-      "expression" : "RAW",
-      "parameter" : {
-        "type" : "column",
-        "value" : "LSTG_FORMAT_NAME",
-        "next_parameter" : null
+    {
+      "name": "SITE_NAME_BITMAP",
+      "function": {
+        "expression": "COUNT_DISTINCT",
+        "parameter": {
+          "type": "column",
+          "value": "SITE_NAME",
+          "next_parameter": null
+        },
+        "returntype": "bitmap"
       },
-      "returntype" : "raw"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "LEAF_CATEG_ID_RAW",
-    "function" : {
-      "expression" : "RAW",
-      "parameter" : {
-        "type" : "column",
-        "value" : "LEAF_CATEG_ID",
-        "next_parameter" : null
+    {
+      "name": "SELLER_FORMAT_CNT",
+      "function": {
+        "expression": "COUNT_DISTINCT",
+        "parameter": {
+          "type": "column",
+          "value": "LSTG_FORMAT_NAME",
+          "next_parameter": {
+            "type": "column",
+            "value": "SELLER_ID",
+            "next_parameter": null
+          }
+        },
+        "returntype": "hllc(10)"
       },
-      "returntype" : "raw"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "PRICE_RAW",
-    "function" : {
-      "expression" : "RAW",
-      "parameter" : {
-        "type" : "column",
-        "value" : "PRICE",
-        "next_parameter" : null
+    {
+      "name": "TOP_SELLER",
+      "function": {
+        "expression": "TOP_N",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": {
+            "type": "column",
+            "value": "SELLER_ID",
+            "next_parameter": null
+          }
+        },
+        "returntype": "topn(100)",
+        "configuration": {
+          "topn.encoding.SELLER_ID": "int:4"
+        }
       },
-      "returntype" : "raw"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  } ],
-  "dictionaries" : [
     {
-      "column" : "SITE_NAME",
+      "name": "PRICE_RAW",
+      "function": {
+        "expression": "RAW",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "next_parameter": null
+        },
+        "returntype": "raw"
+      },
+      "dependent_measure_ref": null
+    }
+  ],
+  "dictionaries": [
+    {
+      "column": "SITE_NAME",
       "builder": "org.apache.kylin.dict.GlobalDictionaryBuilder"
     }
   ],
-  "rowkey" : {
-    "rowkey_columns" : [ {
-      "column" : "cal_dt",
-      "encoding" : "dict"
-    }, {
-      "column" : "leaf_categ_id",
-      "encoding" : "dict"
-    }, {
-      "column" : "meta_categ_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "categ_lvl2_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "categ_lvl3_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "lstg_format_name",
-      "encoding" : "dict"
-    }, {
-      "column" : "lstg_site_id",
-      "encoding" : "dict"
-    }, {
-      "column" : "slr_segment_cd",
-      "encoding" : "dict"
-    } ]
+  "rowkey": {
+    "rowkey_columns": [
+      {
+        "column": "cal_dt",
+        "encoding": "dict"
+      },
+      {
+        "column": "leaf_categ_id",
+        "encoding": "dict"
+      },
+      {
+        "column": "meta_categ_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "categ_lvl2_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "categ_lvl3_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "lstg_format_name",
+        "encoding": "dict"
+      },
+      {
+        "column": "lstg_site_id",
+        "encoding": "dict"
+      },
+      {
+        "column": "slr_segment_cd",
+        "encoding": "dict"
+      }
+    ]
   },
-  "signature" : null,
-  "last_modified" : 1448959801311,
-  "model_name" : "test_kylin_left_join_model_desc",
-  "null_string" : null,
-  "hbase_mapping" : {
-    "column_family" : [ {
-      "name" : "f1",
-      "columns" : [ {
-        "qualifier" : "m",
-        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "item_count_sum", "CAL_DT_RAW", "LSTG_FORMAT_NAME_RAW", "LEAF_CATEG_ID_RAW", "PRICE_RAW" ]
-      } ]
-    }, {
-      "name" : "f2",
-      "columns" : [ {
-        "qualifier" : "m",
-        "measure_refs" : [ "seller_cnt_bitmap", "site_name_bitmap", "seller_format_cnt"]
-      } ]
-    }, {
-      "name" : "f3",
-      "columns" : [ {
-        "qualifier" : "m",
-        "measure_refs" : [ "top_seller" ]
-      } ]
-    } ]
+  "signature": null,
+  "last_modified": 1448959801311,
+  "model_name": "test_kylin_left_join_model_desc",
+  "null_string": null,
+  "hbase_mapping": {
+    "column_family": [
+      {
+        "name": "f1",
+        "columns": [
+          {
+            "qualifier": "m",
+            "measure_refs": [
+              "gmv_sum",
+              "gmv_min",
+              "gmv_max",
+              "trans_cnt",
+              "item_count_sum",
+              "CAL_DT_RAW",
+              "LSTG_FORMAT_NAME_RAW",
+              "LEAF_CATEG_ID_RAW",
+              "PRICE_RAW"
+            ]
+          }
+        ]
+      },
+      {
+        "name": "f2",
+        "columns": [
+          {
+            "qualifier": "m",
+            "measure_refs": [
+              "seller_cnt_bitmap",
+              "site_name_bitmap",
+              "seller_format_cnt"
+            ]
+          }
+        ]
+      },
+      {
+        "name": "f3",
+        "columns": [
+          {
+            "qualifier": "m",
+            "measure_refs": [
+              "top_seller"
+            ]
+          }
+        ]
+      }
+    ]
   },
-  "aggregation_groups" : [ {
-    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "lstg_format_name", "lstg_site_id", "meta_categ_name"],
-    "select_rule" : {
-      "hierarchy_dims" : [ ],
-      "mandatory_dims" : [ "cal_dt" ],
-      "joint_dims" : [ [ "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ] ]
-    }
-  }, {
-    "includes" : [ "cal_dt", "categ_lvl2_name", "categ_lvl3_name", "leaf_categ_id", "meta_categ_name" ],
-    "select_rule" : {
-      "hierarchy_dims" : [ [ "META_CATEG_NAME", "CATEG_LVL2_NAME", "CATEG_LVL3_NAME" ] ],
-      "mandatory_dims" : [ "cal_dt" ],
-      "joint_dims" : [ ]
+  "aggregation_groups": [
+    {
+      "includes": [
+        "cal_dt",
+        "categ_lvl2_name",
+        "categ_lvl3_name",
+        "leaf_categ_id",
+        "lstg_format_name",
+        "lstg_site_id",
+        "meta_categ_name"
+      ],
+      "select_rule": {
+        "hierarchy_dims": [],
+        "mandatory_dims": [
+          "cal_dt"
+        ],
+        "joint_dims": [
+          [
+            "categ_lvl2_name",
+            "categ_lvl3_name",
+            "leaf_categ_id",
+            "meta_categ_name"
+          ]
+        ]
+      }
+    },
+    {
+      "includes": [
+        "cal_dt",
+        "categ_lvl2_name",
+        "categ_lvl3_name",
+        "leaf_categ_id",
+        "meta_categ_name"
+      ],
+      "select_rule": {
+        "hierarchy_dims": [
+          [
+            "META_CATEG_NAME",
+            "CATEG_LVL2_NAME",
+            "CATEG_LVL3_NAME"
+          ]
+        ],
+        "mandatory_dims": [
+          "cal_dt"
+        ],
+        "joint_dims": []
+      }
     }
-  } ],
-  "notify_list" : null,
-  "status_need_notify" : [ ],
-  "auto_merge_time_ranges" : null,
-  "retention_range" : 0,
-  "engine_type" : 2,
-  "storage_type" : 2,
+  ],
+  "notify_list": null,
+  "status_need_notify": [],
+  "auto_merge_time_ranges": null,
+  "retention_range": 0,
+  "engine_type": 2,
+  "storage_type": 2,
   "override_kylin_properties": {
     "kylin.job.cubing.inmem.sampling.hll.precision": "16",
     "kylin.hive.create.flat.table.method": "2"

http://git-wip-us.apache.org/repos/asf/kylin/blob/cdebd569/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json b/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
index ef10c1e..f2c4e72 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
@@ -1,118 +1,155 @@
 {
-  "uuid" : "901ed15e-7769-4c66-b7ae-fbdc971cd192",
- 
-  "name" : "test_streaming_table_cube_desc",
-  "description" : "",
-  "dimensions" : [ {
-    "name" : "DEFAULT.STREAMING_TABLE.SITE",
-    "table" : "DEFAULT.STREAMING_TABLE",
-    "column" : "SITE",
-    "derived" : null
-  }, {
-    "name" : "DEFAULT.STREAMING_TABLE.ITM",
-    "table" : "DEFAULT.STREAMING_TABLE",
-    "column" : "ITM",
-    "derived" : null
-  }, {
-    "name" : "TIME",
-    "table" : "DEFAULT.STREAMING_TABLE",
-    "column" : "DAY_START",
-    "derived" : null
-  }, {
-    "name" : "TIME",
-    "table" : "DEFAULT.STREAMING_TABLE",
-    "column" : "HOUR_START",
-    "derived" : null
-  }, {
-    "name" : "TIME",
-    "table" : "DEFAULT.STREAMING_TABLE",
-    "column" : "MINUTE_START",
-    "derived" : null
-  } ],
-  "measures" : [ {
-    "name" : "_COUNT_",
-    "function" : {
-      "expression" : "COUNT",
-      "parameter" : {
-        "type" : "constant",
-        "value" : "1",
-        "next_parameter" : null
-      },
-      "returntype" : "bigint"
+  "uuid": "901ed15e-7769-4c66-b7ae-fbdc971cd192",
+  "name": "test_streaming_table_cube_desc",
+  "description": "",
+  "dimensions": [
+    {
+      "name": "DEFAULT.STREAMING_TABLE.SITE",
+      "table": "DEFAULT.STREAMING_TABLE",
+      "column": "SITE",
+      "derived": null
+    },
+    {
+      "name": "DEFAULT.STREAMING_TABLE.ITM",
+      "table": "DEFAULT.STREAMING_TABLE",
+      "column": "ITM",
+      "derived": null
+    },
+    {
+      "name": "TIME",
+      "table": "DEFAULT.STREAMING_TABLE",
+      "column": "DAY_START",
+      "derived": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "GMV_SUM",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "GMV",
-        "next_parameter" : null
+    {
+      "name": "TIME",
+      "table": "DEFAULT.STREAMING_TABLE",
+      "column": "HOUR_START",
+      "derived": null
+    },
+    {
+      "name": "TIME",
+      "table": "DEFAULT.STREAMING_TABLE",
+      "column": "MINUTE_START",
+      "derived": null
+    }
+  ],
+  "measures": [
+    {
+      "name": "_COUNT_",
+      "function": {
+        "expression": "COUNT",
+        "parameter": {
+          "type": "constant",
+          "value": "1",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
       },
-      "returntype" : "decimal(19,6)"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  }, {
-    "name" : "ITEM_COUNT_SUM",
-    "function" : {
-      "expression" : "SUM",
-      "parameter" : {
-        "type" : "column",
-        "value" : "ITEM_COUNT",
-        "next_parameter" : null
+    {
+      "name": "GMV_SUM",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "GMV",
+          "next_parameter": null
+        },
+        "returntype": "decimal(19,6)"
       },
-      "returntype" : "bigint"
+      "dependent_measure_ref": null
     },
-    "dependent_measure_ref" : null
-  } ],
-  "rowkey" : {
-    "rowkey_columns" : [ {
-      "column" : "DAY_START",
-      "encoding" : "dict"
-    }, {
-      "column" : "HOUR_START",
-      "encoding" : "dict"
-    }, {
-      "column" : "MINUTE_START",
-      "encoding" : "dict"
-    }, {
-      "column" : "SITE",
-      "encoding" : "dict"
-    }, {
-      "column" : "ITM",
-      "encoding" : "dict"
-    } ]
+    {
+      "name": "ITEM_COUNT_SUM",
+      "function": {
+        "expression": "SUM",
+        "parameter": {
+          "type": "column",
+          "value": "ITEM_COUNT",
+          "next_parameter": null
+        },
+        "returntype": "bigint"
+      },
+      "dependent_measure_ref": null
+    }
+  ],
+  "rowkey": {
+    "rowkey_columns": [
+      {
+        "column": "DAY_START",
+        "encoding": "dict"
+      },
+      {
+        "column": "HOUR_START",
+        "encoding": "dict"
+      },
+      {
+        "column": "MINUTE_START",
+        "encoding": "dict"
+      },
+      {
+        "column": "SITE",
+        "encoding": "dict"
+      },
+      {
+        "column": "ITM",
+        "encoding": "dict"
+      }
+    ]
   },
-  "signature" : null,
-  "last_modified" : 1448959801314,
-  "model_name" : "test_streaming_table_model_desc",
-  "null_string" : null,
-  "hbase_mapping" : {
-    "column_family" : [ {
-      "name" : "F1",
-      "columns" : [ {
-        "qualifier" : "M",
-        "measure_refs" : [ "_COUNT_", "GMV_SUM", "ITEM_COUNT_SUM" ]
-      } ]
-    } ]
+  "signature": null,
+  "last_modified": 1448959801314,
+  "model_name": "test_streaming_table_model_desc",
+  "null_string": null,
+  "hbase_mapping": {
+    "column_family": [
+      {
+        "name": "F1",
+        "columns": [
+          {
+            "qualifier": "M",
+            "measure_refs": [
+              "_COUNT_",
+              "GMV_SUM",
+              "ITEM_COUNT_SUM"
+            ]
+          }
+        ]
+      }
+    ]
   },
-  "aggregation_groups" : [ {
-    "includes" : [ "DAY_START", "HOUR_START", "ITM", "MINUTE_START", "SITE" ],
-    "select_rule" : {
-      "hierarchy_dims" : [ [ "DAY_START", "HOUR_START", "MINUTE_START" ] ],
-      "mandatory_dims" : [ ],
-      "joint_dims" : [ ]
+  "aggregation_groups": [
+    {
+      "includes": [
+        "DAY_START",
+        "HOUR_START",
+        "ITM",
+        "MINUTE_START",
+        "SITE"
+      ],
+      "select_rule": {
+        "hierarchy_dims": [
+          [
+            "DAY_START",
+            "HOUR_START",
+            "MINUTE_START"
+          ]
+        ],
+        "mandatory_dims": [],
+        "joint_dims": []
+      }
     }
-  } ],
+  ],
   "override_kylin_properties": {
     "kylin.cube.algorithm": "inmem"
   },
-  "notify_list" : [ ],
-  "status_need_notify" : [ ],
-  "auto_merge_time_ranges" : null,
-  "retention_range" : 0,
-  "engine_type" : 2,
-  "storage_type" : 2,
+  "notify_list": [],
+  "status_need_notify": [],
+  "auto_merge_time_ranges": null,
+  "retention_range": 0,
+  "engine_type": 2,
+  "storage_type": 2,
   "partition_date_start": 0
 }
\ No newline at end of file


[3/6] kylin git commit: KYLIN-1922 imporve CI

Posted by ma...@apache.org.
KYLIN-1922 imporve CI


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

Branch: refs/heads/1.5.4-rc1
Commit: 3acb5a0c4038567f349f6a121c192888a4a27677
Parents: f6d4eb2
Author: Hongbin Ma <ma...@apache.org>
Authored: Fri Sep 9 23:01:00 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Sat Sep 10 19:28:59 2016 +0800

----------------------------------------------------------------------
 .../apache/kylin/query/ITKylinQueryTest.java    | 22 ++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/3acb5a0c/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java b/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
index 5f6af7a..3411c91 100644
--- a/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
+++ b/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
@@ -44,6 +44,8 @@ import org.apache.kylin.storage.hbase.HBaseStorage;
 import org.apache.kylin.storage.hbase.cube.v1.coprocessor.observer.ObserverEnabler;
 import org.dbunit.database.DatabaseConnection;
 import org.dbunit.database.IDatabaseConnection;
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
@@ -119,6 +121,22 @@ public class ITKylinQueryTest extends KylinTestBase {
 
     @Test
     public void testTimeoutQuery() throws Exception {
+        thrown.expect(SQLException.class);
+
+        //should not break at table duplicate check, should fail at model duplicate check
+        thrown.expectCause(new BaseMatcher<Throwable>() {
+            @Override
+            public boolean matches(Object item) {
+                if (item instanceof GTScanSelfTerminatedException) {
+                    return true;
+                }
+                return false;
+            }
+
+            @Override
+            public void describeTo(Description description) {
+            }
+        });
 
         try {
 
@@ -133,10 +151,6 @@ public class ITKylinQueryTest extends KylinTestBase {
             RemoveBlackoutRealizationsRule.blackouts.add("CUBE[name=test_kylin_cube_without_slr_inner_join_empty]");
 
             execAndCompQuery(getQueryFolderPrefix() + "src/test/resources/query/sql_timeout", null, true);
-        } catch (SQLException e) {
-            if (!(e.getCause() instanceof GTScanSelfTerminatedException)) {
-                throw new RuntimeException();
-            }
         } finally {
 
             //these two cubes has RAW measure, will disturb limit push down


[6/6] kylin git commit: minor, fix CI

Posted by ma...@apache.org.
minor, fix CI


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

Branch: refs/heads/1.5.4-rc1
Commit: eefdc49742cf48e081b15d08e8eac60c70872057
Parents: a3fcefb
Author: Hongbin Ma <ma...@apache.org>
Authored: Sat Sep 10 19:26:29 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Sat Sep 10 19:29:23 2016 +0800

----------------------------------------------------------------------
 .../src/test/java/org/apache/kylin/query/ITKylinQueryTest.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/eefdc497/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java b/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
index 3411c91..de68c7a 100644
--- a/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
+++ b/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
@@ -121,6 +121,11 @@ public class ITKylinQueryTest extends KylinTestBase {
 
     @Test
     public void testTimeoutQuery() throws Exception {
+        if (HBaseStorage.overwriteStorageQuery != null) {
+            //v1 engine does not suit
+            return;
+        }
+
         thrown.expect(SQLException.class);
 
         //should not break at table duplicate check, should fail at model duplicate check