http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/dimtables/usertable.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/dimtables/usertable.xml 
b/lens-cube/src/test/resources/schema/dimtables/usertable.xml
new file mode 100644
index 0000000..055a958
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/dimtables/usertable.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_dimension_table dimension_name="userdim" table_name="usertable" 
weight="0.0" xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="id" _type="int" comment="id"/>
+    <column name="name" _type="string" comment="name"/>
+    <column name="age" _type="string" comment="age"/>
+    <column name="gender" _type="string" comment="gender"/>
+    <column name="user_id_added_in_past" _type="int" 
comment="user_id_added_in_past"/>
+    <column name="user_id_added_far_future" _type="int" 
comment="user_id_added_far_future"/>
+  </columns>
+  <properties>
+    <property name="dimtble.usertable.dim.name" value="userdim"/>
+    <property name="dimension.userdim.timed.dimension" value="dt"/>
+    <property name="dimtble.usertable.storages" value="C1,C2"/>
+    <property name="cube.table.usertable.weight" value="0.0"/>
+    <property name="dimtble.usertable.c2.dumpperiod" value="HOURLY"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods/>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols/>
+        <table_parameters>
+          <property name="totalSize" value="0"/>
+          <property name="numFiles" value="0"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>HOURLY</update_period>
+      </update_periods>
+      <storage_name>C2</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_dimension_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/dimtables/ziptable.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/dimtables/ziptable.xml 
b/lens-cube/src/test/resources/schema/dimtables/ziptable.xml
new file mode 100644
index 0000000..094031e
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/dimtables/ziptable.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_dimension_table dimension_name="zipdim" table_name="ziptable" weight="0.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="code" _type="int" comment="code"/>
+    <column name="f1" _type="string" comment="field1"/>
+    <column name="f2" _type="string" comment="field2"/>
+  </columns>
+  <properties>
+    <property name="dimtble.ziptable.c1.dumpperiod" value="HOURLY"/>
+    <property name="cube.table.ziptable.weight" value="0.0"/>
+    <property name="dimtble.ziptable.dim.name" value="zipdim"/>
+    <property name="dimtble.ziptable.storages" value="C1"/>
+    <property name="dimension.zipdim.timed.dimension" value="dt"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>HOURLY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_dimension_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/cheapfact.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/cheapfact.xml 
b/lens-cube/src/test/resources/schema/facts/cheapfact.xml
new file mode 100644
index 0000000..8a8d371
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/cheapfact.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="cheapfact" cube_name="testCube" weight="0.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr21" _type="float" comment="second measure"/>
+    <column name="msr4" _type="bigint" comment="fourth measure"/>
+    <column name="msr15" _type="int" comment="fifteenth measure"/>
+    <column name="union_join_ctx_msr3" _type="int" 
comment="union_join_ctx_third measure"/>
+    <column name="newmeasure" _type="bigint" comment="measure available  from 
now"/>
+    <column name="union_join_ctx_msr2" _type="int" 
comment="union_join_ctx_second measure"/>
+    <column name="msr2" _type="float" comment="second measure"/>
+    <column name="msr3" _type="double" comment="third measure"/>
+    <column name="msr22" _type="float" comment="second measure"/>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="msr1" _type="int" comment="first measure"/>
+    <column name="noaggrmsr" _type="bigint" comment="measure without a default 
aggregate"/>
+    <column name="union_join_ctx_msr1" _type="int" 
comment="union_join_ctx_first measure"/>
+    <column name="zipcode" _type="int" comment="zip"/>
+    <column name="cityid" _type="int" comment="city id"/>
+    <column name="stateid" _type="int" comment="city id"/>
+    <column name="test_time_dim_hour_id" _type="int" comment="time id"/>
+    <column name="ambigdim1" _type="string" comment="used in 
testColumnAmbiguity"/>
+  </columns>
+  <properties>
+    <property name="cube.table.cheapfact.weight" value="0.0"/>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.cheapfact.cubename" value="testCube"/>
+    <property name="cube.fact.cheapfact.c99.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.cheapfact.storages" value="C99,C0"/>
+    <property name="cube.fact.cheapfact.c0.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C99</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="ttd" _type="string" comment="test date partition"/>
+          <column name="ttd2" _type="string" comment="test date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="ttd,ttd2"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>ttd</time_part_cols>
+        <time_part_cols>ttd2</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C0</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.end.times" value="now - 5 years, 
2010"/>
+          <property name="cube.storagetable.start.times" value="2000, now - 10 
years"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/summary1.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/summary1.xml 
b/lens-cube/src/test/resources/schema/facts/summary1.xml
new file mode 100644
index 0000000..199b991
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/summary1.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="summary1" cube_name="testCube" weight="10.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr21" _type="float" comment="second measure"/>
+    <column name="msr4" _type="bigint" comment="fourth measure"/>
+    <column name="msr15" _type="int" comment="fifteenth measure"/>
+    <column name="union_join_ctx_msr3" _type="int" 
comment="union_join_ctx_third measure"/>
+    <column name="newmeasure" _type="bigint" comment="measure available  from 
now"/>
+    <column name="union_join_ctx_msr2" _type="int" 
comment="union_join_ctx_second measure"/>
+    <column name="msr2" _type="float" comment="second measure"/>
+    <column name="msr3" _type="double" comment="third measure"/>
+    <column name="msr22" _type="float" comment="second measure"/>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="msr1" _type="int" comment="first measure"/>
+    <column name="noaggrmsr" _type="bigint" comment="measure without a default 
aggregate"/>
+    <column name="union_join_ctx_msr1" _type="int" 
comment="union_join_ctx_first measure"/>
+    <column name="dim1" _type="string" comment="dim1"/>
+    <column name="dim2" _type="string" comment="dim2"/>
+    <column name="testdim3id" _type="string" comment="dim2"/>
+    <column name="dim2big" _type="string" comment="dim2"/>
+    <column name="zipcode" _type="int" comment="zip"/>
+    <column name="cityid" _type="int" comment="city id"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.summary1.cubename" value="testCube"/>
+    <property name="cube.table.summary1.weight" value="10.0"/>
+    <property name="cube.fact.summary1.c2.updateperiods" 
value="HOURLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.summary1.storages" value="C1,C2"/>
+    <property name="cube.fact.summary1.c1.updateperiods" 
value="HOURLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.summary1.valid.columns"
+              
value="msr21,msr4,msr15,union_join_ctx_msr3,newmeasure,union_join_ctx_msr2,msr2,msr3,msr22,msr9,msr1,noAggrMsr,union_join_ctx_msr1,,dim1,testdim3id"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="transient_lastDdlTime" value="1488970819"/>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+      </update_periods>
+      <storage_name>C2</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="pt" _type="string" comment="p time"/>
+          <column name="it" _type="string" comment="i time"/>
+          <column name="et" _type="string" comment="e time"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="pt,it,et"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>pt</time_part_cols>
+        <time_part_cols>it</time_part_cols>
+        <time_part_cols>et</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/summary2.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/summary2.xml 
b/lens-cube/src/test/resources/schema/facts/summary2.xml
new file mode 100644
index 0000000..c30ed75
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/summary2.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="summary2" cube_name="testCube" weight="20.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr21" _type="float" comment="second measure"/>
+    <column name="msr4" _type="bigint" comment="fourth measure"/>
+    <column name="msr15" _type="int" comment="fifteenth measure"/>
+    <column name="union_join_ctx_msr3" _type="int" 
comment="union_join_ctx_third measure"/>
+    <column name="newmeasure" _type="bigint" comment="measure available  from 
now"/>
+    <column name="union_join_ctx_msr2" _type="int" 
comment="union_join_ctx_second measure"/>
+    <column name="msr2" _type="float" comment="second measure"/>
+    <column name="msr3" _type="double" comment="third measure"/>
+    <column name="msr22" _type="float" comment="second measure"/>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="msr1" _type="int" comment="first measure"/>
+    <column name="noaggrmsr" _type="bigint" comment="measure without a default 
aggregate"/>
+    <column name="union_join_ctx_msr1" _type="int" 
comment="union_join_ctx_first measure"/>
+    <column name="dim1" _type="string" comment="dim1"/>
+    <column name="dim2" _type="string" comment="dim2"/>
+    <column name="testdim3id" _type="string" comment="dim2"/>
+    <column name="dim2big" _type="string" comment="dim2"/>
+    <column name="zipcode" _type="int" comment="zip"/>
+    <column name="cityid" _type="int" comment="city id"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.summary2.cubename" value="testCube"/>
+    <property name="transient_lastDdlTime" value="1488970827"/>
+    <property name="cube.fact.summary2.c2.updateperiods" 
value="HOURLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.summary2.storages" value="C1,C2"/>
+    <property name="cube.table.summary2.weight" value="20.0"/>
+    <property name="cube.fact.summary2.valid.columns"
+              
value="msr21,msr4,msr15,union_join_ctx_msr3,newmeasure,union_join_ctx_msr2,msr2,msr3,msr22,msr9,msr1,noAggrMsr,union_join_ctx_msr1,,dim1,dim2"/>
+    <property name="cube.fact.summary2.c1.updateperiods" 
value="HOURLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.summary1.valid.columns"
+              
value="msr21,msr4,msr15,union_join_ctx_msr3,newmeasure,union_join_ctx_msr2,msr2,msr3,msr22,msr9,msr1,noAggrMsr,union_join_ctx_msr1,,dim1,testdim3id"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+      </update_periods>
+      <storage_name>C2</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="pt" _type="string" comment="p time"/>
+          <column name="it" _type="string" comment="i time"/>
+          <column name="et" _type="string" comment="e time"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="pt,it,et"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>pt</time_part_cols>
+        <time_part_cols>it</time_part_cols>
+        <time_part_cols>et</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/summary3.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/summary3.xml 
b/lens-cube/src/test/resources/schema/facts/summary3.xml
new file mode 100644
index 0000000..4f1803f
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/summary3.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="summary3" cube_name="testCube" weight="30.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr21" _type="float" comment="second measure"/>
+    <column name="msr4" _type="bigint" comment="fourth measure"/>
+    <column name="msr15" _type="int" comment="fifteenth measure"/>
+    <column name="union_join_ctx_msr3" _type="int" 
comment="union_join_ctx_third measure"/>
+    <column name="newmeasure" _type="bigint" comment="measure available  from 
now"/>
+    <column name="union_join_ctx_msr2" _type="int" 
comment="union_join_ctx_second measure"/>
+    <column name="msr2" _type="float" comment="second measure"/>
+    <column name="msr3" _type="double" comment="third measure"/>
+    <column name="msr22" _type="float" comment="second measure"/>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="msr1" _type="int" comment="first measure"/>
+    <column name="noaggrmsr" _type="bigint" comment="measure without a default 
aggregate"/>
+    <column name="union_join_ctx_msr1" _type="int" 
comment="union_join_ctx_first measure"/>
+    <column name="dim1" _type="string" comment="dim1"/>
+    <column name="dim2" _type="string" comment="dim2"/>
+    <column name="testdim3id" _type="string" comment="dim2"/>
+    <column name="dim2big" _type="string" comment="dim2"/>
+    <column name="zipcode" _type="int" comment="zip"/>
+    <column name="cityid" _type="int" comment="city id"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.summary3.c1.updateperiods" 
value="HOURLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.summary3.storages" value="C1,C2"/>
+    <property name="cube.fact.summary3.valid.columns"
+              
value="msr21,msr4,msr15,union_join_ctx_msr3,newmeasure,union_join_ctx_msr2,msr2,msr3,msr22,msr9,msr1,noAggrMsr,union_join_ctx_msr1,,dim1,dim2,cityid,stateid"/>
+    <property name="cube.fact.summary2.valid.columns"
+              
value="msr21,msr4,msr15,union_join_ctx_msr3,newmeasure,union_join_ctx_msr2,msr2,msr3,msr22,msr9,msr1,noAggrMsr,union_join_ctx_msr1,,dim1,dim2"/>
+    <property name="cube.table.summary3.weight" value="30.0"/>
+    <property name="cube.fact.summary3.cubename" value="testCube"/>
+    <property name="cube.fact.summary3.c2.updateperiods" 
value="HOURLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.summary1.valid.columns"
+              
value="msr21,msr4,msr15,union_join_ctx_msr3,newmeasure,union_join_ctx_msr2,msr2,msr3,msr22,msr9,msr1,noAggrMsr,union_join_ctx_msr1,,dim1,testdim3id"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+      </update_periods>
+      <storage_name>C2</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="pt" _type="string" comment="p time"/>
+          <column name="it" _type="string" comment="i time"/>
+          <column name="et" _type="string" comment="e time"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="pt,it,et"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>pt</time_part_cols>
+        <time_part_cols>it</time_part_cols>
+        <time_part_cols>et</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/summary4.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/summary4.xml 
b/lens-cube/src/test/resources/schema/facts/summary4.xml
new file mode 100644
index 0000000..b1be93c
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/summary4.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="summary4" cube_name="testCube" weight="15.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr21" _type="float" comment="second measure"/>
+    <column name="msr4" _type="bigint" comment="fourth measure"/>
+    <column name="msr15" _type="int" comment="fifteenth measure"/>
+    <column name="union_join_ctx_msr3" _type="int" 
comment="union_join_ctx_third measure"/>
+    <column name="newmeasure" _type="bigint" comment="measure available  from 
now"/>
+    <column name="union_join_ctx_msr2" _type="int" 
comment="union_join_ctx_second measure"/>
+    <column name="msr2" _type="float" comment="second measure"/>
+    <column name="msr3" _type="double" comment="third measure"/>
+    <column name="msr22" _type="float" comment="second measure"/>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="msr1" _type="int" comment="first measure"/>
+    <column name="noaggrmsr" _type="bigint" comment="measure without a default 
aggregate"/>
+    <column name="union_join_ctx_msr1" _type="int" 
comment="union_join_ctx_first measure"/>
+    <column name="dim1" _type="string" comment="dim1"/>
+    <column name="dim2" _type="string" comment="dim2"/>
+    <column name="testdim3id" _type="string" comment="dim2"/>
+    <column name="dim2big" _type="string" comment="dim2"/>
+    <column name="zipcode" _type="int" comment="zip"/>
+    <column name="cityid" _type="int" comment="city id"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.table.summary4.weight" value="15.0"/>
+    <property name="cube.fact.summary4.storages" value="C2"/>
+    <property name="cube.fact.summary4.valid.columns"
+              
value="msr21,msr4,msr15,union_join_ctx_msr3,newmeasure,union_join_ctx_msr2,msr2,msr3,msr22,msr9,msr1,noAggrMsr,union_join_ctx_msr1,,dim1,dim2big1,dim2big2,cityid"/>
+    <property name="cube.fact.summary3.valid.columns"
+              
value="msr21,msr4,msr15,union_join_ctx_msr3,newmeasure,union_join_ctx_msr2,msr2,msr3,msr22,msr9,msr1,noAggrMsr,union_join_ctx_msr1,,dim1,dim2,cityid,stateid"/>
+    <property name="cube.fact.summary4.cubename" value="testCube"/>
+    <property name="cube.fact.summary2.valid.columns"
+              
value="msr21,msr4,msr15,union_join_ctx_msr3,newmeasure,union_join_ctx_msr2,msr2,msr3,msr22,msr9,msr1,noAggrMsr,union_join_ctx_msr1,,dim1,dim2"/>
+    <property name="cube.fact.summary1.valid.columns"
+              
value="msr21,msr4,msr15,union_join_ctx_msr3,newmeasure,union_join_ctx_msr2,msr2,msr3,msr22,msr9,msr1,noAggrMsr,union_join_ctx_msr1,,dim1,testdim3id"/>
+    <property name="cube.fact.summary4.c2.updateperiods" 
value="HOURLY,MINUTELY,DAILY"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+      </update_periods>
+      <storage_name>C2</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="pt" _type="string" comment="p time"/>
+          <column name="it" _type="string" comment="i time"/>
+          <column name="et" _type="string" comment="e time"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="pt,it,et"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>pt</time_part_cols>
+        <time_part_cols>it</time_part_cols>
+        <time_part_cols>et</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/testfact.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/testfact.xml 
b/lens-cube/src/test/resources/schema/facts/testfact.xml
new file mode 100644
index 0000000..a4c2c78
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/testfact.xml
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="testfact" cube_name="testCube" weight="5.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr21" _type="float" comment="second measure"/>
+    <column name="msr4" _type="bigint" comment="fourth measure"/>
+    <column name="union_join_ctx_msr3" _type="int" 
comment="union_join_ctx_third measure"/>
+    <column name="newmeasure" _type="bigint" comment="measure available  from 
now"/>
+    <column name="union_join_ctx_msr2" _type="int" 
comment="union_join_ctx_second measure"/>
+    <column name="msr2" _type="float" comment="second measure"/>
+    <column name="msr3" _type="double" comment="third measure"/>
+    <column name="msr22" _type="float" comment="second measure"/>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="msr1" _type="int" comment="first measure"/>
+    <column name="noaggrmsr" _type="bigint" comment="measure without a default 
aggregate"/>
+    <column name="union_join_ctx_msr1" _type="int" 
comment="union_join_ctx_first measure"/>
+    <column name="msr5" _type="double" comment="msr5"/>
+    <column name="zipcode" _type="int" comment="zip"/>
+    <column name="cityid" _type="int" comment="city id"/>
+    <column name="cityid1" _type="int" comment="city id"/>
+    <column name="stateid" _type="int" comment="city id"/>
+    <column name="test_time_dim_day_id" _type="int" comment="time id"/>
+    <column name="test_time_dim_day_id2" _type="int" comment="time id"/>
+    <column name="ambigdim1" _type="string" comment="used in 
testColumnAmbiguity"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.testfact.c5.updateperiods"
+              
value="MONTHLY,HOURLY,YEARLY,CONTINUOUS,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact.cubename" value="testCube"/>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.testfact.c4.updateperiods"
+              
value="MONTHLY,HOURLY,YEARLY,CONTINUOUS,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.table.testfact.weight" value="5.0"/>
+    <property name="cube.fact.testfact.c3.updateperiods"
+              
value="MONTHLY,HOURLY,YEARLY,CONTINUOUS,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact.c2.updateperiods"
+              
value="MONTHLY,HOURLY,YEARLY,CONTINUOUS,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact.storages" value="C3,C4,C5,C0,C1,C2"/>
+    <property name="cube.fact.testfact.c0.updateperiods"
+              
value="MONTHLY,HOURLY,YEARLY,CONTINUOUS,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact.c1.updateperiods"
+              
value="MONTHLY,HOURLY,YEARLY,CONTINUOUS,QUARTERLY,MINUTELY,DAILY"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+        <update_period>CONTINUOUS</update_period>
+      </update_periods>
+      <storage_name>C3</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.end.times" value="now.day - 10 
days"/>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+          <property name="cube.storagetable.start.times" value="now.day - 90 
days"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+        <update_period>CONTINUOUS</update_period>
+      </update_periods>
+      <storage_name>C4</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="ttd" _type="string" comment="test date partition"/>
+          <column name="ttd2" _type="string" comment="test date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="ttd,ttd2"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>ttd</time_part_cols>
+        <time_part_cols>ttd2</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+        <update_period>CONTINUOUS</update_period>
+      </update_periods>
+      <storage_name>C5</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+          <property name="cube.storagetable.start.times" value="now.day - 10 
days"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+        <update_period>CONTINUOUS</update_period>
+      </update_periods>
+      <storage_name>C0</storage_name>
+      <table_desc external="false">
+        <part_cols/>
+        <table_parameters>
+          <property name="totalSize" value="0"/>
+          <property name="numFiles" value="0"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+        <update_period>CONTINUOUS</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+        <update_period>CONTINUOUS</update_period>
+      </update_periods>
+      <storage_name>C2</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/testfact1_base.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/testfact1_base.xml 
b/lens-cube/src/test/resources/schema/facts/testfact1_base.xml
new file mode 100644
index 0000000..0f25784
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/testfact1_base.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="testfact1_base" cube_name="baseCube" weight="5.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr21" _type="float" comment="second measure"/>
+    <column name="msr4" _type="bigint" comment="fourth measure"/>
+    <column name="msr15" _type="int" comment="fifteenth measure"/>
+    <column name="union_join_ctx_msr3" _type="int" 
comment="union_join_ctx_third measure"/>
+    <column name="newmeasure" _type="bigint" comment="measure available  from 
now"/>
+    <column name="union_join_ctx_msr2" _type="int" 
comment="union_join_ctx_second measure"/>
+    <column name="msr2" _type="float" comment="second measure"/>
+    <column name="msr3" _type="double" comment="third measure"/>
+    <column name="msr22" _type="float" comment="second measure"/>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="msr1" _type="int" comment="first measure"/>
+    <column name="noaggrmsr" _type="bigint" comment="measure without a default 
aggregate"/>
+    <column name="union_join_ctx_msr1" _type="int" 
comment="union_join_ctx_first measure"/>
+    <column name="d_time" _type="timestamp" comment="event time"/>
+    <column name="processing_time" _type="timestamp" comment="processing 
time"/>
+    <column name="zipcode" _type="int" comment="zip"/>
+    <column name="cityid" _type="int" comment="city id"/>
+    <column name="stateid" _type="int" comment="state id"/>
+    <column name="userid" _type="int" comment="user id"/>
+    <column name="xuserid" _type="int" comment="user id"/>
+    <column name="yuserid" _type="int" comment="user id"/>
+    <column name="dim1" _type="string" comment="base dim"/>
+    <column name="dim11" _type="string" comment="base dim"/>
+    <column name="test_time_dim_hour_id" _type="int" comment="time id"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.testfact1_base.storages" value="C3,C4,C1,C2"/>
+    <property name="cube.fact.testfact1_base.c3.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact1_base.c2.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact1_base.c1.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.table.testfact1_base.weight" value="5.0"/>
+    <property name="cube.fact.testfact1_base.cubename" value="baseCube"/>
+    <property name="cube.fact.testfact1_base.c4.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C3</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C4</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="ttd" _type="string" comment="test date partition"/>
+          <column name="ttd2" _type="string" comment="test date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="ttd,ttd2"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>ttd</time_part_cols>
+        <time_part_cols>ttd2</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C2</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/testfact1_raw_base.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/testfact1_raw_base.xml 
b/lens-cube/src/test/resources/schema/facts/testfact1_raw_base.xml
new file mode 100644
index 0000000..d755b02
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/testfact1_raw_base.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="testfact1_raw_base" cube_name="baseCube" weight="100.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr21" _type="float" comment="second measure"/>
+    <column name="msr4" _type="bigint" comment="fourth measure"/>
+    <column name="msr15" _type="int" comment="fifteenth measure"/>
+    <column name="union_join_ctx_msr3" _type="int" 
comment="union_join_ctx_third measure"/>
+    <column name="newmeasure" _type="bigint" comment="measure available  from 
now"/>
+    <column name="union_join_ctx_msr2" _type="int" 
comment="union_join_ctx_second measure"/>
+    <column name="msr2" _type="float" comment="second measure"/>
+    <column name="msr3" _type="double" comment="third measure"/>
+    <column name="msr22" _type="float" comment="second measure"/>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="msr1" _type="int" comment="first measure"/>
+    <column name="noaggrmsr" _type="bigint" comment="measure without a default 
aggregate"/>
+    <column name="union_join_ctx_msr1" _type="int" 
comment="union_join_ctx_first measure"/>
+    <column name="zipcode" _type="int" comment="zip"/>
+    <column name="cityid" _type="int" comment="city id"/>
+    <column name="cityid1" _type="int" comment="city id"/>
+    <column name="cityid2" _type="int" comment="city id"/>
+    <column name="stateid" _type="int" comment="state id"/>
+    <column name="countryid" _type="int" comment="country id"/>
+    <column name="dim1" _type="string" comment="dim1"/>
+    <column name="dim2" _type="int" comment="dim2"/>
+    <column name="concatedcitystate" _type="string" comment="citystate"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.datacompleteness.tag" value="f1"/>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.table.testfact1_raw_base.weight" value="100.0"/>
+    <property name="cube.fact.testfact1_raw_base.storages" value="C3,C1"/>
+    <property name="cube.fact.testfact1_raw_base.c1.updateperiods" 
value="HOURLY"/>
+    <property name="cube.fact.testfact1_raw_base.c3.updateperiods" 
value="HOURLY"/>
+    <property name="cube.fact.is.aggregated" value="false"/>
+    <property name="cube.fact.testfact1_raw_base.cubename" value="baseCube"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>HOURLY</update_period>
+      </update_periods>
+      <storage_name>C3</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>HOURLY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/testfact2.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/testfact2.xml 
b/lens-cube/src/test/resources/schema/facts/testfact2.xml
new file mode 100644
index 0000000..d6006c6
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/testfact2.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="testfact2" cube_name="testCube" weight="10.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr21" _type="float" comment="second measure"/>
+    <column name="msr15" _type="int" comment="fifteenth measure"/>
+    <column name="union_join_ctx_msr3" _type="int" 
comment="union_join_ctx_third measure"/>
+    <column name="newmeasure" _type="bigint" comment="measure available  from 
now"/>
+    <column name="union_join_ctx_msr2" _type="int" 
comment="union_join_ctx_second measure"/>
+    <column name="msr2" _type="float" comment="second measure"/>
+    <column name="msr3" _type="double" comment="third measure"/>
+    <column name="msr22" _type="float" comment="second measure"/>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="msr1" _type="int" comment="first measure"/>
+    <column name="noaggrmsr" _type="bigint" comment="measure without a default 
aggregate"/>
+    <column name="union_join_ctx_msr1" _type="int" 
comment="union_join_ctx_first measure"/>
+    <column name="zipcode" _type="int" comment="zip"/>
+    <column name="cityid" _type="int" comment="city id"/>
+    <column name="cityid2" _type="int" comment="city id"/>
+    <column name="test_time_dim_hour_id" _type="int" comment="time id"/>
+    <column name="test_time_dim_hour_id2" _type="int" comment="time id"/>
+    <column name="cdim2" _type="int" comment="cycledim id"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.testfact2.storages" value="C4,C1"/>
+    <property name="cube.fact.testfact2.c4.updateperiods" value="HOURLY"/>
+    <property name="cube.fact.testfact2.c1.updateperiods" value="HOURLY"/>
+    <property name="cube.fact.testfact2.cubename" value="testCube"/>
+    <property name="cube.table.testfact2.weight" value="10.0"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>HOURLY</update_period>
+      </update_periods>
+      <storage_name>C4</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="ttd" _type="string" comment="test date partition"/>
+          <column name="ttd2" _type="string" comment="test date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property 
name="cube.storagetable.partition.timeline.cache.HOURLY.ttd2.storage.class"
+                    
value="org.apache.lens.cube.metadata.timeline.StoreAllPartitionTimeline"/>
+          <property name="cube.storagetable.time.partcols" value="ttd,ttd2"/>
+          <property 
name="cube.storagetable.partition.timeline.cache.HOURLY.ttd.storage.class"
+                    
value="org.apache.lens.cube.metadata.timeline.StoreAllPartitionTimeline"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>ttd</time_part_cols>
+        <time_part_cols>ttd2</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>HOURLY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/testfact2_base.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/testfact2_base.xml 
b/lens-cube/src/test/resources/schema/facts/testfact2_base.xml
new file mode 100644
index 0000000..b3c8076
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/testfact2_base.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="testfact2_base" cube_name="baseCube" weight="5.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr12" _type="float" comment="second measure"/>
+    <column name="d_time" _type="timestamp" comment="event time"/>
+    <column name="processing_time" _type="timestamp" comment="processing 
time"/>
+    <column name="dim1" _type="string" comment="base dim"/>
+    <column name="dim11" _type="string" comment="base dim"/>
+    <column name="dim2" _type="int" comment="dim2 id"/>
+    <column name="userid" _type="int" comment="user id"/>
+    <column name="xuserid" _type="int" comment="user id"/>
+    <column name="yuserid" _type="int" comment="user id"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.testfact2_base.c2.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact2_base.c3.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact2_base.c1.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact2_base.c4.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact2_base.cubename" value="baseCube"/>
+    <property name="cube.fact.testfact2_base.storages" value="C3,C4,C1,C2"/>
+    <property name="cube.table.testfact2_base.weight" value="5.0"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C3</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C4</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="ttd" _type="string" comment="test date partition"/>
+          <column name="ttd2" _type="string" comment="test date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="ttd,ttd2"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>ttd</time_part_cols>
+        <time_part_cols>ttd2</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C2</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/testfact2_raw.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/testfact2_raw.xml 
b/lens-cube/src/test/resources/schema/facts/testfact2_raw.xml
new file mode 100644
index 0000000..5431975
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/testfact2_raw.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="testfact2_raw" cube_name="testCube" weight="100.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr21" _type="float" comment="second measure"/>
+    <column name="msr4" _type="bigint" comment="fourth measure"/>
+    <column name="msr15" _type="int" comment="fifteenth measure"/>
+    <column name="union_join_ctx_msr3" _type="int" 
comment="union_join_ctx_third measure"/>
+    <column name="newmeasure" _type="bigint" comment="measure available  from 
now"/>
+    <column name="union_join_ctx_msr2" _type="int" 
comment="union_join_ctx_second measure"/>
+    <column name="msr2" _type="float" comment="second measure"/>
+    <column name="msr3" _type="double" comment="third measure"/>
+    <column name="msr22" _type="float" comment="second measure"/>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="msr1" _type="int" comment="first measure"/>
+    <column name="noaggrmsr" _type="bigint" comment="measure without a default 
aggregate"/>
+    <column name="union_join_ctx_msr1" _type="int" 
comment="union_join_ctx_first measure"/>
+    <column name="zipcode" _type="int" comment="zip"/>
+    <column name="cityid" _type="int" comment="city id"/>
+    <column name="cityid1" _type="int" comment="city id"/>
+    <column name="cityid2" _type="int" comment="city id"/>
+    <column name="stateid" _type="int" comment="state id"/>
+    <column name="countryid" _type="int" comment="country id"/>
+    <column name="dim1" _type="string" comment="dim1"/>
+    <column name="dim2" _type="int" comment="dim2"/>
+    <column name="concatedcitystate" _type="string" comment="citystate"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.testfact2_raw.storages" value="C3,C1"/>
+    <property name="cube.fact.datacompleteness.tag" value="f1"/>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.testfact2_raw.c3.updateperiods" value="HOURLY"/>
+    <property name="cube.fact.testfact2_raw.c1.updateperiods" value="HOURLY"/>
+    <property name="cube.table.testfact2_raw.weight" value="100.0"/>
+    <property name="cube.fact.is.aggregated" value="false"/>
+    <property name="cube.fact.testfact2_raw.cubename" value="testCube"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>HOURLY</update_period>
+      </update_periods>
+      <storage_name>C3</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>HOURLY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/testfact2_raw_base.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/testfact2_raw_base.xml 
b/lens-cube/src/test/resources/schema/facts/testfact2_raw_base.xml
new file mode 100644
index 0000000..ad126ff
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/testfact2_raw_base.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="testfact2_raw_base" cube_name="baseCube" weight="100.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr11" _type="int" comment="first measure"/>
+    <column name="msr12" _type="float" comment="second measure"/>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="d_time" _type="timestamp" comment="event time"/>
+    <column name="processing_time" _type="timestamp" comment="processing 
time"/>
+    <column name="dim1" _type="string" comment="base dim"/>
+    <column name="dim11" _type="string" comment="base dim"/>
+    <column name="dim13" _type="string" comment="base dim"/>
+    <column name="dim12" _type="string" comment="base dim"/>
+    <column name="dim22" _type="string" comment="base dim"/>
+    <column name="cityid" _type="int" comment="city id"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.datacompleteness.tag" value="f2"/>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.testfact2_raw_base.c1.updateperiods" 
value="HOURLY"/>
+    <property name="cube.table.testfact2_raw_base.weight" value="100.0"/>
+    <property name="transient_lastDdlTime" value="1488970748"/>
+    <property name="cube.fact.testfact2_raw_base.cubename" value="baseCube"/>
+    <property name="cube.fact.is.aggregated" value="false"/>
+    <property name="cube.fact.testfact2_raw_base.storages" value="C1"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>HOURLY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/testfact3_base.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/testfact3_base.xml 
b/lens-cube/src/test/resources/schema/facts/testfact3_base.xml
new file mode 100644
index 0000000..c9c36c4
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/testfact3_base.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="testfact3_base" cube_name="baseCube" weight="5.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr13" _type="double" comment="third measure"/>
+    <column name="msr14" _type="bigint" comment="fourth measure"/>
+    <column name="d_time" _type="timestamp" comment="event time"/>
+    <column name="processing_time" _type="timestamp" comment="processing 
time"/>
+    <column name="dim1" _type="string" comment="base dim"/>
+    <column name="dim11" _type="string" comment="base dim"/>
+  </columns>
+  <properties>
+    <property name="cube.table.testfact3_base.weight" value="5.0"/>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.testfact3_base.cubename" value="baseCube"/>
+    <property name="cube.fact.testfact3_base.c2.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact3_base.c3.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact3_base.c4.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact3_base.storages" value="C3,C4,C1,C2"/>
+    <property name="cube.fact.testfact3_base.c1.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C3</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C4</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="ttd" _type="string" comment="test date partition"/>
+          <column name="ttd2" _type="string" comment="test date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="ttd,ttd2"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>ttd</time_part_cols>
+        <time_part_cols>ttd2</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C2</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/testfact3_raw_base.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/testfact3_raw_base.xml 
b/lens-cube/src/test/resources/schema/facts/testfact3_raw_base.xml
new file mode 100644
index 0000000..d209f54
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/testfact3_raw_base.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="testfact3_raw_base" cube_name="baseCube" weight="100.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr13" _type="double" comment="third measure"/>
+    <column name="msr14" _type="bigint" comment="fourth measure"/>
+    <column name="d_time" _type="timestamp" comment="event time"/>
+    <column name="processing_time" _type="timestamp" comment="processing 
time"/>
+    <column name="dim1" _type="string" comment="base dim"/>
+    <column name="dim11" _type="string" comment="base dim"/>
+    <column name="dim12" _type="string" comment="base dim"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.datacompleteness.tag" value="f2"/>
+    <property name="cube.fact.col.end.time.user_id_deprecated" 
value="2016-01-01"/>
+    <property name="cube.fact.testfact3_raw_base.storages" value="C1"/>
+    <property name="cube.table.testfact3_raw_base.weight" value="100.0"/>
+    <property name="cube.fact.col.start.time.user_id_added_far_future" 
value="2099-01-01"/>
+    <property name="cube.fact.is.aggregated" value="false"/>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.testfact3_raw_base.cubename" value="baseCube"/>
+    <property name="cube.fact.col.start.time.user_id_added_in_past" 
value="2016-01-01"/>
+    <property name="cube.fact.testfact3_raw_base.c1.updateperiods" 
value="HOURLY"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>HOURLY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/testfact4_raw_base.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/testfact4_raw_base.xml 
b/lens-cube/src/test/resources/schema/facts/testfact4_raw_base.xml
new file mode 100644
index 0000000..39c4b4f
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/testfact4_raw_base.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="testfact4_raw_base" cube_name="baseCube" weight="100.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr13" _type="double" comment="third measure"/>
+    <column name="msr14" _type="bigint" comment="fourth measure"/>
+    <column name="d_time" _type="timestamp" comment="event time"/>
+    <column name="processing_time" _type="timestamp" comment="processing 
time"/>
+    <column name="dim1" _type="string" comment="base dim"/>
+    <column name="user_id_added_in_past" _type="int" comment="user id"/>
+    <column name="user_id_added_far_future" _type="int" comment="user id"/>
+    <column name="user_id_deprecated" _type="int" comment="user id"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.datacompleteness.tag" value="f2"/>
+    <property name="cube.fact.testfact4_raw_base.c1.updateperiods" 
value="HOURLY"/>
+    <property name="cube.fact.col.end.time.user_id_deprecated" 
value="2016-01-01"/>
+    <property name="cube.fact.col.start.time.user_id_added_far_future" 
value="2099-01-01"/>
+    <property name="cube.fact.is.aggregated" value="false"/>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.col.start.time.user_id_added_in_past" 
value="2016-01-01"/>
+    <property name="cube.fact.testfact4_raw_base.storages" value="C1"/>
+    <property name="cube.fact.testfact4_raw_base.cubename" value="baseCube"/>
+    <property name="cube.table.testfact4_raw_base.weight" value="100.0"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>HOURLY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/testfact5_base.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/testfact5_base.xml 
b/lens-cube/src/test/resources/schema/facts/testfact5_base.xml
new file mode 100644
index 0000000..8febae4
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/testfact5_base.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="testfact5_base" cube_name="baseCube" weight="150.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr21" _type="float" comment="second measure"/>
+    <column name="msr4" _type="bigint" comment="fourth measure"/>
+    <column name="msr15" _type="int" comment="fifteenth measure"/>
+    <column name="union_join_ctx_msr3" _type="int" 
comment="union_join_ctx_third measure"/>
+    <column name="newmeasure" _type="bigint" comment="measure available  from 
now"/>
+    <column name="union_join_ctx_msr2" _type="int" 
comment="union_join_ctx_second measure"/>
+    <column name="msr2" _type="float" comment="second measure"/>
+    <column name="msr3" _type="double" comment="third measure"/>
+    <column name="msr22" _type="float" comment="second measure"/>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="msr1" _type="int" comment="first measure"/>
+    <column name="noaggrmsr" _type="bigint" comment="measure without a default 
aggregate"/>
+    <column name="union_join_ctx_msr1" _type="int" 
comment="union_join_ctx_first measure"/>
+    <column name="d_time" _type="timestamp" comment="event time"/>
+    <column name="processing_time" _type="timestamp" comment="processing 
time"/>
+    <column name="dim1" _type="string" comment="base dim"/>
+    <column name="booleancut" _type="boolean" comment="expr dim"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.testfact5_base.c3.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact5_base.c1.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact5_base.c4.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact5_base.storages" value="C3,C4,C1,C2"/>
+    <property name="cube.table.testfact5_base.weight" value="150.0"/>
+    <property name="cube.fact.testfact5_base.c2.updateperiods" 
value="MONTHLY,HOURLY,YEARLY,QUARTERLY,MINUTELY,DAILY"/>
+    <property name="cube.fact.testfact5_base.cubename" value="baseCube"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C3</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C4</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="ttd" _type="string" comment="test date partition"/>
+          <column name="ttd2" _type="string" comment="test date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="ttd,ttd2"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>ttd</time_part_cols>
+        <time_part_cols>ttd2</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+    <storage_table>
+      <update_periods>
+        <update_period>MINUTELY</update_period>
+        <update_period>HOURLY</update_period>
+        <update_period>DAILY</update_period>
+        <update_period>MONTHLY</update_period>
+        <update_period>QUARTERLY</update_period>
+        <update_period>YEARLY</update_period>
+      </update_periods>
+      <storage_name>C2</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/facts/testfact5_raw_base.xml
----------------------------------------------------------------------
diff --git a/lens-cube/src/test/resources/schema/facts/testfact5_raw_base.xml 
b/lens-cube/src/test/resources/schema/facts/testfact5_raw_base.xml
new file mode 100644
index 0000000..72f6138
--- /dev/null
+++ b/lens-cube/src/test/resources/schema/facts/testfact5_raw_base.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<x_fact_table name="testfact5_raw_base" cube_name="baseCube" weight="100.0" 
xmlns="uri:lens:cube:0.1">
+  <columns>
+    <column name="msr9" _type="bigint" comment="ninth measure"/>
+    <column name="d_time" _type="timestamp" comment="event time"/>
+    <column name="processing_time" _type="timestamp" comment="processing 
time"/>
+    <column name="dim1" _type="string" comment="base dim"/>
+  </columns>
+  <properties>
+    <property name="cube.fact.datacompleteness.tag" value="f2"/>
+    <property name="cube.fact.relative.start.time" value="now.year - 90 days"/>
+    <property name="cube.fact.testfact5_raw_base.cubename" value="baseCube"/>
+    <property name="cube.fact.testfact5_raw_base.c1.updateperiods" 
value="HOURLY"/>
+    <property name="cube.fact.testfact5_raw_base.storages" value="C1"/>
+    <property name="cube.table.testfact5_raw_base.weight" value="100.0"/>
+    <property name="cube.fact.is.aggregated" value="false"/>
+  </properties>
+  <storage_tables>
+    <storage_table>
+      <update_periods>
+        <update_period>HOURLY</update_period>
+      </update_periods>
+      <storage_name>C1</storage_name>
+      <table_desc external="false">
+        <part_cols>
+          <column name="dt" _type="string" comment="date partition"/>
+        </part_cols>
+        <table_parameters>
+          <property name="cube.storagetable.time.partcols" value="dt"/>
+        </table_parameters>
+        <serde_parameters>
+          <property name="serialization.format" value="1"/>
+        </serde_parameters>
+        <time_part_cols>dt</time_part_cols>
+      </table_desc>
+    </storage_table>
+  </storage_tables>
+</x_fact_table>
\ No newline at end of file

Reply via email to