You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2015/04/26 06:17:33 UTC

[01/39] incubator-kylin git commit: KYLIN-669 change pom for release

Repository: incubator-kylin
Updated Branches:
  refs/heads/staging 5f1da6e9e -> 1219a08df


KYLIN-669 change pom for release


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

Branch: refs/heads/staging
Commit: 1dc4d5ea562d260b8717dcab289f7339e6825903
Parents: 5f1da6e
Author: lukehan <lu...@apache.org>
Authored: Tue Apr 14 09:21:06 2015 +0800
Committer: lukehan <lu...@apache.org>
Committed: Tue Apr 14 09:21:06 2015 +0800

----------------------------------------------------------------------
 pom.xml | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1dc4d5ea/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 73a3f0a..26006f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,6 +20,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache</groupId>
+        <artifactId>apache</artifactId>
+        <version>16</version>
+        </parent>
+
     <groupId>org.apache.kylin</groupId>
     <artifactId>kylin</artifactId>
     <packaging>pom</packaging>
@@ -555,6 +562,18 @@
         <module>invertedindex</module>
     </modules>
 
+    <repositories>
+        <repository>
+            <id>central</id>
+            <name>Central Repository</name>
+            <url>http://repo.maven.apache.org/maven2</url>
+            <layout>default</layout>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
+
     <profiles>
         <profile>
             <id>default</id>
@@ -635,5 +654,56 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+      <!-- This profile adds/overrides few features of the 'apache-release'
+           profile in the parent pom. -->
+      <id>apache-release</id>
+      <build>
+        <plugins>
+          <!-- Apache-RAT checks for files without headers.
+               If run on a messy developer's sandbox, it will fail.
+               This serves as a reminder to only build a release in a clean
+               sandbox! -->
+          <plugin>
+            <groupId>org.apache.rat</groupId>
+            <artifactId>apache-rat-plugin</artifactId>
+            <configuration>
+              <!-- Exclude files/folders for apache release -->
+              <excludes>
+                <exclude>*.md</exclude>
+                <exclude>docs/website</exclude>
+                <exclude>docs/*.md</exclude>
+              </excludes>
+            </configuration>
+            <executions>
+              <execution>
+                <phase>verify</phase>
+                <goals>
+                  <goal>check</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>net.ju-n.maven.plugins</groupId>
+            <artifactId>checksum-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>artifacts</goal>
+                </goals>
+              </execution>
+            </executions>
+            <configuration>
+              <algorithms>
+                <algorithm>MD5</algorithm>
+                <algorithm>SHA-1</algorithm>
+              </algorithms>
+              <failOnError>false</failOnError>
+            </configuration>
+          </plugin>          
+        </plugins>
+      </build>
+    </profile>
     </profiles>
 </project>


[19/39] incubator-kylin git commit: Update binary package with KYLIN-682 and other fixes, commit: 37f44f88047b125e03715aa3d2790f02b99145a5

Posted by li...@apache.org.
Update binary package with KYLIN-682 and other fixes, commit: 37f44f88047b125e03715aa3d2790f02b99145a5


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

Branch: refs/heads/staging
Commit: bb5e52c6e0937a4842039e1a9ec4e46d357189d6
Parents: 01c5aa7
Author: lukehan <lu...@apache.org>
Authored: Thu Apr 16 15:11:31 2015 +0800
Committer: lukehan <lu...@apache.org>
Committed: Thu Apr 23 23:02:57 2015 +0800

----------------------------------------------------------------------
 docs/website/download/index.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/bb5e52c6/docs/website/download/index.md
----------------------------------------------------------------------
diff --git a/docs/website/download/index.md b/docs/website/download/index.md
index 076c5d9..c92ec60 100644
--- a/docs/website/download/index.md
+++ b/docs/website/download/index.md
@@ -16,7 +16,7 @@ title: Community
               <p class="big_text">Binary Package (v0.7.x)</p>
               <p><a href="http://kylin.incubator.apache.org/download/kylin-0.7.1-SNAPSHOT.tgz" target="_blank">v0.7.1-SNAPSHOT (Dev Build)</a> 
               <br/>Updated Date - April 03, 2015 <br/>	
-              <br/>Git Commit: <a href="https://github.com/KylinOLAP/Kylin/tree/5838007b7b6a3ef2b745fd4e903dd610a2207083" target="_blank">5838007</a>						
+              <br/>Git Commit: <a href="https://github.com/KylinOLAP/Kylin/tree/37f44f88047b125e03715aa3d2790f02b99145a5" target="_blank">37f44f</a>						
 							</p>
             </div>
 


[33/39] incubator-kylin git commit: KYLIN-715 ignore 2 css file with MIT license

Posted by li...@apache.org.
KYLIN-715 ignore 2 css file with MIT license


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

Branch: refs/heads/staging
Commit: df39c39f80639a8181a2ed23d2abd0cbd155f83d
Parents: ba9592c
Author: qianhao.zhou <qi...@ebay.com>
Authored: Fri Apr 24 13:55:56 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Fri Apr 24 14:43:15 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/cube/CubeSegmentsTest.java | 18 +++++
 cube/src/test/resources/placeholder.txt         |  0
 dictionary/pom.xml                              | 67 +++++++++++++++++++
 .../org/apache/kylin/dict/common_indicators.txt | 13 ----
 .../org/apache/kylin/dict/date(yyyy-mm-dd).txt  |  2 -
 .../invertedindex/IIInstanceTest.java           | 18 +++++
 .../invertedindex/invertedindex/LZFTest.java    | 18 +++++
 job/pom.xml                                     | 69 ++++++++++++++++++++
 .../kylin/job/tools/HBaseRowDigestTest.java     | 18 +++++
 .../measure/fixedlen/FixedHLLCodec.java         | 17 +++++
 .../realization/IRealizationConstants.java      | 18 +++++
 pom.xml                                         |  6 +-
 server/src/main/resources/dbSqls/schema.sql     | 17 +++++
 .../org/apache/kylin/jdbc/JDBCDriverTest.java   | 19 ++++++
 storage/pom.xml                                 | 68 +++++++++++++++++++
 15 files changed, 350 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/cube/src/test/java/org/apache/kylin/cube/CubeSegmentsTest.java
----------------------------------------------------------------------
diff --git a/cube/src/test/java/org/apache/kylin/cube/CubeSegmentsTest.java b/cube/src/test/java/org/apache/kylin/cube/CubeSegmentsTest.java
index ea04b6c..6816052 100644
--- a/cube/src/test/java/org/apache/kylin/cube/CubeSegmentsTest.java
+++ b/cube/src/test/java/org/apache/kylin/cube/CubeSegmentsTest.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 package org.apache.kylin.cube;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/cube/src/test/resources/placeholder.txt
----------------------------------------------------------------------
diff --git a/cube/src/test/resources/placeholder.txt b/cube/src/test/resources/placeholder.txt
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/dictionary/pom.xml
----------------------------------------------------------------------
diff --git a/dictionary/pom.xml b/dictionary/pom.xml
index 524a52f..266d5e7 100644
--- a/dictionary/pom.xml
+++ b/dictionary/pom.xml
@@ -125,4 +125,71 @@
         </dependency>
     </dependencies>
 
+    <profiles>
+        <profile>
+            <!-- This profile adds/overrides few features of the 'apache-release'
+                 profile in the parent pom. -->
+            <id>apache-release</id>
+            <build>
+                <plugins>
+                    <!-- Apache-RAT checks for files without headers.
+                         If run on a messy developer's sandbox, it will fail.
+                         This serves as a reminder to only build a release in a clean
+                         sandbox! -->
+                    <plugin>
+                        <groupId>org.apache.rat</groupId>
+                        <artifactId>apache-rat-plugin</artifactId>
+                        <configuration>
+                            <numUnapprovedLicenses>0</numUnapprovedLicenses>
+                            <excludes>
+                                <!-- test data -->
+                                <exclude>src/test/resources/dict/eng_com.dic</exclude>
+                            </excludes>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>verify</phase>
+                                <goals>
+                                    <goal>check</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <dependencies>
+                            <dependency>
+                                <groupId>org.apache.maven.doxia</groupId>
+                                <artifactId>doxia-core</artifactId>
+                                <version>1.6</version>
+                                <exclusions>
+                                    <exclusion>
+                                        <groupId>xerces</groupId>
+                                        <artifactId>xercesImpl</artifactId>
+                                    </exclusion>
+                                </exclusions>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
+                    <plugin>
+                        <groupId>net.ju-n.maven.plugins</groupId>
+                        <artifactId>checksum-maven-plugin</artifactId>
+                        <version>1.2</version>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>artifacts</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <algorithms>
+                                <algorithm>MD5</algorithm>
+                                <algorithm>SHA-1</algorithm>
+                            </algorithms>
+                            <failOnError>false</failOnError>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/dictionary/src/main/resources/org/apache/kylin/dict/common_indicators.txt
----------------------------------------------------------------------
diff --git a/dictionary/src/main/resources/org/apache/kylin/dict/common_indicators.txt b/dictionary/src/main/resources/org/apache/kylin/dict/common_indicators.txt
deleted file mode 100644
index 53cefae..0000000
--- a/dictionary/src/main/resources/org/apache/kylin/dict/common_indicators.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-Y
-y
-N
-n
-T
-t
-F
-f
-0
-1
-NULL
-Null
-null

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/dictionary/src/main/resources/org/apache/kylin/dict/date(yyyy-mm-dd).txt
----------------------------------------------------------------------
diff --git a/dictionary/src/main/resources/org/apache/kylin/dict/date(yyyy-mm-dd).txt b/dictionary/src/main/resources/org/apache/kylin/dict/date(yyyy-mm-dd).txt
deleted file mode 100644
index fca7eb3..0000000
--- a/dictionary/src/main/resources/org/apache/kylin/dict/date(yyyy-mm-dd).txt
+++ /dev/null
@@ -1,2 +0,0 @@
-1970-01-01
-9999-12-31
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/invertedindex/src/test/java/org/apache/kylin/invertedindex/invertedindex/IIInstanceTest.java
----------------------------------------------------------------------
diff --git a/invertedindex/src/test/java/org/apache/kylin/invertedindex/invertedindex/IIInstanceTest.java b/invertedindex/src/test/java/org/apache/kylin/invertedindex/invertedindex/IIInstanceTest.java
index 2b0c37e..792d674 100644
--- a/invertedindex/src/test/java/org/apache/kylin/invertedindex/invertedindex/IIInstanceTest.java
+++ b/invertedindex/src/test/java/org/apache/kylin/invertedindex/invertedindex/IIInstanceTest.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 package org.apache.kylin.invertedindex.invertedindex;
 
 import org.apache.kylin.common.util.LocalFileMetadataTestCase;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/invertedindex/src/test/java/org/apache/kylin/invertedindex/invertedindex/LZFTest.java
----------------------------------------------------------------------
diff --git a/invertedindex/src/test/java/org/apache/kylin/invertedindex/invertedindex/LZFTest.java b/invertedindex/src/test/java/org/apache/kylin/invertedindex/invertedindex/LZFTest.java
index e75dc51..c85fae1 100644
--- a/invertedindex/src/test/java/org/apache/kylin/invertedindex/invertedindex/LZFTest.java
+++ b/invertedindex/src/test/java/org/apache/kylin/invertedindex/invertedindex/LZFTest.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 package org.apache.kylin.invertedindex.invertedindex;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/job/pom.xml
----------------------------------------------------------------------
diff --git a/job/pom.xml b/job/pom.xml
index c76dccf..05369f7 100644
--- a/job/pom.xml
+++ b/job/pom.xml
@@ -261,4 +261,73 @@
             </plugin>
         </plugins>
     </build>
+
+    <profiles>
+        <profile>
+            <!-- This profile adds/overrides few features of the 'apache-release'
+                 profile in the parent pom. -->
+            <id>apache-release</id>
+            <build>
+                <plugins>
+                    <!-- Apache-RAT checks for files without headers.
+                         If run on a messy developer's sandbox, it will fail.
+                         This serves as a reminder to only build a release in a clean
+                         sandbox! -->
+                    <plugin>
+                        <groupId>org.apache.rat</groupId>
+                        <artifactId>apache-rat-plugin</artifactId>
+                        <configuration>
+                            <numUnapprovedLicenses>0</numUnapprovedLicenses>
+                            <excludes>
+                                <!-- test data -->
+                                <exclude>src/test/resources/data/test_cal_dt/part-r-00000</exclude>
+                                <exclude>src/test/**/*.json</exclude>
+                            </excludes>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>verify</phase>
+                                <goals>
+                                    <goal>check</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <dependencies>
+                            <dependency>
+                                <groupId>org.apache.maven.doxia</groupId>
+                                <artifactId>doxia-core</artifactId>
+                                <version>1.6</version>
+                                <exclusions>
+                                    <exclusion>
+                                        <groupId>xerces</groupId>
+                                        <artifactId>xercesImpl</artifactId>
+                                    </exclusion>
+                                </exclusions>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
+                    <plugin>
+                        <groupId>net.ju-n.maven.plugins</groupId>
+                        <artifactId>checksum-maven-plugin</artifactId>
+                        <version>1.2</version>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>artifacts</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <algorithms>
+                                <algorithm>MD5</algorithm>
+                                <algorithm>SHA-1</algorithm>
+                            </algorithms>
+                            <failOnError>false</failOnError>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/job/src/test/java/org/apache/kylin/job/tools/HBaseRowDigestTest.java
----------------------------------------------------------------------
diff --git a/job/src/test/java/org/apache/kylin/job/tools/HBaseRowDigestTest.java b/job/src/test/java/org/apache/kylin/job/tools/HBaseRowDigestTest.java
index 9587e89..ebca8f0 100644
--- a/job/src/test/java/org/apache/kylin/job/tools/HBaseRowDigestTest.java
+++ b/job/src/test/java/org/apache/kylin/job/tools/HBaseRowDigestTest.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 package org.apache.kylin.job.tools;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/metadata/src/main/java/org/apache/kylin/metadata/measure/fixedlen/FixedHLLCodec.java
----------------------------------------------------------------------
diff --git a/metadata/src/main/java/org/apache/kylin/metadata/measure/fixedlen/FixedHLLCodec.java b/metadata/src/main/java/org/apache/kylin/metadata/measure/fixedlen/FixedHLLCodec.java
index 138940f..f74b045 100644
--- a/metadata/src/main/java/org/apache/kylin/metadata/measure/fixedlen/FixedHLLCodec.java
+++ b/metadata/src/main/java/org/apache/kylin/metadata/measure/fixedlen/FixedHLLCodec.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
 package org.apache.kylin.metadata.measure.fixedlen;
 
 import java.nio.ByteBuffer;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/metadata/src/main/java/org/apache/kylin/metadata/realization/IRealizationConstants.java
----------------------------------------------------------------------
diff --git a/metadata/src/main/java/org/apache/kylin/metadata/realization/IRealizationConstants.java b/metadata/src/main/java/org/apache/kylin/metadata/realization/IRealizationConstants.java
index c38f5da..b09b84c 100644
--- a/metadata/src/main/java/org/apache/kylin/metadata/realization/IRealizationConstants.java
+++ b/metadata/src/main/java/org/apache/kylin/metadata/realization/IRealizationConstants.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 package org.apache.kylin.metadata.realization;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e294fc8..e65bab0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -671,12 +671,12 @@
                                 <exclude>webapp/node_modules/**</exclude>
                                 <exclude>webapp/dist/**</exclude>
                                 <exclude>webapp/app/components/**</exclude>
-                                <!-- Temp -->
-                                <exclude>webapp/template/nginx_default.conf</exclude>
-                                <exclude>webapp/validate-commit-msg.js</exclude>
                                 <!-- json configuration file-->
                                 <exclude>webapp/.bowerrc</exclude>
                                 <exclude>webapp/.jshintrc</exclude>
+                                <!-- MIT license -->
+                                <exclude>webapp/app/css/AdminLTE-fonts.css</exclude>
+                                <exclude>webapp/app/css/AdminLTE.css</exclude>
                             </excludes>
                         </configuration>
                         <executions>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/server/src/main/resources/dbSqls/schema.sql
----------------------------------------------------------------------
diff --git a/server/src/main/resources/dbSqls/schema.sql b/server/src/main/resources/dbSqls/schema.sql
index ee7c8ef..959908b 100644
--- a/server/src/main/resources/dbSqls/schema.sql
+++ b/server/src/main/resources/dbSqls/schema.sql
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
 
 SET FOREIGN_KEY_CHECKS=0;
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/server/src/test/java/org/apache/kylin/jdbc/JDBCDriverTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/kylin/jdbc/JDBCDriverTest.java b/server/src/test/java/org/apache/kylin/jdbc/JDBCDriverTest.java
index 00d5ea2..81e24ae 100644
--- a/server/src/test/java/org/apache/kylin/jdbc/JDBCDriverTest.java
+++ b/server/src/test/java/org/apache/kylin/jdbc/JDBCDriverTest.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+
 package org.apache.kylin.jdbc;
 
 import com.google.common.collect.Lists;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/df39c39f/storage/pom.xml
----------------------------------------------------------------------
diff --git a/storage/pom.xml b/storage/pom.xml
index 705df50..177e731 100644
--- a/storage/pom.xml
+++ b/storage/pom.xml
@@ -162,4 +162,72 @@
             </plugin>
         </plugins>
     </build>
+
+    <profiles>
+        <profile>
+            <!-- This profile adds/overrides few features of the 'apache-release'
+                 profile in the parent pom. -->
+            <id>apache-release</id>
+            <build>
+                <plugins>
+                    <!-- Apache-RAT checks for files without headers.
+                         If run on a messy developer's sandbox, it will fail.
+                         This serves as a reminder to only build a release in a clean
+                         sandbox! -->
+                    <plugin>
+                        <groupId>org.apache.rat</groupId>
+                        <artifactId>apache-rat-plugin</artifactId>
+                        <configuration>
+                            <numUnapprovedLicenses>0</numUnapprovedLicenses>
+                            <excludes>
+                                <!-- protobuf -->
+                                <exclude>src/main/java/org/apache/kylin/storage/hbase/coprocessor/endpoint/generated/IIProtos.java</exclude>
+                                <exclude>**/*.proto</exclude>
+                            </excludes>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>verify</phase>
+                                <goals>
+                                    <goal>check</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <dependencies>
+                            <dependency>
+                                <groupId>org.apache.maven.doxia</groupId>
+                                <artifactId>doxia-core</artifactId>
+                                <version>1.6</version>
+                                <exclusions>
+                                    <exclusion>
+                                        <groupId>xerces</groupId>
+                                        <artifactId>xercesImpl</artifactId>
+                                    </exclusion>
+                                </exclusions>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
+                    <plugin>
+                        <groupId>net.ju-n.maven.plugins</groupId>
+                        <artifactId>checksum-maven-plugin</artifactId>
+                        <version>1.2</version>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>artifacts</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <algorithms>
+                                <algorithm>MD5</algorithm>
+                                <algorithm>SHA-1</algorithm>
+                            </algorithms>
+                            <failOnError>false</failOnError>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>
\ No newline at end of file


[37/39] incubator-kylin git commit: KYLIN-715 modify license format for .sql files

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query70.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query70.sql b/query/src/test/resources/query/sql/query70.sql
index 055990d..26b6eb2 100644
--- a/query/src/test/resources/query/sql/query70.sql
+++ b/query/src/test/resources/query/sql/query70.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, 
  sum(price) as GMV, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query71.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query71.sql b/query/src/test/resources/query/sql/query71.sql
index 9288ec1..b3abe3d 100644
--- a/query/src/test/resources/query/sql/query71.sql
+++ b/query/src/test/resources/query/sql/query71.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, 
  sum(price) as GMV, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query72.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query72.sql b/query/src/test/resources/query/sql/query72.sql
index 4c27789..48de20b 100644
--- a/query/src/test/resources/query/sql/query72.sql
+++ b/query/src/test/resources/query/sql/query72.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.week_beg_dt, test_kylin_fact.lstg_format_name, sum(test_kylin_fact.price) as GMV, count(*) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query73.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query73.sql b/query/src/test/resources/query/sql/query73.sql
index 229dd63..04c6155 100644
--- a/query/src/test/resources/query/sql/query73.sql
+++ b/query/src/test/resources/query/sql/query73.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select min("t"."s") as min_pr from (select max(price) as "s" from test_kylin_fact group by lstg_format_name) "t"  having (count(1) > 0)

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query74.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query74.sql b/query/src/test/resources/query/sql/query74.sql
index 92a3e2a..0949336 100644
--- a/query/src/test/resources/query/sql/query74.sql
+++ b/query/src/test/resources/query/sql/query74.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select min("t"."s") as min_x, max("t"."s") as max_x from (select max(price) as "s" from test_kylin_fact group by lstg_format_name) "t" having ( count(1)  > 0)

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query75.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query75.sql b/query/src/test/resources/query/sql/query75.sql
index 1848e0a..ebc8608 100644
--- a/query/src/test/resources/query/sql/query75.sql
+++ b/query/src/test/resources/query/sql/query75.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query76.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query76.sql b/query/src/test/resources/query/sql/query76.sql
index 7ba7340..b6991f7 100644
--- a/query/src/test/resources/query/sql/query76.sql
+++ b/query/src/test/resources/query/sql/query76.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query77.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query77.sql b/query/src/test/resources/query/sql/query77.sql
index 79c1d70..18e5240 100644
--- a/query/src/test/resources/query/sql/query77.sql
+++ b/query/src/test/resources/query/sql/query77.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV
  , count(*) as TRANS_CNT from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query78.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query78.sql b/query/src/test/resources/query/sql/query78.sql
index 2e58077..da0718a 100644
--- a/query/src/test/resources/query/sql/query78.sql
+++ b/query/src/test/resources/query/sql/query78.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select sum(PRICE) as GMV, LSTG_FORMAT_NAME as FORMAT_NAME
 from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_all_types/query00.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query00.sql b/query/src/test/resources/query/sql_all_types/query00.sql
index 870e122..4680ae0 100644
--- a/query/src/test/resources/query/sql_all_types/query00.sql
+++ b/query/src/test/resources/query/sql_all_types/query00.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select ML_tinyint, sum(price) as GMV from test_kylin_fact group by ML_tinyint order by ML_tinyint 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_all_types/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query01.sql b/query/src/test/resources/query/sql_all_types/query01.sql
index 89d13ff..eb76210 100644
--- a/query/src/test/resources/query/sql_all_types/query01.sql
+++ b/query/src/test/resources/query/sql_all_types/query01.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select ML_smallint, sum(price) as GMV from test_kylin_fact group by ML_smallint order by ML_smallint 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_all_types/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query02.sql b/query/src/test/resources/query/sql_all_types/query02.sql
index e64516d..40dcacf 100644
--- a/query/src/test/resources/query/sql_all_types/query02.sql
+++ b/query/src/test/resources/query/sql_all_types/query02.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select ML_int, sum(price) as GMV from test_kylin_fact group by ML_int order by ML_int 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_all_types/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query03.sql b/query/src/test/resources/query/sql_all_types/query03.sql
index 2334dc8..325d250 100644
--- a/query/src/test/resources/query/sql_all_types/query03.sql
+++ b/query/src/test/resources/query/sql_all_types/query03.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select ML_bigint, sum(price) as GMV from test_kylin_fact group by ML_bigint order by ML_bigint 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_all_types/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query04.sql b/query/src/test/resources/query/sql_all_types/query04.sql
index 7a4d4fb..ea09698 100644
--- a/query/src/test/resources/query/sql_all_types/query04.sql
+++ b/query/src/test/resources/query/sql_all_types/query04.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select ML_float, sum(price) as GMV from test_kylin_fact group by ML_float order by ML_float 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_all_types/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query05.sql b/query/src/test/resources/query/sql_all_types/query05.sql
index de53ec4..84bca1b 100644
--- a/query/src/test/resources/query/sql_all_types/query05.sql
+++ b/query/src/test/resources/query/sql_all_types/query05.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select ML_double, sum(price) as GMV from test_kylin_fact group by ML_double order by ML_double 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_all_types/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query06.sql b/query/src/test/resources/query/sql_all_types/query06.sql
index f533763..e8105ac 100644
--- a/query/src/test/resources/query/sql_all_types/query06.sql
+++ b/query/src/test/resources/query/sql_all_types/query06.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select ML_decimal, sum(price) as GMV from test_kylin_fact group by ML_decimal order by ML_decimal 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_all_types/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query07.sql b/query/src/test/resources/query/sql_all_types/query07.sql
index b46105e..00083dd 100644
--- a/query/src/test/resources/query/sql_all_types/query07.sql
+++ b/query/src/test/resources/query/sql_all_types/query07.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select ML_boolean, sum(price) as GMV from test_kylin_fact group by ML_boolean order by ML_boolean 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_all_types/query08.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query08.sql b/query/src/test/resources/query/sql_all_types/query08.sql
index 5cac3f9..a10ef8a 100644
--- a/query/src/test/resources/query/sql_all_types/query08.sql
+++ b/query/src/test/resources/query/sql_all_types/query08.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select ML_varchar, sum(price) as GMV from test_kylin_fact group by ML_varchar order by ML_varchar 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_all_types/query09.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query09.sql b/query/src/test/resources/query/sql_all_types/query09.sql
index 00ecff6..bd44d00 100644
--- a/query/src/test/resources/query/sql_all_types/query09.sql
+++ b/query/src/test/resources/query/sql_all_types/query09.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select ML_char, sum(price) as GMV from test_kylin_fact group by ML_char order by ML_char 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_casewhen/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_casewhen/query01.sql b/query/src/test/resources/query/sql_casewhen/query01.sql
index 98159fb..ce6e81a 100644
--- a/query/src/test/resources/query/sql_casewhen/query01.sql
+++ b/query/src/test/resources/query/sql_casewhen/query01.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT lstg_format_name 
 FROM   test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_casewhen/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_casewhen/query02.sql b/query/src/test/resources/query/sql_casewhen/query02.sql
index 8db7e7e..697f423 100644
--- a/query/src/test/resources/query/sql_casewhen/query02.sql
+++ b/query/src/test/resources/query/sql_casewhen/query02.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" 
 FROM   TEST_KYLIN_FACT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_casewhen/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_casewhen/query03.sql b/query/src/test/resources/query/sql_casewhen/query03.sql
index 09300c3..85c662a 100644
--- a/query/src/test/resources/query/sql_casewhen/query03.sql
+++ b/query/src/test/resources/query/sql_casewhen/query03.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" 
 FROM   TEST_KYLIN_FACT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_casewhen/query55.sql.disable
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_casewhen/query55.sql.disable b/query/src/test/resources/query/sql_casewhen/query55.sql.disable
index 7bb2ce9..d29b60d 100644
--- a/query/src/test/resources/query/sql_casewhen/query55.sql.disable
+++ b/query/src/test/resources/query/sql_casewhen/query55.sql.disable
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" IN ('Auction', 'FP-GTC')) THEN 'Auction' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END) AS "LSTG_FORMAT_NAME__group_",
   SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok"

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_casewhen/query56.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_casewhen/query56.sql b/query/src/test/resources/query/sql_casewhen/query56.sql
index 4c72096..7006fbf 100644
--- a/query/src/test/resources/query/sql_casewhen/query56.sql
+++ b/query/src/test/resources/query/sql_casewhen/query56.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
  SELECT (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" = 'Auction') THEN 'Auction2' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END) AS "LSTG_FORMAT_NAME__group_",
   SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok"

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_derived/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query01.sql b/query/src/test/resources/query/sql_derived/query01.sql
index cb7cc67..c4b0aae 100644
--- a/query/src/test/resources/query/sql_derived/query01.sql
+++ b/query/src/test/resources/query/sql_derived/query01.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_kylin_fact.seller_id 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_derived/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query02.sql b/query/src/test/resources/query/sql_derived/query02.sql
index ec089cf..027cd9c 100644
--- a/query/src/test/resources/query/sql_derived/query02.sql
+++ b/query/src/test/resources/query/sql_derived/query02.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_kylin_fact.seller_id 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_derived/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query03.sql b/query/src/test/resources/query/sql_derived/query03.sql
index 7a42c5b..35736b9 100644
--- a/query/src/test/resources/query/sql_derived/query03.sql
+++ b/query/src/test/resources/query/sql_derived/query03.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT distinct LSTG_FORMAT_NAME from test_kylin_fact 
  

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_derived/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query04.sql b/query/src/test/resources/query/sql_derived/query04.sql
index 2ca9044..dab5d0f 100644
--- a/query/src/test/resources/query/sql_derived/query04.sql
+++ b/query/src/test/resources/query/sql_derived/query04.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT site_id, site_name, cre_user from edw.test_sites 
  

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_derived/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query05.sql b/query/src/test/resources/query/sql_derived/query05.sql
index 65d68d5..8665ebc 100644
--- a/query/src/test/resources/query/sql_derived/query05.sql
+++ b/query/src/test/resources/query/sql_derived/query05.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT test_sites.site_name, test_kylin_fact.lstg_format_name, sum(test_kylin_fact.price) as GMV, count(*) as TRANS_CNT 
  FROM test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_derived/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query06.sql b/query/src/test/resources/query/sql_derived/query06.sql
index 3b510fd..0ea32b2 100644
--- a/query/src/test/resources/query/sql_derived/query06.sql
+++ b/query/src/test/resources/query/sql_derived/query06.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT distinct cal_dt from test_kylin_fact 
  

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_derived/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query07.sql b/query/src/test/resources/query/sql_derived/query07.sql
index 3956421..a27fbd1 100644
--- a/query/src/test/resources/query/sql_derived/query07.sql
+++ b/query/src/test/resources/query/sql_derived/query07.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select cal_dt, lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_derived/query08.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query08.sql.disabled b/query/src/test/resources/query/sql_derived/query08.sql.disabled
index f2173d2..c4e7d0c 100644
--- a/query/src/test/resources/query/sql_derived/query08.sql.disabled
+++ b/query/src/test/resources/query/sql_derived/query08.sql.disabled
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select distinct leaf_categ_id, lstg_site_id from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_derived/query09.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query09.sql b/query/src/test/resources/query/sql_derived/query09.sql
index ff6f46a..c0aacef 100644
--- a/query/src/test/resources/query/sql_derived/query09.sql
+++ b/query/src/test/resources/query/sql_derived/query09.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select distinct leaf_categ_id, site_id from test_category_groupings 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_derived/query10.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query10.sql b/query/src/test/resources/query/sql_derived/query10.sql
index 4903314..dd29659 100644
--- a/query/src/test/resources/query/sql_derived/query10.sql
+++ b/query/src/test/resources/query/sql_derived/query10.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_distinct/query00.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query00.sql b/query/src/test/resources/query/sql_distinct/query00.sql
index 584d0be..03a2ada 100644
--- a/query/src/test/resources/query/sql_distinct/query00.sql
+++ b/query/src/test/resources/query/sql_distinct/query00.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, cal_dt,
  sum(price) as GMV, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_distinct/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query01.sql b/query/src/test/resources/query/sql_distinct/query01.sql
index 60e436d..9f92497 100644
--- a/query/src/test/resources/query/sql_distinct/query01.sql
+++ b/query/src/test/resources/query/sql_distinct/query01.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, 
  sum(price) as GMV, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_distinct/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query02.sql b/query/src/test/resources/query/sql_distinct/query02.sql
index 8fcf5de..a903bf3 100644
--- a/query/src/test/resources/query/sql_distinct/query02.sql
+++ b/query/src/test/resources/query/sql_distinct/query02.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, 
  sum(price) as GMV, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_distinct/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query03.sql b/query/src/test/resources/query/sql_distinct/query03.sql
index d17e96a..61ab376 100644
--- a/query/src/test/resources/query/sql_distinct/query03.sql
+++ b/query/src/test/resources/query/sql_distinct/query03.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(1) as TRANS_CNT, count(distinct seller_id) as DIST_SELLER 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_distinct/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query04.sql b/query/src/test/resources/query/sql_distinct/query04.sql
index 694b32a..cb118fa 100644
--- a/query/src/test/resources/query/sql_distinct/query04.sql
+++ b/query/src/test/resources/query/sql_distinct/query04.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(1) as TRANS_CNT, count(distinct seller_id) as DIST_SELLER 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_distinct/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query05.sql b/query/src/test/resources/query/sql_distinct/query05.sql
index f992fbb..cee8ef4 100644
--- a/query/src/test/resources/query/sql_distinct/query05.sql
+++ b/query/src/test/resources/query/sql_distinct/query05.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, 
  sum(price) as GMV, 


[30/39] incubator-kylin git commit: KYLIN-722 format local js

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/job.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/job.js b/webapp/app/js/controllers/job.js
index 0054915..45961b7 100644
--- a/webapp/app/js/controllers/job.js
+++ b/webapp/app/js/controllers/job.js
@@ -14,194 +14,203 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
 KylinApp
-    .controller('JobCtrl', function ($scope, $q, $routeParams, $interval, $modal, ProjectService, MessageService, JobService,SweetAlert,loadingRequest,UserService,jobConfig,JobList) {
-
-        $scope.jobList = JobList;
-        $scope.jobConfig = jobConfig;
-        $scope.cubeName = null;
-        $scope.projects = [];
-        $scope.action = {};
-
-        $scope.status = [];
-        $scope.toggleSelection = function toggleSelection(current) {
-            var idx = $scope.status.indexOf(current);
-            if (idx > -1) {
-              $scope.status.splice(idx, 1);
-            }else {
-              $scope.status.push(current);
-            }
-        };
-
-
-
-        // projectName from page ctrl
-        $scope.state = {loading: false, refreshing: false, filterAttr: 'last_modified', filterReverse: true, reverseColumn: 'last_modified', projectName:$scope.projectModel.selectedProject};
+  .controller('JobCtrl', function ($scope, $q, $routeParams, $interval, $modal, ProjectService, MessageService, JobService, SweetAlert, loadingRequest, UserService, jobConfig, JobList) {
+
+    $scope.jobList = JobList;
+    $scope.jobConfig = jobConfig;
+    $scope.cubeName = null;
+    $scope.projects = [];
+    $scope.action = {};
+
+    $scope.status = [];
+    $scope.toggleSelection = function toggleSelection(current) {
+      var idx = $scope.status.indexOf(current);
+      if (idx > -1) {
+        $scope.status.splice(idx, 1);
+      } else {
+        $scope.status.push(current);
+      }
+    };
+
+
+    // projectName from page ctrl
+    $scope.state = {
+      loading: false,
+      refreshing: false,
+      filterAttr: 'last_modified',
+      filterReverse: true,
+      reverseColumn: 'last_modified',
+      projectName: $scope.projectModel.selectedProject
+    };
+
+    ProjectService.list({}, function (projects) {
+      angular.forEach(projects, function (project, index) {
+        $scope.projects.push(project.name);
+      });
+    });
+
+    $scope.list = function (offset, limit) {
+      var defer = $q.defer();
+      if (!$scope.projectModel.projects.length) {
+        defer.resolve([]);
+        return defer.promise;
+      }
+      offset = (!!offset) ? offset : 0;
+      var selectedJob = null;
+      if (angular.isDefined($scope.state.selectedJob)) {
+        selectedJob = $scope.state.selectedJob;
+      }
+
+      var statusIds = [];
+      angular.forEach($scope.status, function (statusObj, index) {
+        statusIds.push(statusObj.value);
+      });
+
+      var jobRequest = {
+        cubeName: $scope.cubeName,
+        projectName: $scope.state.projectName,
+        status: statusIds,
+        offset: offset,
+        limit: limit
+      };
+      $scope.state.loading = true;
+
+      var defer = $q.defer();
+      return JobList.list(jobRequest).then(function (resp) {
+        $scope.state.loading = false;
+        defer.resolve(resp);
+        defer.promise;
+      });
+    }
 
-        ProjectService.list({}, function (projects) {
-            angular.forEach(projects, function(project, index){
-                $scope.projects.push(project.name);
-            });
+    $scope.reload = function () {
+      // trigger reload action in pagination directive
+      $scope.action.reload = !$scope.action.reload;
+    };
+
+
+    $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
+      if (newValue != oldValue || newValue == null) {
+        JobList.removeAll();
+        $scope.state.projectName = newValue;
+        $scope.reload();
+      }
+
+    });
+    $scope.resume = function (job) {
+      SweetAlert.swal({
+        title: '',
+        text: 'Are you sure to resume the job?',
+        type: '',
+        showCancelButton: true,
+        confirmButtonColor: '#DD6B55',
+        confirmButtonText: "Yes",
+        closeOnConfirm: true
+      }, function () {
+        loadingRequest.show();
+        JobService.resume({jobId: job.uuid}, {}, function (job) {
+          loadingRequest.hide();
+          JobList.jobs[job.uuid] = job;
+          if (angular.isDefined($scope.state.selectedJob)) {
+            $scope.state.selectedJob = JobList.jobs[$scope.state.selectedJob.uuid];
+          }
+          SweetAlert.swal('Success!', 'Job has been resumed successfully!', 'success');
+        }, function (e) {
+          loadingRequest.hide();
+          if (e.data && e.data.exception) {
+            var message = e.data.exception;
+            var msg = !!(message) ? message : 'Failed to take action.';
+            SweetAlert.swal('Oops...', msg, 'error');
+          } else {
+            SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+          }
         });
-
-        $scope.list = function (offset, limit) {
-            var defer = $q.defer();
-            if(!$scope.projectModel.projects.length){
-                defer.resolve([]);
-              return  defer.promise;
-            }
-            offset = (!!offset) ? offset : 0;
-            var selectedJob = null;
-            if (angular.isDefined($scope.state.selectedJob)) {
-                selectedJob = $scope.state.selectedJob;
-            }
-
-            var statusIds = [];
-            angular.forEach($scope.status, function (statusObj, index) {
-                statusIds.push(statusObj.value);
-            });
-
-            var jobRequest = {
-                cubeName: $scope.cubeName,
-                projectName: $scope.state.projectName,
-                status: statusIds,
-                offset: offset,
-                limit: limit
-            };
-            $scope.state.loading = true;
-
-            var defer = $q.defer();
-            return JobList.list(jobRequest).then(function(resp){
-                $scope.state.loading = false;
-                defer.resolve(resp);
-                defer.promise;
-            });
-        }
-
-        $scope.reload = function () {
-            // trigger reload action in pagination directive
-            $scope.action.reload = !$scope.action.reload;
-        };
+      });
+    }
 
 
-        $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
-            if(newValue!=oldValue||newValue==null){
-                JobList.removeAll();
-                $scope.state.projectName = newValue;
-                $scope.reload();
+    $scope.cancel = function (job) {
+      SweetAlert.swal({
+        title: '',
+        text: 'Are you sure to discard the job?',
+        type: '',
+        showCancelButton: true,
+        confirmButtonColor: '#DD6B55',
+        confirmButtonText: "Yes",
+        closeOnConfirm: true
+      }, function () {
+        loadingRequest.show();
+        JobService.cancel({jobId: job.uuid}, {}, function (job) {
+          loadingRequest.hide();
+          $scope.safeApply(function () {
+            JobList.jobs[job.uuid] = job;
+            if (angular.isDefined($scope.state.selectedJob)) {
+              $scope.state.selectedJob = JobList.jobs[$scope.state.selectedJob.uuid];
             }
 
+          });
+          SweetAlert.swal('Success!', 'Job has been discarded successfully!', 'success');
+        }, function (e) {
+          loadingRequest.hide();
+          if (e.data && e.data.exception) {
+            var message = e.data.exception;
+            var msg = !!(message) ? message : 'Failed to take action.';
+            SweetAlert.swal('Oops...', msg, 'error');
+          } else {
+            SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+          }
         });
-        $scope.resume = function (job) {
-            SweetAlert.swal({
-                title: '',
-                text: 'Are you sure to resume the job?',
-                type: '',
-                showCancelButton: true,
-                confirmButtonColor: '#DD6B55',
-                confirmButtonText: "Yes",
-                closeOnConfirm: true
-            }, function() {
-                loadingRequest.show();
-                JobService.resume({jobId: job.uuid}, {}, function (job) {
-                    loadingRequest.hide();
-                    JobList.jobs[job.uuid] = job;
-                    if (angular.isDefined($scope.state.selectedJob)) {
-                        $scope.state.selectedJob = JobList.jobs[ $scope.state.selectedJob.uuid];
-                    }
-                    SweetAlert.swal('Success!', 'Job has been resumed successfully!', 'success');
-                },function(e){
-                    loadingRequest.hide();
-                    if(e.data&& e.data.exception){
-                        var message =e.data.exception;
-                        var msg = !!(message) ? message : 'Failed to take action.';
-                        SweetAlert.swal('Oops...', msg, 'error');
-                    }else{
-                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                    }
-                });
-            });
-        }
-
-
-        $scope.cancel = function (job) {
-            SweetAlert.swal({
-                title: '',
-                text: 'Are you sure to discard the job?',
-                type: '',
-                showCancelButton: true,
-                confirmButtonColor: '#DD6B55',
-                confirmButtonText: "Yes",
-                closeOnConfirm: true
-            }, function() {
-                loadingRequest.show();
-                JobService.cancel({jobId: job.uuid}, {}, function (job) {
-                    loadingRequest.hide();
-                    $scope.safeApply(function() {
-                        JobList.jobs[job.uuid] = job;
-                        if (angular.isDefined($scope.state.selectedJob)) {
-                            $scope.state.selectedJob = JobList.jobs[ $scope.state.selectedJob.uuid];
-                        }
-
-                    });
-                    SweetAlert.swal('Success!', 'Job has been discarded successfully!', 'success');
-                },function(e){
-                    loadingRequest.hide();
-                    if(e.data&& e.data.exception){
-                        var message =e.data.exception;
-                        var msg = !!(message) ? message : 'Failed to take action.';
-                        SweetAlert.swal('Oops...', msg, 'error');
-                    }else{
-                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                    }
-                });
-            });
-        }
+      });
+    }
 
-        $scope.openModal = function () {
-            if (angular.isDefined($scope.state.selectedStep)) {
-                if ($scope.state.stepAttrToShow == "output") {
-                    $scope.state.selectedStep.loadingOp = true;
-                    internalOpenModal();
-                    var stepId = $scope.state.selectedStep.sequence_id;
-                    JobService.stepOutput({jobId: $scope.state.selectedJob.uuid, propValue: $scope.state.selectedStep.id}, function (result) {
-                        if (angular.isDefined(JobList.jobs[result['jobId']])) {
-                            var tjob = JobList.jobs[result['jobId']];
-                            tjob.steps[stepId].cmd_output = result['cmd_output'];
-                            tjob.steps[stepId].loadingOp = false;
-                        }
-                    });
-                } else {
-                    internalOpenModal();
-                }
+    $scope.openModal = function () {
+      if (angular.isDefined($scope.state.selectedStep)) {
+        if ($scope.state.stepAttrToShow == "output") {
+          $scope.state.selectedStep.loadingOp = true;
+          internalOpenModal();
+          var stepId = $scope.state.selectedStep.sequence_id;
+          JobService.stepOutput({
+            jobId: $scope.state.selectedJob.uuid,
+            propValue: $scope.state.selectedStep.id
+          }, function (result) {
+            if (angular.isDefined(JobList.jobs[result['jobId']])) {
+              var tjob = JobList.jobs[result['jobId']];
+              tjob.steps[stepId].cmd_output = result['cmd_output'];
+              tjob.steps[stepId].loadingOp = false;
             }
+          });
+        } else {
+          internalOpenModal();
         }
+      }
+    }
 
-        function internalOpenModal() {
-            $modal.open({
-                templateUrl: 'jobStepDetail.html',
-                controller: jobStepDetail,
-                resolve: {
-                    step: function () {
-                        return $scope.state.selectedStep;
-                    },
-                    attr: function () {
-                        return $scope.state.stepAttrToShow;
-                    }
-                }
-            });
+    function internalOpenModal() {
+      $modal.open({
+        templateUrl: 'jobStepDetail.html',
+        controller: jobStepDetail,
+        resolve: {
+          step: function () {
+            return $scope.state.selectedStep;
+          },
+          attr: function () {
+            return $scope.state.stepAttrToShow;
+          }
         }
+      });
     }
+  }
 );
 
 var jobStepDetail = function ($scope, $modalInstance, step, attr) {
-    $scope.step = step;
-    $scope.stepAttrToShow = attr;
-    $scope.cancel = function () {
-        $modalInstance.dismiss('cancel');
-    }
+  $scope.step = step;
+  $scope.stepAttrToShow = attr;
+  $scope.cancel = function () {
+    $modalInstance.dismiss('cancel');
+  }
 };

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/page.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/page.js b/webapp/app/js/controllers/page.js
index 6cc2762..7453d48 100644
--- a/webapp/app/js/controllers/page.js
+++ b/webapp/app/js/controllers/page.js
@@ -14,263 +14,261 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
-KylinApp.controller('PageCtrl', function ($scope, $q, AccessService,$modal, $location, $rootScope, $routeParams, $http, UserService,ProjectService,SweetAlert,$cookieStore,$log, kylinConfig,ProjectModel,TableModel) {
-
-    //init kylinConfig to get kylin.Propeties
-    kylinConfig.init().$promise.then(function(data) {
-        $log.debug(data);
-        kylinConfig.initWebConfigInfo();
+KylinApp.controller('PageCtrl', function ($scope, $q, AccessService, $modal, $location, $rootScope, $routeParams, $http, UserService, ProjectService, SweetAlert, $cookieStore, $log, kylinConfig, ProjectModel, TableModel) {
+
+  //init kylinConfig to get kylin.Propeties
+  kylinConfig.init().$promise.then(function (data) {
+    $log.debug(data);
+    kylinConfig.initWebConfigInfo();
+  });
+
+  $scope.kylinConfig = kylinConfig;
+
+  $scope.header = {show: true};
+
+  $scope.$on('$routeChangeSuccess', function ($event, current) {
+    $scope.activeTab = current.tab;
+    $scope.header.show = ($location.url() && $location.url().indexOf('/home') == -1);
+  });
+
+  $scope.config = Config;
+  $scope.routeParams = $routeParams;
+  $scope.angular = angular;
+  $scope.userService = UserService;
+  $scope.activeTab = "";
+  $scope.projectModel = ProjectModel;
+  $scope.tableModel = TableModel;
+  //init
+  ProjectService.list({}, function (projects) {
+    var _projects = [];
+    angular.forEach(projects, function (project, index) {
+      _projects.push(project.name);
+    });
+    _projects = _.sortBy(_projects, function (i) {
+      return i.toLowerCase();
     });
 
-    $scope.kylinConfig = kylinConfig;
+    ProjectModel.setProjects(_projects);
 
-    $scope.header = {show: true};
+    var absUrl = $location.absUrl();
 
-    $scope.$on('$routeChangeSuccess', function ($event, current) {
-        $scope.activeTab = current.tab;
-        $scope.header.show = ($location.url() && $location.url().indexOf('/home') == -1);
-    });
+    var projectInCookie = $cookieStore.get("project");
+    if (absUrl.indexOf("/login") == -1) {
+      var selectedProject = projectInCookie != null ? projectInCookie : null;
+      $scope.projectModel.setSelectedProject(selectedProject);
+    } else {
+      var selectedProject = $scope.projectModel.selectedProject != null ? $scope.projectModel.selectedProject : projectInCookie != null ? projectInCookie : $scope.projectModel.projects[0];
+      $scope.projectModel.setSelectedProject(selectedProject);
+    }
+  });
 
-    $scope.config = Config;
-    $scope.routeParams = $routeParams;
-    $scope.angular = angular;
-    $scope.userService = UserService;
-    $scope.activeTab = "";
-    $scope.projectModel = ProjectModel;
-    $scope.tableModel = TableModel;
-    //init
-    ProjectService.list({}, function (projects) {
-        var _projects = [];
-        angular.forEach(projects, function(project, index){
-            _projects.push(project.name);
-        });
-        _projects = _.sortBy(_projects, function (i) { return i.toLowerCase(); });
-
-        ProjectModel.setProjects(_projects);
-
-        var absUrl = $location.absUrl();
-
-        var projectInCookie = $cookieStore.get("project");
-        if(absUrl.indexOf("/login")==-1){
-            var selectedProject=projectInCookie!=null?projectInCookie:null;
-            $scope.projectModel.setSelectedProject(selectedProject);
-        }else{
-            var selectedProject=$scope.projectModel.selectedProject!=null?$scope.projectModel.selectedProject:projectInCookie!=null?projectInCookie:$scope.projectModel.projects[0];
-            $scope.projectModel.setSelectedProject(selectedProject);
-        }
+
+  // Set up common methods
+  $scope.logout = function () {
+    $scope.$emit('event:logoutRequest');
+    $http.get(Config.service.base + 'j_spring_security_logout').success(function () {
+      UserService.setCurUser({});
+      $scope.username = $scope.password = null;
+      $location.path('/login');
+
+      console.debug("Logout Completed.");
+    }).error(function () {
+      UserService.setCurUser({});
+      $scope.username = $scope.password = null;
+      $location.path('/login');
+
+      console.debug("Logout Completed.");
     });
+    ;
+  };
 
+  Messenger.options = {
+    extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
+    theme: 'air'
+  };
 
-    // Set up common methods
-    $scope.logout = function () {
-        $scope.$emit('event:logoutRequest');
-        $http.get(Config.service.base + 'j_spring_security_logout').success(function () {
-            UserService.setCurUser({});
-            $scope.username = $scope.password = null;
-            $location.path('/login');
-
-            console.debug("Logout Completed.");
-        }).error(function () {
-            UserService.setCurUser({});
-            $scope.username = $scope.password = null;
-            $location.path('/login');
-
-            console.debug("Logout Completed.");
-        });
-        ;
-    };
-
-    Messenger.options = {
-        extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
-        theme: 'air'
-    };
-
-    $scope.getInt = function (ivalue) {
-        return parseInt(ivalue);
-    };
-
-    $scope.getLength = function (obj) {
-        if (!obj) {
-            return 0;
-        }
-        var size = 0, key;
-        for (key in obj) {
-            if (obj.hasOwnProperty(key)) size++;
-        }
-        return size;
-    };
-
-    // common acl methods
-    $scope.hasPermission = function (entity) {
-        var curUser = UserService.getCurUser();
-        if(!curUser){
-            return curUser;
-        }
+  $scope.getInt = function (ivalue) {
+    return parseInt(ivalue);
+  };
 
-        var hasPermission = false;
-        var masks = [];
-        for (var i = 1; i < arguments.length; i++) {
-            if (arguments[i])
-            {
-                masks.push(arguments[i]);
-            }
-        }
+  $scope.getLength = function (obj) {
+    if (!obj) {
+      return 0;
+    }
+    var size = 0, key;
+    for (key in obj) {
+      if (obj.hasOwnProperty(key)) size++;
+    }
+    return size;
+  };
+
+  // common acl methods
+  $scope.hasPermission = function (entity) {
+    var curUser = UserService.getCurUser();
+    if (!curUser) {
+      return curUser;
+    }
 
-        if (entity) {
-            angular.forEach(entity.accessEntities, function (acessEntity, index) {
-                if (masks.indexOf(acessEntity.permission.mask) != -1) {
-                    if ((curUser.userDetails.username == acessEntity.sid.principal) || UserService.hasRole(acessEntity.sid.grantedAuthority)) {
-                        hasPermission = true;
-                    }
-                }
-            });
-        }
+    var hasPermission = false;
+    var masks = [];
+    for (var i = 1; i < arguments.length; i++) {
+      if (arguments[i]) {
+        masks.push(arguments[i]);
+      }
+    }
 
-        return hasPermission;
-    };
-
-    $scope.listAccess = function (entity, type) {
-        var defer = $q.defer();
-
-        entity.accessLoading = true;
-        AccessService.list({type: type, uuid: entity.uuid}, function (accessEntities) {
-            entity.accessLoading = false;
-            entity.accessEntities = accessEntities;
-            defer.resolve();
-        });
-
-        return defer.promise;
-    };
-
-    // Compute data size so as to auto convert to KB/MB/GB/TB)
-    $scope.dataSize = function (data) {
-        var size;
-        if(data/1024/1024/1024/1024 >= 1){
-            size = (data/1024/1024/1024/1024).toFixed(2) + ' TB';
-        }else if(data/1024/1024/1024 >= 1){
-            size = (data/1024/1024/1024).toFixed(2) + ' GB';
-        }else if(data/1024/1024 >= 1) {
-            size = (data/1024/1024).toFixed(2) + ' MB';
-        }else {
-            size = (data/1024).toFixed(2) + ' KB';
-        }
-        return size;
-    };
-
-
-    $scope.toCreateProj = function () {
-        $modal.open({
-            templateUrl: 'project.html',
-            controller: projCtrl,
-            resolve: {
-                projects: function () {
-                    return null;
-                },
-                project: function(){
-                    return null;
-                }
-            }
-        });
-    };
-
-
-    $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
-        if(newValue!=oldValue){
-            //$log.log("project updated in page controller,from:"+oldValue+" To:"+newValue);
-            $cookieStore.put("project",$scope.projectModel.selectedProject);
+    if (entity) {
+      angular.forEach(entity.accessEntities, function (acessEntity, index) {
+        if (masks.indexOf(acessEntity.permission.mask) != -1) {
+          if ((curUser.userDetails.username == acessEntity.sid.principal) || UserService.hasRole(acessEntity.sid.grantedAuthority)) {
+            hasPermission = true;
+          }
         }
+      });
+    }
 
+    return hasPermission;
+  };
+
+  $scope.listAccess = function (entity, type) {
+    var defer = $q.defer();
+
+    entity.accessLoading = true;
+    AccessService.list({type: type, uuid: entity.uuid}, function (accessEntities) {
+      entity.accessLoading = false;
+      entity.accessEntities = accessEntities;
+      defer.resolve();
     });
 
-    /*
-     *global method for all scope to use
-     * */
-
-     //update scope value to view
-    $scope.safeApply = function(fn) {
-        var phase = this.$root.$$phase;
-        if(phase == '$apply' || phase == '$digest') {
-            if(fn && (typeof(fn) === 'function')) {
-                fn();
-            }
-        } else {
-            this.$apply(fn);
+    return defer.promise;
+  };
+
+  // Compute data size so as to auto convert to KB/MB/GB/TB)
+  $scope.dataSize = function (data) {
+    var size;
+    if (data / 1024 / 1024 / 1024 / 1024 >= 1) {
+      size = (data / 1024 / 1024 / 1024 / 1024).toFixed(2) + ' TB';
+    } else if (data / 1024 / 1024 / 1024 >= 1) {
+      size = (data / 1024 / 1024 / 1024).toFixed(2) + ' GB';
+    } else if (data / 1024 / 1024 >= 1) {
+      size = (data / 1024 / 1024).toFixed(2) + ' MB';
+    } else {
+      size = (data / 1024).toFixed(2) + ' KB';
+    }
+    return size;
+  };
+
+
+  $scope.toCreateProj = function () {
+    $modal.open({
+      templateUrl: 'project.html',
+      controller: projCtrl,
+      resolve: {
+        projects: function () {
+          return null;
+        },
+        project: function () {
+          return null;
         }
-    };
+      }
+    });
+  };
 
-});
 
-var projCtrl = function ($scope,$location, $modalInstance, ProjectService, MessageService, projects, project,SweetAlert,ProjectModel,$cookieStore,$route) {
-    $scope.state = {
-        isEdit: false,
-        oldProjName: null
-    };
-    $scope.isEdit = false;
-    $scope.proj = {name: '', description: ''};
-
-    if (project)
-    {
-        $scope.state.isEdit = true;
-        $scope.state.oldProjName = project.name;
-        $scope.proj = project;
+  $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
+    if (newValue != oldValue) {
+      //$log.log("project updated in page controller,from:"+oldValue+" To:"+newValue);
+      $cookieStore.put("project", $scope.projectModel.selectedProject);
+    }
+
+  });
+
+  /*
+   *global method for all scope to use
+   * */
+
+  //update scope value to view
+  $scope.safeApply = function (fn) {
+    var phase = this.$root.$$phase;
+    if (phase == '$apply' || phase == '$digest') {
+      if (fn && (typeof(fn) === 'function')) {
+        fn();
+      }
+    } else {
+      this.$apply(fn);
     }
+  };
+
+});
 
-    $scope.createOrUpdate = function () {
-        if ($scope.state.isEdit)
-        {
-
-            var requestBody = {
-                formerProjectName: $scope.state.oldProjName,
-                newProjectName: $scope.proj.name,
-                newDescription: $scope.proj.description
-            };
-            ProjectService.update({}, requestBody, function (newProj) {
-                SweetAlert.swal('Success!', 'Project update successfully!', 'success');
-
-                //update project in project model
-                ProjectModel.updateProject($scope.proj.name,$scope.state.oldProjName);
-                $cookieStore.put("project",$scope.proj.name);
-                ProjectModel.setSelectedProject($scope.proj.name);
-                $modalInstance.dismiss('cancel');
-            },function(e){
-                if(e.data&& e.data.exception){
-                    var message =e.data.exception;
-                    var msg = !!(message) ? message : 'Failed to take action.';
-                    SweetAlert.swal('Oops...', msg, 'error');
-                }else{
-                    SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                }
-            });
+var projCtrl = function ($scope, $location, $modalInstance, ProjectService, MessageService, projects, project, SweetAlert, ProjectModel, $cookieStore, $route) {
+  $scope.state = {
+    isEdit: false,
+    oldProjName: null
+  };
+  $scope.isEdit = false;
+  $scope.proj = {name: '', description: ''};
+
+  if (project) {
+    $scope.state.isEdit = true;
+    $scope.state.oldProjName = project.name;
+    $scope.proj = project;
+  }
+
+  $scope.createOrUpdate = function () {
+    if ($scope.state.isEdit) {
+
+      var requestBody = {
+        formerProjectName: $scope.state.oldProjName,
+        newProjectName: $scope.proj.name,
+        newDescription: $scope.proj.description
+      };
+      ProjectService.update({}, requestBody, function (newProj) {
+        SweetAlert.swal('Success!', 'Project update successfully!', 'success');
+
+        //update project in project model
+        ProjectModel.updateProject($scope.proj.name, $scope.state.oldProjName);
+        $cookieStore.put("project", $scope.proj.name);
+        ProjectModel.setSelectedProject($scope.proj.name);
+        $modalInstance.dismiss('cancel');
+      }, function (e) {
+        if (e.data && e.data.exception) {
+          var message = e.data.exception;
+          var msg = !!(message) ? message : 'Failed to take action.';
+          SweetAlert.swal('Oops...', msg, 'error');
+        } else {
+          SweetAlert.swal('Oops...', "Failed to take action.", 'error');
         }
-        else
-        {
-            ProjectService.save({}, $scope.proj, function (newProj) {
-                SweetAlert.swal('Success!', 'New project created successfully!', 'success');
-                $modalInstance.dismiss('cancel');
-                if(projects) {
-                    projects.push(newProj);
-                }
-                ProjectModel.addProject(newProj.name);
-                $cookieStore.put("project",newProj.name);
-                location.reload();
-            }, function(e){
-                if(e.data&& e.data.exception){
-                    var message =e.data.exception;
-                    var msg = !!(message) ? message : 'Failed to take action.';
-                    SweetAlert.swal('Oops...', msg, 'error');
-                }else{
-                    SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                }
-            });
+      });
+    }
+    else {
+      ProjectService.save({}, $scope.proj, function (newProj) {
+        SweetAlert.swal('Success!', 'New project created successfully!', 'success');
+        $modalInstance.dismiss('cancel');
+        if (projects) {
+          projects.push(newProj);
         }
-    };
+        ProjectModel.addProject(newProj.name);
+        $cookieStore.put("project", newProj.name);
+        location.reload();
+      }, function (e) {
+        if (e.data && e.data.exception) {
+          var message = e.data.exception;
+          var msg = !!(message) ? message : 'Failed to take action.';
+          SweetAlert.swal('Oops...', msg, 'error');
+        } else {
+          SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+        }
+      });
+    }
+  };
 
-    $scope.cancel = function () {
-        $modalInstance.dismiss('cancel');
-    };
+  $scope.cancel = function () {
+    $modalInstance.dismiss('cancel');
+  };
 
 };

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/projectMeta.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/projectMeta.js b/webapp/app/js/controllers/projectMeta.js
index d1ba98a..ff4d594 100644
--- a/webapp/app/js/controllers/projectMeta.js
+++ b/webapp/app/js/controllers/projectMeta.js
@@ -14,83 +14,82 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
 KylinApp
-    .controller('ProjectMetaCtrl', function ($scope, $q, ProjectService, QueryService) {
-        $scope.selectedSrcDb = [];
-        $scope.selectedSrcTable = {};
-        $scope.treeOptions = {
-            nodeChildren: "columns",
-            injectClasses: {
-                ul: "a1",
-                li: "a2",
-                liSelected: "a7",
-                iExpanded: "a3",
-                iCollapsed: "a4",
-                iLeaf: "a5",
-                label: "a6",
-                labelSelected: "a8"
-            }
-        };
+  .controller('ProjectMetaCtrl', function ($scope, $q, ProjectService, QueryService) {
+    $scope.selectedSrcDb = [];
+    $scope.selectedSrcTable = {};
+    $scope.treeOptions = {
+      nodeChildren: "columns",
+      injectClasses: {
+        ul: "a1",
+        li: "a2",
+        liSelected: "a7",
+        iExpanded: "a3",
+        iCollapsed: "a4",
+        iLeaf: "a5",
+        label: "a6",
+        labelSelected: "a8"
+      }
+    };
 
-        $scope.showSelected = function (table) {
-            if (table.uuid) {
-                $scope.selectedSrcTable = table;
-            }
-            else {
-                $scope.selectedSrcTable.selectedSrcColumn = table;
-            }
-        }
+    $scope.showSelected = function (table) {
+      if (table.uuid) {
+        $scope.selectedSrcTable = table;
+      }
+      else {
+        $scope.selectedSrcTable.selectedSrcColumn = table;
+      }
+    }
 
-        $scope.projectMetaLoad = function () {
-            var defer = $q.defer();
-            $scope.selectedSrcDb = [];
-            $scope.loading = true;
-            QueryService.getTables({project: $scope.projectModel.selectedProject}, {}, function (tables) {
-                var tableMap = [];
-                angular.forEach(tables, function (table) {
-                    if (!tableMap[table.table_SCHEM]) {
-                        tableMap[table.table_SCHEM] = [];
-                    }
-                    table.name = table.table_NAME;
-                    angular.forEach(table.columns, function (column, index) {
-                        column.name = column.column_NAME;
-                    });
-                    tableMap[table.table_SCHEM].push(table);
-                });
+    $scope.projectMetaLoad = function () {
+      var defer = $q.defer();
+      $scope.selectedSrcDb = [];
+      $scope.loading = true;
+      QueryService.getTables({project: $scope.projectModel.selectedProject}, {}, function (tables) {
+        var tableMap = [];
+        angular.forEach(tables, function (table) {
+          if (!tableMap[table.table_SCHEM]) {
+            tableMap[table.table_SCHEM] = [];
+          }
+          table.name = table.table_NAME;
+          angular.forEach(table.columns, function (column, index) {
+            column.name = column.column_NAME;
+          });
+          tableMap[table.table_SCHEM].push(table);
+        });
 
-                for (var key in  tableMap) {
-                    var tables = tableMap[key];
-                    $scope.selectedSrcDb.push({
-                        "name": key,
-                        "columns": tables
-                    });
-                }
+        for (var key in  tableMap) {
+          var tables = tableMap[key];
+          $scope.selectedSrcDb.push({
+            "name": key,
+            "columns": tables
+          });
+        }
 
-                $scope.loading = false;
-                defer.resolve();
-            });
-            return defer.promise;
-        };
+        $scope.loading = false;
+        defer.resolve();
+      });
+      return defer.promise;
+    };
 
 
-        $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
-            if(newValue){
-                $scope.projectMetaLoad();
-            }
-        });
+    $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
+      if (newValue) {
+        $scope.projectMetaLoad();
+      }
+    });
 
-        $scope.trimType = function(typeName){
-            if (typeName.match(/VARCHAR/i))
-            {
-                typeName = "VARCHAR";
-            }
+    $scope.trimType = function (typeName) {
+      if (typeName.match(/VARCHAR/i)) {
+        typeName = "VARCHAR";
+      }
 
-            return  typeName.trim().toLowerCase();
-        }
+      return typeName.trim().toLowerCase();
+    }
 
-    });
+  });
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/projects.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/projects.js b/webapp/app/js/controllers/projects.js
index e906188..9792a7b 100644
--- a/webapp/app/js/controllers/projects.js
+++ b/webapp/app/js/controllers/projects.js
@@ -1,96 +1,96 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-'use strict';
-
-KylinApp
-    .controller('ProjectCtrl', function ($scope, $modal, $q, ProjectService, MessageService,SweetAlert,$log,kylinConfig,projectConfig,ProjectModel) {
-
-        $scope.projects = [];
-        $scope.loading = false;
-        $scope.projectConfig = projectConfig;
-
-        $scope.state = { filterAttr: 'name', filterReverse: true, reverseColumn: 'name'};
-
-        $scope.list = function (offset, limit) {
-            offset = (!!offset) ? offset : 0;
-            limit = (!!limit) ? limit : 20;
-            var defer = $q.defer();
-            var queryParam = {offset: offset, limit: limit};
-
-            $scope.loading = true;
-            ProjectService.list(queryParam, function (projects) {
-                $scope.projects = $scope.projects.concat(projects);
-                angular.forEach(projects, function (project) {
-                    $scope.listAccess(project, 'ProjectInstance');
-                });
-                $scope.loading = false;
-                defer.resolve(projects.length);
-            });
-
-            return defer.promise;
-        }
-
-        $scope.toEdit = function(project) {
-            $modal.open({
-                templateUrl: 'project.html',
-                controller: projCtrl,
-                resolve: {
-                    projects: function () {
-                        return $scope.projects;
-                    },
-                    project: function(){
-                        return project;
-                    }
-                }
-            });
-        }
-
-        $scope.delete = function(project){
-            SweetAlert.swal({
-                title: '',
-                text: 'Are you sure to delete ?',
-                type: '',
-                showCancelButton: true,
-                confirmButtonColor: '#DD6B55',
-                confirmButtonText: "Yes",
-                closeOnConfirm: true
-            }, function(isConfirm) {
-                if(isConfirm){
-                ProjectService.delete({projecId: project.name}, function(){
-                    var pIndex = $scope.projects.indexOf(project);
-                    if (pIndex > -1) {
-                        $scope.projects.splice(pIndex, 1);
-                    }
-                    ProjectModel.removeProject(project.name);
-                SweetAlert.swal('Success!',"Project [" + project.name + "] has been deleted successfully!", 'success');
-                },function(e){
-                    if(e.data&& e.data.exception){
-                        var message =e.data.exception;
-                        var msg = !!(message) ? message : 'Failed to take action.';
-                        SweetAlert.swal('Oops...', msg, 'error');
-                    }else{
-                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                    }
-                });
-                }
-            });
-        }
-    }
-);
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+'use strict';
+
+KylinApp
+  .controller('ProjectCtrl', function ($scope, $modal, $q, ProjectService, MessageService, SweetAlert, $log, kylinConfig, projectConfig, ProjectModel) {
+
+    $scope.projects = [];
+    $scope.loading = false;
+    $scope.projectConfig = projectConfig;
+
+    $scope.state = {filterAttr: 'name', filterReverse: true, reverseColumn: 'name'};
+
+    $scope.list = function (offset, limit) {
+      offset = (!!offset) ? offset : 0;
+      limit = (!!limit) ? limit : 20;
+      var defer = $q.defer();
+      var queryParam = {offset: offset, limit: limit};
+
+      $scope.loading = true;
+      ProjectService.list(queryParam, function (projects) {
+        $scope.projects = $scope.projects.concat(projects);
+        angular.forEach(projects, function (project) {
+          $scope.listAccess(project, 'ProjectInstance');
+        });
+        $scope.loading = false;
+        defer.resolve(projects.length);
+      });
+
+      return defer.promise;
+    }
+
+    $scope.toEdit = function (project) {
+      $modal.open({
+        templateUrl: 'project.html',
+        controller: projCtrl,
+        resolve: {
+          projects: function () {
+            return $scope.projects;
+          },
+          project: function () {
+            return project;
+          }
+        }
+      });
+    }
+
+    $scope.delete = function (project) {
+      SweetAlert.swal({
+        title: '',
+        text: 'Are you sure to delete ?',
+        type: '',
+        showCancelButton: true,
+        confirmButtonColor: '#DD6B55',
+        confirmButtonText: "Yes",
+        closeOnConfirm: true
+      }, function (isConfirm) {
+        if (isConfirm) {
+          ProjectService.delete({projecId: project.name}, function () {
+            var pIndex = $scope.projects.indexOf(project);
+            if (pIndex > -1) {
+              $scope.projects.splice(pIndex, 1);
+            }
+            ProjectModel.removeProject(project.name);
+            SweetAlert.swal('Success!', "Project [" + project.name + "] has been deleted successfully!", 'success');
+          }, function (e) {
+            if (e.data && e.data.exception) {
+              var message = e.data.exception;
+              var msg = !!(message) ? message : 'Failed to take action.';
+              SweetAlert.swal('Oops...', msg, 'error');
+            } else {
+              SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+            }
+          });
+        }
+      });
+    }
+  }
+);
+

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/query.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/query.js b/webapp/app/js/controllers/query.js
index 10be251..785d07e 100644
--- a/webapp/app/js/controllers/query.js
+++ b/webapp/app/js/controllers/query.js
@@ -14,474 +14,501 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
 KylinApp
-    .controller('QueryCtrl', function ($scope, storage, $base64, $q, $location, $anchorScroll, $routeParams, QueryService, $modal, MessageService, $domUtilityService, $timeout, TableService,SweetAlert) {
-        $scope.mainPanel = 'query';
-        $scope.rowsPerPage = 50000;
-        $scope.base64 = $base64;
-        $scope.queryString = "";
-        $scope.queries = [];
-        $scope.curQuery = null;
-        $scope.dateTypes = [91, 92, 93];
-        $scope.stringTypes = [-1, 1, 12];
-        $scope.numberTypes = [-7, -6, -5, 3, 4, 5, 6, 7, 8];
-        $scope.ui = {fullScreen: false};
-        $scope.chartTypes = [
-            {name: "Line Chart", value: "line", dimension: { types: ['date'], multiple: false }, metrics: { multiple: false }},
-            {name: "Bar Chart", value: "bar", dimension: { types: ['date', 'string'], multiple: false }, metrics: { multiple: false }},
-            {name: "Pie Chart", value: "pie", dimension: { types: ['date', 'string'], multiple: false }, metrics: { multiple: false }}
-        ];
-        $scope.statusList = [
-            {name: 'All', value: ''},
-            {name: 'Executing', value: 'executing'},
-            {name: 'Success', value: 'success'},
-            {name: 'Failed', value: 'failed'}
-        ];
-        $scope.statusFilter = null;
-        $scope.savedQueries = null;
-        $scope.cachedQueries = storage.get("saved_queries");
-        if (!$scope.cachedQueries) {
-            $scope.cachedQueries = [];
-        }
-        $scope.cachedQueries.curPage = 1;
-        $scope.cachedQueries.perPage = 3;
-
-        $scope.srcTables = [];
-        $scope.srcColumns = [];
-
-        $scope.curProject = null;
-        $scope.state = {
-            selectedProject: null
-        };
-
-        var Query = {
-            createNew: function (sql, project) {
-                var query = {
-                    originSql: sql,
-                    sql: sql,
-                    project: (!!project)? project:$scope.projectModel.selectedProject,
-                    status: 'executing',
-                    acceptPartial: true,
-                    result: {
-                        isResponsePartial: false
-                    },
-                    graph: {
-                        meta: {
-                            dimensions: [], //Keys metadata
-                            metrics: [] //Values metadata
-                        },
-                        state: {
-                            dimensions: [], // User selected dimensions
-                            metrics: []  // User selected metrics
-                        },
-                        type: {}, //Graph type
-                        show: false
-                    },
-                    startTime: new Date()
-                };
-
-                return query;
+  .controller('QueryCtrl', function ($scope, storage, $base64, $q, $location, $anchorScroll, $routeParams, QueryService, $modal, MessageService, $domUtilityService, $timeout, TableService, SweetAlert) {
+    $scope.mainPanel = 'query';
+    $scope.rowsPerPage = 50000;
+    $scope.base64 = $base64;
+    $scope.queryString = "";
+    $scope.queries = [];
+    $scope.curQuery = null;
+    $scope.dateTypes = [91, 92, 93];
+    $scope.stringTypes = [-1, 1, 12];
+    $scope.numberTypes = [-7, -6, -5, 3, 4, 5, 6, 7, 8];
+    $scope.ui = {fullScreen: false};
+    $scope.chartTypes = [
+      {name: "Line Chart", value: "line", dimension: {types: ['date'], multiple: false}, metrics: {multiple: false}},
+      {
+        name: "Bar Chart",
+        value: "bar",
+        dimension: {types: ['date', 'string'], multiple: false},
+        metrics: {multiple: false}
+      },
+      {
+        name: "Pie Chart",
+        value: "pie",
+        dimension: {types: ['date', 'string'], multiple: false},
+        metrics: {multiple: false}
+      }
+    ];
+    $scope.statusList = [
+      {name: 'All', value: ''},
+      {name: 'Executing', value: 'executing'},
+      {name: 'Success', value: 'success'},
+      {name: 'Failed', value: 'failed'}
+    ];
+    $scope.statusFilter = null;
+    $scope.savedQueries = null;
+    $scope.cachedQueries = storage.get("saved_queries");
+    if (!$scope.cachedQueries) {
+      $scope.cachedQueries = [];
+    }
+    $scope.cachedQueries.curPage = 1;
+    $scope.cachedQueries.perPage = 3;
+
+    $scope.srcTables = [];
+    $scope.srcColumns = [];
+
+    $scope.curProject = null;
+    $scope.state = {
+      selectedProject: null
+    };
+
+    var Query = {
+      createNew: function (sql, project) {
+        var query = {
+          originSql: sql,
+          sql: sql,
+          project: (!!project) ? project : $scope.projectModel.selectedProject,
+          status: 'executing',
+          acceptPartial: true,
+          result: {
+            isResponsePartial: false
+          },
+          graph: {
+            meta: {
+              dimensions: [], //Keys metadata
+              metrics: [] //Values metadata
             },
+            state: {
+              dimensions: [], // User selected dimensions
+              metrics: []  // User selected metrics
+            },
+            type: {}, //Graph type
+            show: false
+          },
+          startTime: new Date()
+        };
 
-            resetQuery: function (query) {
-                query.status = 'executing';
-                query.result = {
-                    isResponsePartial: false
-                };
-                query.acceptPartial = true;
-                query.graph = {
-                    meta: {
-                        dimensions: [], //Keys metadata
-                        metrics: [] //Values metadata
-                    },
-                    state: {
-                        dimensions: [], // User selected dimensions
-                        metrics: []  // User selected metrics
-                    },
-                    type: {}, //Graph type
-                    show: false
-                };
-                query.startTime = new Date();
-            }
-        }
-
-        $scope.checkLimit = function () {
-            if (!$scope.rowsPerPage) {
-                $scope.rowsPerPage = 50000;
-            }
-        }
+        return query;
+      },
 
-        function getQuery(queries, query) {
-            for (var i = 0; i < queries.length; i++) {
-                if (queries[i].sql == query.sql) {
-                    return queries[i];
-                }
-            }
+      resetQuery: function (query) {
+        query.status = 'executing';
+        query.result = {
+          isResponsePartial: false
+        };
+        query.acceptPartial = true;
+        query.graph = {
+          meta: {
+            dimensions: [], //Keys metadata
+            metrics: [] //Values metadata
+          },
+          state: {
+            dimensions: [], // User selected dimensions
+            metrics: []  // User selected metrics
+          },
+          type: {}, //Graph type
+          show: false
+        };
+        query.startTime = new Date();
+      }
+    }
 
-            return null;
-        }
+    $scope.checkLimit = function () {
+      if (!$scope.rowsPerPage) {
+        $scope.rowsPerPage = 50000;
+      }
+    }
 
-        function makeSuffixRegExp(suffix, caseInsensitive) {
-            return new RegExp(
-                    String(suffix).replace(/[$%()*+.?\[\\\]{|}]/g, "\\$&") + "$",
-                caseInsensitive ? "i" : "");
+    function getQuery(queries, query) {
+      for (var i = 0; i < queries.length; i++) {
+        if (queries[i].sql == query.sql) {
+          return queries[i];
         }
+      }
 
-        function justShowTable() {
-            var words = $scope.queryString.split(/\s+/);
-            words.splice(words.length - 1, words.length);
+      return null;
+    }
 
-            return makeSuffixRegExp("from", true).test(words.toString()) || makeSuffixRegExp("join", true).test(words.toString());
-        }
+    function makeSuffixRegExp(suffix, caseInsensitive) {
+      return new RegExp(
+        String(suffix).replace(/[$%()*+.?\[\\\]{|}]/g, "\\$&") + "$",
+        caseInsensitive ? "i" : "");
+    }
 
-        $scope.setQueryString = function (queryString) {
-            $scope.queryString = queryString;
-        }
+    function justShowTable() {
+      var words = $scope.queryString.split(/\s+/);
+      words.splice(words.length - 1, words.length);
 
-        $scope.aceLoaded = function (_editor) {
-            var langTools = ace.require("ace/ext/language_tools");
-
-            if (!langTools.tableAdded) {
-                langTools.addCompleter({
-                    getCompletions: function (editor, session, pos, prefix, callback) {
-                        if (prefix.length === 0) {
-                            callback(null, []);
-                        } else {
-                            callback(null, $scope.srcTables);
-                        }
-                    }
-                });
-                langTools.tableAdded = true;
-            }
+      return makeSuffixRegExp("from", true).test(words.toString()) || makeSuffixRegExp("join", true).test(words.toString());
+    }
 
-            if (!langTools.columnAdded) {
-                langTools.addCompleter({
-                    getCompletions: function (editor, session, pos, prefix, callback) {
-                        if (prefix.length === 0 || justShowTable()) {
-                            callback(null, []);
-                        } else {
-                            callback(null, $scope.srcColumns);
-                        }
-                    }
-                });
-                langTools.columnAdded = true;
-            }
+    $scope.setQueryString = function (queryString) {
+      $scope.queryString = queryString;
+    }
 
-            _editor.commands.bindKey("Command-Option-Space", "startAutocomplete")
-            _editor.setOptions({
-                enableBasicAutocompletion: true
-            });
-        }
+    $scope.aceLoaded = function (_editor) {
+      var langTools = ace.require("ace/ext/language_tools");
 
-        $scope.parseQueryResult = function (oneQuery, result, status) {
-            oneQuery.status = status;
-            var data = [];
-
-            angular.forEach(result.results, function (row, index) {
-                var oneRow = {};
-                angular.forEach(result.columnMetas, function (meta, metaIndex) {
-                    oneRow[meta.name] = row[metaIndex];
-                });
-                data.push(oneRow);
-            });
-
-            var columnDefs = [];
-            angular.forEach(result.columnMetas, function (meta, metaIndex) {
-                columnDefs.push({field: meta.name, width: 120});
-            });
-
-            if (oneQuery.result.results) {
-                oneQuery.result.results = oneQuery.result.results.concat(result.results);
+      if (!langTools.tableAdded) {
+        langTools.addCompleter({
+          getCompletions: function (editor, session, pos, prefix, callback) {
+            if (prefix.length === 0) {
+              callback(null, []);
             } else {
-                oneQuery.result = result;
-            }
-
-            if (oneQuery.status == 'success') {
-                if (oneQuery.result.data) {
-                    oneQuery.result.data = oneQuery.result.data.concat(data);
-                } else {
-                    oneQuery.result.data = data;
-                }
-
-                $scope.curQuery.result.isResponsePartial = result.partial;
+              callback(null, $scope.srcTables);
             }
-
-            oneQuery.result.gridOptions = {
-                data: 'curQuery.result.data',
-                showGroupPanel: true,
-                enablePinning: true,
-                columnDefs: columnDefs
-            };
-
-            oneQuery.completeTime = new Date();
-        }
-
-        $scope.refreshUi = function () {
-            $scope.ui.fullScreen = !$scope.ui.fullScreen;
-            $timeout(function () {
-                if ($scope.curQuery.result.gridOptions) {
-                    $domUtilityService.RebuildGrid($scope.curQuery.result.gridOptions.$gridScope, $scope.curQuery.result.gridOptions.ngGrid);
-                }
-            });
-        }
-
-        $scope.sanitate = function (sql) {
-            return sql.replace(/\n/g, " ");
-        }
-
-        $scope.query = function (query) {
-            scrollToButton();
-            QueryService.query({}, {sql: query.sql, offset: 0, limit: $scope.rowsPerPage, acceptPartial: query.acceptPartial, project: query.project}, function (result) {
-                scrollToButton();
-                $scope.parseQueryResult(query, result, (!result || result.isException) ? 'failed' : 'success');
-                $scope.curQuery.result.hasMore = (query.result.results && query.result.results.length == $scope.rowsPerPage);
-            }, function (result) {
-                scrollToButton();
-                $scope.parseQueryResult(query, result, 'failed');
-            });
-        }
-
-        function scrollToButton() {
-            $timeout(function () {
-                $location.hash('query_content_results');
-                $anchorScroll();
-            });
-        }
-
-        $scope.submitQuery = function (queryString, project) {
-            if (!queryString && !$scope.queryString) {
-                return;
+          }
+        });
+        langTools.tableAdded = true;
+      }
+
+      if (!langTools.columnAdded) {
+        langTools.addCompleter({
+          getCompletions: function (editor, session, pos, prefix, callback) {
+            if (prefix.length === 0 || justShowTable()) {
+              callback(null, []);
+            } else {
+              callback(null, $scope.srcColumns);
             }
-            var sql = (!!queryString) ? queryString : $scope.queryString;
-            var newQuery = Query.createNew(sql, project);
-            $scope.queries.push(newQuery);
-            $scope.curQuery = newQuery;
-            $scope.query($scope.curQuery);
-            $scope.cacheQuery($scope.curQuery);
+          }
+        });
+        langTools.columnAdded = true;
+      }
+
+      _editor.commands.bindKey("Command-Option-Space", "startAutocomplete")
+      _editor.setOptions({
+        enableBasicAutocompletion: true
+      });
+    }
+
+    $scope.parseQueryResult = function (oneQuery, result, status) {
+      oneQuery.status = status;
+      var data = [];
+
+      angular.forEach(result.results, function (row, index) {
+        var oneRow = {};
+        angular.forEach(result.columnMetas, function (meta, metaIndex) {
+          oneRow[meta.name] = row[metaIndex];
+        });
+        data.push(oneRow);
+      });
+
+      var columnDefs = [];
+      angular.forEach(result.columnMetas, function (meta, metaIndex) {
+        columnDefs.push({field: meta.name, width: 120});
+      });
+
+      if (oneQuery.result.results) {
+        oneQuery.result.results = oneQuery.result.results.concat(result.results);
+      } else {
+        oneQuery.result = result;
+      }
+
+      if (oneQuery.status == 'success') {
+        if (oneQuery.result.data) {
+          oneQuery.result.data = oneQuery.result.data.concat(data);
+        } else {
+          oneQuery.result.data = data;
         }
 
-        $scope.reset = function (query) {
-            Query.resetQuery(query);
-        }
+        $scope.curQuery.result.isResponsePartial = result.partial;
+      }
 
-        $scope.rerun = function () {
-            Query.resetQuery($scope.curQuery);
-            $scope.query($scope.curQuery);
-        }
+      oneQuery.result.gridOptions = {
+        data: 'curQuery.result.data',
+        showGroupPanel: true,
+        enablePinning: true,
+        columnDefs: columnDefs
+      };
 
-        $scope.resetGraph = function (query) {
-            var dimension = (query.graph.meta.dimensions && query.graph.meta.dimensions.length > 0) ? query.graph.meta.dimensions[0] : null;
-            var metrics = (query.graph.meta.metrics && query.graph.meta.metrics.length > 0) ? query.graph.meta.metrics[0] : null;
-            query.graph.state = {
-                dimensions: dimension,
-                metrics: ((query.graph.type.metrics.multiple) ? [metrics] : metrics)
-            };
-        }
+      oneQuery.completeTime = new Date();
+    }
 
-        $scope.loadMore = function (query) {
-            query.result.loading = true;
-            var query = query;
-
-            QueryService.query({}, {sql: query.originSql, offset: query.result.results.length, limit: $scope.rowsPerPage, acceptPartial: query.acceptPartial, project: query.project}, function (result) {
-                if (result && !result.isException) {
-                    $scope.parseQueryResult($scope.curQuery, result, (!result || result.isException) ? 'failed' : 'success');
-                }
-                else {
-                    query.status = 'failed';
-                }
-                query.result.hasMore = (result.results && result.results.length == $scope.rowsPerPage);
-                query.result.loading = false;
-            }, function (result) {
-                query.status = 'failed';
-            });
+    $scope.refreshUi = function () {
+      $scope.ui.fullScreen = !$scope.ui.fullScreen;
+      $timeout(function () {
+        if ($scope.curQuery.result.gridOptions) {
+          $domUtilityService.RebuildGrid($scope.curQuery.result.gridOptions.$gridScope, $scope.curQuery.result.gridOptions.ngGrid);
         }
-
-        $scope.removeResult = function (queryInstance) {
-            if ($scope.curQuery == queryInstance) {
-                $scope.curQuery = null;
-            }
-
-            var index = $scope.queries.indexOf(queryInstance);
-            $scope.queries.splice(index, 1);
-
-            $scope.curQuery = ($scope.queries.length > 0) ? $scope.queries[0] : null;
+      });
+    }
+
+    $scope.sanitate = function (sql) {
+      return sql.replace(/\n/g, " ");
+    }
+
+    $scope.query = function (query) {
+      scrollToButton();
+      QueryService.query({}, {
+        sql: query.sql,
+        offset: 0,
+        limit: $scope.rowsPerPage,
+        acceptPartial: query.acceptPartial,
+        project: query.project
+      }, function (result) {
+        scrollToButton();
+        $scope.parseQueryResult(query, result, (!result || result.isException) ? 'failed' : 'success');
+        $scope.curQuery.result.hasMore = (query.result.results && query.result.results.length == $scope.rowsPerPage);
+      }, function (result) {
+        scrollToButton();
+        $scope.parseQueryResult(query, result, 'failed');
+      });
+    }
+
+    function scrollToButton() {
+      $timeout(function () {
+        $location.hash('query_content_results');
+        $anchorScroll();
+      });
+    }
+
+    $scope.submitQuery = function (queryString, project) {
+      if (!queryString && !$scope.queryString) {
+        return;
+      }
+      var sql = (!!queryString) ? queryString : $scope.queryString;
+      var newQuery = Query.createNew(sql, project);
+      $scope.queries.push(newQuery);
+      $scope.curQuery = newQuery;
+      $scope.query($scope.curQuery);
+      $scope.cacheQuery($scope.curQuery);
+    }
+
+    $scope.reset = function (query) {
+      Query.resetQuery(query);
+    }
+
+    $scope.rerun = function () {
+      Query.resetQuery($scope.curQuery);
+      $scope.query($scope.curQuery);
+    }
+
+    $scope.resetGraph = function (query) {
+      var dimension = (query.graph.meta.dimensions && query.graph.meta.dimensions.length > 0) ? query.graph.meta.dimensions[0] : null;
+      var metrics = (query.graph.meta.metrics && query.graph.meta.metrics.length > 0) ? query.graph.meta.metrics[0] : null;
+      query.graph.state = {
+        dimensions: dimension,
+        metrics: ((query.graph.type.metrics.multiple) ? [metrics] : metrics)
+      };
+    }
+
+    $scope.loadMore = function (query) {
+      query.result.loading = true;
+      var query = query;
+
+      QueryService.query({}, {
+        sql: query.originSql,
+        offset: query.result.results.length,
+        limit: $scope.rowsPerPage,
+        acceptPartial: query.acceptPartial,
+        project: query.project
+      }, function (result) {
+        if (result && !result.isException) {
+          $scope.parseQueryResult($scope.curQuery, result, (!result || result.isException) ? 'failed' : 'success');
         }
-
-        $scope.removeQuery = function (queryInstance) {
-            var queryToRemove = getQuery($scope.cachedQueries, this.query);
-
-            if (queryToRemove) {
-                var index = $scope.cachedQueries.indexOf(queryToRemove);
-                $scope.cachedQueries.splice(index, 1);
-                storage.set("saved_queries", $scope.cachedQueries);
-            }
+        else {
+          query.status = 'failed';
         }
+        query.result.hasMore = (result.results && result.results.length == $scope.rowsPerPage);
+        query.result.loading = false;
+      }, function (result) {
+        query.status = 'failed';
+      });
+    }
+
+    $scope.removeResult = function (queryInstance) {
+      if ($scope.curQuery == queryInstance) {
+        $scope.curQuery = null;
+      }
 
-        $scope.cacheQuery = function (query) {
-            if (!getQuery($scope.cachedQueries, query)) {
+      var index = $scope.queries.indexOf(queryInstance);
+      $scope.queries.splice(index, 1);
 
-                if ($scope.cachedQueries.length >= 99) {
-                    delete $scope.cachedQueries.splice(0, 1);
-                    ;
-                }
+      $scope.curQuery = ($scope.queries.length > 0) ? $scope.queries[0] : null;
+    }
 
-                $scope.cachedQueries.push({
-                    sql: query.sql,
-                    savedAt: new Date(),
-                    project: query.project
-                });
-                storage.set("saved_queries", $scope.cachedQueries);
-            }
-        }
+    $scope.removeQuery = function (queryInstance) {
+      var queryToRemove = getQuery($scope.cachedQueries, this.query);
 
-        $scope.listSavedQueries = function () {
-            QueryService.list({}, function (queries) {
-                $scope.savedQueries = queries;
-                $scope.savedQueries.curPage = 1;
-                $scope.savedQueries.perPage = 3;
-            });
-        }
+      if (queryToRemove) {
+        var index = $scope.cachedQueries.indexOf(queryToRemove);
+        $scope.cachedQueries.splice(index, 1);
+        storage.set("saved_queries", $scope.cachedQueries);
+      }
+    }
 
-        $scope.removeSavedQuery = function (id) {
-            QueryService.delete({subject_id: id}, function () {
-                $scope.listSavedQueries();
-            });
-        }
+    $scope.cacheQuery = function (query) {
+      if (!getQuery($scope.cachedQueries, query)) {
 
-        $scope.refreshCurQuery = function () {
-            $scope.curQuery = this.query;
+        if ($scope.cachedQueries.length >= 99) {
+          delete $scope.cachedQueries.splice(0, 1);
+          ;
         }
 
-        $scope.showSavePanel = function () {
-            $modal.open({
-                templateUrl: 'saveQueryModal.html',
-                controller: saveQueryController,
-                resolve: {
-                    curQuery: function () {
-                        return $scope.curQuery;
-                    }
-                }
-            });
+        $scope.cachedQueries.push({
+          sql: query.sql,
+          savedAt: new Date(),
+          project: query.project
+        });
+        storage.set("saved_queries", $scope.cachedQueries);
+      }
+    }
+
+    $scope.listSavedQueries = function () {
+      QueryService.list({}, function (queries) {
+        $scope.savedQueries = queries;
+        $scope.savedQueries.curPage = 1;
+        $scope.savedQueries.perPage = 3;
+      });
+    }
+
+    $scope.removeSavedQuery = function (id) {
+      QueryService.delete({subject_id: id}, function () {
+        $scope.listSavedQueries();
+      });
+    }
+
+    $scope.refreshCurQuery = function () {
+      $scope.curQuery = this.query;
+    }
+
+    $scope.showSavePanel = function () {
+      $modal.open({
+        templateUrl: 'saveQueryModal.html',
+        controller: saveQueryController,
+        resolve: {
+          curQuery: function () {
+            return $scope.curQuery;
+          }
         }
-
-        var saveQueryController = function ($scope, $modalInstance, curQuery, QueryService) {
-            $scope.curQuery = curQuery;
-
-            $scope.cancel = function () {
-                $modalInstance.dismiss('cancel');
-            }
-
-            $scope.saveQuery = function (query) {
-                QueryService.save({}, {name: query.name, project: query.project, sql: query.sql, description: query.description}, function () {
-                    SweetAlert.swal('Success!', 'New query saved..', 'success');
-                    $modalInstance.dismiss('cancel');
-                });
-            }
+      });
+    }
+
+    var saveQueryController = function ($scope, $modalInstance, curQuery, QueryService) {
+      $scope.curQuery = curQuery;
+
+      $scope.cancel = function () {
+        $modalInstance.dismiss('cancel');
+      }
+
+      $scope.saveQuery = function (query) {
+        QueryService.save({}, {
+          name: query.name,
+          project: query.project,
+          sql: query.sql,
+          description: query.description
+        }, function () {
+          SweetAlert.swal('Success!', 'New query saved..', 'success');
+          $modalInstance.dismiss('cancel');
+        });
+      }
+    }
+
+    $scope.$on('$locationChangeStart', function (event, next, current) {
+      var isExecuting = false;
+      angular.forEach($scope.queries, function (query, index) {
+        if (query.status == "executing") {
+          isExecuting = true;
         }
+      });
+
+      if (isExecuting && (next.replace(current, "").indexOf("#") != 0)) {
+        SweetAlert.swal({
+          title: '',
+          text: "You've executing query in current page, are you sure to leave this page?",
+          type: '',
+          showCancelButton: true,
+          confirmButtonColor: '#DD6B55',
+          confirmButtonText: "Yes",
+          closeOnConfirm: true
+        }, function (isConfirm) {
+          if (!isConfirm) {
+            event.preventDefault();
+          }
 
-        $scope.$on('$locationChangeStart', function (event, next, current) {
-            var isExecuting = false;
-            angular.forEach($scope.queries, function (query, index) {
-                if (query.status == "executing") {
-                    isExecuting = true;
-                }
-            });
-
-            if (isExecuting && (next.replace(current, "").indexOf("#") != 0)) {
-                SweetAlert.swal({
-                    title: '',
-                    text: "You've executing query in current page, are you sure to leave this page?",
-                    type: '',
-                    showCancelButton: true,
-                    confirmButtonColor: '#DD6B55',
-                    confirmButtonText: "Yes",
-                    closeOnConfirm: true
-                }, function(isConfirm) {
-                    if(!isConfirm){
-                        event.preventDefault();
-                    }
-
-                });
-            }
         });
+      }
+    });
 
 
-    })
-    .controller('QueryResultCtrl', function ($scope, storage, $base64, $q, $location, $anchorScroll, $routeParams, QueryService, GraphService) {
-        $scope.buildGraphMetadata = function (query) {
-            if (!query.graph.show) {
-                return;
-            }
-
-            // Build graph metadata
-            query.graph.meta.dimensions = [];
-            query.graph.meta.metrics = [];
-            var datePattern = /_date|_dt/i;
-            query.graph.type = $scope.chartTypes[1];
-            angular.forEach(query.result.columnMetas, function (meta, index) {
-                if (($scope.dateTypes.indexOf(meta.columnType) > -1 || datePattern.test(meta.name))) {
-                    query.graph.type = $scope.chartTypes[0];
-                    query.graph.meta.dimensions.push({
-                        column: meta,
-                        index: index,
-                        type: 'date'
-                    });
-                    return;
-                }
-                if ($scope.stringTypes.indexOf(meta.columnType) > -1) {
-                    query.graph.meta.dimensions.push({
-                        column: meta,
-                        index: index,
-                        type: 'string'
-                    });
-                    return;
-                }
-                if ($scope.numberTypes.indexOf(meta.columnType) > -1) {
-                    query.graph.meta.metrics.push({
-                        column: meta,
-                        index: index
-                    });
-                    return;
-                }
-            });
+  })
+  .controller('QueryResultCtrl', function ($scope, storage, $base64, $q, $location, $anchorScroll, $routeParams, QueryService, GraphService) {
+    $scope.buildGraphMetadata = function (query) {
+      if (!query.graph.show) {
+        return;
+      }
+
+      // Build graph metadata
+      query.graph.meta.dimensions = [];
+      query.graph.meta.metrics = [];
+      var datePattern = /_date|_dt/i;
+      query.graph.type = $scope.chartTypes[1];
+      angular.forEach(query.result.columnMetas, function (meta, index) {
+        if (($scope.dateTypes.indexOf(meta.columnType) > -1 || datePattern.test(meta.name))) {
+          query.graph.type = $scope.chartTypes[0];
+          query.graph.meta.dimensions.push({
+            column: meta,
+            index: index,
+            type: 'date'
+          });
+          return;
         }
-
-        $scope.mappingToChartype = function (dimension) {
-            return $scope.curQuery.graph.type.dimension.types.indexOf(dimension.type) > -1;
+        if ($scope.stringTypes.indexOf(meta.columnType) > -1) {
+          query.graph.meta.dimensions.push({
+            column: meta,
+            index: index,
+            type: 'string'
+          });
+          return;
         }
-
-        $scope.refreshGraphData = function (query) {
-            if (query.graph.show) {
-                query.graph.data = GraphService.buildGraph(query);
-            }
-            else {
-                query.graph.data = [];
-            }
+        if ($scope.numberTypes.indexOf(meta.columnType) > -1) {
+          query.graph.meta.metrics.push({
+            column: meta,
+            index: index
+          });
+          return;
         }
-
-        $scope.xAxisTickFormatFunction = function () {
-            return function (d) {
-                return d3.time.format("%Y-%m-%d")(moment.unix(d).toDate());
-            }
-        };
-
-        $scope.xFunction = function () {
-            return function (d) {
-                return d.key;
-            }
-        };
-
-        $scope.yFunction = function () {
-            return function (d) {
-                return d.y;
-            }
-        }
-
-        $scope.$on('elementClick.directive', function (angularEvent, event) {
-            console.log('clicked.');
-        });
+      });
+    }
+
+    $scope.mappingToChartype = function (dimension) {
+      return $scope.curQuery.graph.type.dimension.types.indexOf(dimension.type) > -1;
+    }
+
+    $scope.refreshGraphData = function (query) {
+      if (query.graph.show) {
+        query.graph.data = GraphService.buildGraph(query);
+      }
+      else {
+        query.graph.data = [];
+      }
+    }
+
+    $scope.xAxisTickFormatFunction = function () {
+      return function (d) {
+        return d3.time.format("%Y-%m-%d")(moment.unix(d).toDate());
+      }
+    };
+
+    $scope.xFunction = function () {
+      return function (d) {
+        return d.key;
+      }
+    };
+
+    $scope.yFunction = function () {
+      return function (d) {
+        return d.y;
+      }
+    }
+
+    $scope.$on('elementClick.directive', function (angularEvent, event) {
+      console.log('clicked.');
     });
+  });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/sourceMeta.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/sourceMeta.js b/webapp/app/js/controllers/sourceMeta.js
index 1e100a0..74c897e 100755
--- a/webapp/app/js/controllers/sourceMeta.js
+++ b/webapp/app/js/controllers/sourceMeta.js
@@ -14,144 +14,144 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
 KylinApp
-    .controller('SourceMetaCtrl', function ($scope,$cacheFactory, $q, $window, $routeParams, CubeService, $modal, TableService,$route,loadingRequest,SweetAlert,tableConfig,TableModel) {
-        var $httpDefaultCache = $cacheFactory.get('$http');
-       $scope.tableModel = TableModel;
-        $scope.tableModel.selectedSrcDb = [];
-        $scope.tableModel.selectedSrcTable = {};
-        $scope.window = 0.68 * $window.innerHeight;
-        $scope.tableConfig = tableConfig;
-
-
-       $scope.state = { filterAttr: 'id', filterReverse:false, reverseColumn: 'id',
-            dimensionFilter: '', measureFilter: ''};
-
-       function innerSort(a, b) {
-            var nameA = a.name.toLowerCase(), nameB = b.name.toLowerCase();
-            if (nameA < nameB) //sort string ascending
-                return -1;
-            if (nameA > nameB)
-                return 1;
-            return 0; //default return value (no sorting)
-       };
-
-        $scope.aceSrcTbLoaded = function (forceLoad) {
-             if (forceLoad)
-            {
-                $httpDefaultCache.removeAll();
-            }
-            $scope.loading = true;
-            TableModel.aceSrcTbLoaded(forceLoad).then(function(){
-                $scope.loading = false;
-            });
-        };
-
-        $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
+  .controller('SourceMetaCtrl', function ($scope, $cacheFactory, $q, $window, $routeParams, CubeService, $modal, TableService, $route, loadingRequest, SweetAlert, tableConfig, TableModel) {
+    var $httpDefaultCache = $cacheFactory.get('$http');
+    $scope.tableModel = TableModel;
+    $scope.tableModel.selectedSrcDb = [];
+    $scope.tableModel.selectedSrcTable = {};
+    $scope.window = 0.68 * $window.innerHeight;
+    $scope.tableConfig = tableConfig;
+
+
+    $scope.state = {
+      filterAttr: 'id', filterReverse: false, reverseColumn: 'id',
+      dimensionFilter: '', measureFilter: ''
+    };
+
+    function innerSort(a, b) {
+      var nameA = a.name.toLowerCase(), nameB = b.name.toLowerCase();
+      if (nameA < nameB) //sort string ascending
+        return -1;
+      if (nameA > nameB)
+        return 1;
+      return 0; //default return value (no sorting)
+    };
+
+    $scope.aceSrcTbLoaded = function (forceLoad) {
+      if (forceLoad) {
+        $httpDefaultCache.removeAll();
+      }
+      $scope.loading = true;
+      TableModel.aceSrcTbLoaded(forceLoad).then(function () {
+        $scope.loading = false;
+      });
+    };
+
+    $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
 //         will load table when enter this page,null or not
-            $scope.aceSrcTbLoaded();
-
-        });
-
-
-        $scope.showSelected = function (obj) {
-            if (obj.uuid) {
-                $scope.tableModel.selectedSrcTable = obj;
-            }
-            else if(obj.datatype) {
-                $scope.tableModel.selectedSrcTable.selectedSrcColumn = obj;
-            }
-        };
-
-        $scope.aceSrcTbChanged = function () {
-            $scope.tableModel.selectedSrcDb = [];
-            $scope.tableModel.selectedSrcTable = {};
-            $scope.aceSrcTbLoaded(true);
-        };
-
-
-        $scope.openModal = function () {
-            $modal.open({
-                templateUrl: 'addHiveTable.html',
-                controller: ModalInstanceCtrl,
-                resolve: {
-                    tableNames: function () {
-                      return $scope.tableNames;
-                    },
-                    projectName:function(){
-                      return  $scope.projectModel.selectedProject;
-                    },
-                    scope: function () {
-                        return $scope;
-                    }
-                }
-            });
-        };
-
-        var ModalInstanceCtrl = function ($scope,$location, $modalInstance, tableNames, MessageService,projectName,scope) {
-            $scope.tableNames = "";
-            $scope.projectName = projectName;
-            $scope.cancel = function () {
-                $modalInstance.dismiss('cancel');
-            };
-            $scope.add = function () {
-                if($scope.tableNames.trim()===""){
-                    SweetAlert.swal('','Please input table(s) you want to synchronize.', 'info');
-                  return;
-                }
-
-                if(!$scope.projectName){
-                    SweetAlert.swal('','Please choose your project first!.', 'info');
-                    return;
-                }
-
-                $scope.cancel();
-                loadingRequest.show();
-                TableService.loadHiveTable({tableName: $scope.tableNames,action:projectName}, {}, function (result) {
-                    var loadTableInfo="";
-                    angular.forEach(result['result.loaded'],function(table){
-                        loadTableInfo+="\n"+table;
-                    })
-                    var unloadedTableInfo="";
-                    angular.forEach(result['result.unloaded'],function(table){
-                        unloadedTableInfo+="\n"+table;
-                    })
-
-                    if(result['result.unloaded'].length!=0&&result['result.loaded'].length==0){
-                        SweetAlert.swal('Failed!','Failed to synchronize following table(s): ' + unloadedTableInfo , 'error');
-                    }
-                    if(result['result.loaded'].length!=0&&result['result.unloaded'].length==0){
-                        SweetAlert.swal('Success!','The following table(s) have been successfully synchronized: ' + loadTableInfo , 'success');
-                    }
-                    if(result['result.loaded'].length!=0&&result['result.unloaded'].length!=0){
-                        SweetAlert.swal('Partial loaded!','The following table(s) have been successfully synchronized: ' + loadTableInfo+"\n\n Failed to synchronize following table(s):"  + unloadedTableInfo, 'warning');
-                    }
-                    loadingRequest.hide();
-                    scope.aceSrcTbLoaded(true);
-
-                },function(e){
-                    if(e.data&& e.data.exception){
-                        var message =e.data.exception;
-                        var msg = !!(message) ? message : 'Failed to take action.';
-                        SweetAlert.swal('Oops...', msg, 'error');
-                    }else{
-                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                    }
-                    loadingRequest.hide();
-                })
-            }
-        };
-        $scope.trimType = function(typeName){
-            if (typeName.match(/VARCHAR/i))
-            {
-                typeName = "VARCHAR";
-            }
-
-            return  typeName.trim().toLowerCase();
-        }
+      $scope.aceSrcTbLoaded();
+
     });
 
+
+    $scope.showSelected = function (obj) {
+      if (obj.uuid) {
+        $scope.tableModel.selectedSrcTable = obj;
+      }
+      else if (obj.datatype) {
+        $scope.tableModel.selectedSrcTable.selectedSrcColumn = obj;
+      }
+    };
+
+    $scope.aceSrcTbChanged = function () {
+      $scope.tableModel.selectedSrcDb = [];
+      $scope.tableModel.selectedSrcTable = {};
+      $scope.aceSrcTbLoaded(true);
+    };
+
+
+    $scope.openModal = function () {
+      $modal.open({
+        templateUrl: 'addHiveTable.html',
+        controller: ModalInstanceCtrl,
+        resolve: {
+          tableNames: function () {
+            return $scope.tableNames;
+          },
+          projectName: function () {
+            return $scope.projectModel.selectedProject;
+          },
+          scope: function () {
+            return $scope;
+          }
+        }
+      });
+    };
+
+    var ModalInstanceCtrl = function ($scope, $location, $modalInstance, tableNames, MessageService, projectName, scope) {
+      $scope.tableNames = "";
+      $scope.projectName = projectName;
+      $scope.cancel = function () {
+        $modalInstance.dismiss('cancel');
+      };
+      $scope.add = function () {
+        if ($scope.tableNames.trim() === "") {
+          SweetAlert.swal('', 'Please input table(s) you want to synchronize.', 'info');
+          return;
+        }
+
+        if (!$scope.projectName) {
+          SweetAlert.swal('', 'Please choose your project first!.', 'info');
+          return;
+        }
+
+        $scope.cancel();
+        loadingRequest.show();
+        TableService.loadHiveTable({tableName: $scope.tableNames, action: projectName}, {}, function (result) {
+          var loadTableInfo = "";
+          angular.forEach(result['result.loaded'], function (table) {
+            loadTableInfo += "\n" + table;
+          })
+          var unloadedTableInfo = "";
+          angular.forEach(result['result.unloaded'], function (table) {
+            unloadedTableInfo += "\n" + table;
+          })
+
+          if (result['result.unloaded'].length != 0 && result['result.loaded'].length == 0) {
+            SweetAlert.swal('Failed!', 'Failed to synchronize following table(s): ' + unloadedTableInfo, 'error');
+          }
+          if (result['result.loaded'].length != 0 && result['result.unloaded'].length == 0) {
+            SweetAlert.swal('Success!', 'The following table(s) have been successfully synchronized: ' + loadTableInfo, 'success');
+          }
+          if (result['result.loaded'].length != 0 && result['result.unloaded'].length != 0) {
+            SweetAlert.swal('Partial loaded!', 'The following table(s) have been successfully synchronized: ' + loadTableInfo + "\n\n Failed to synchronize following table(s):" + unloadedTableInfo, 'warning');
+          }
+          loadingRequest.hide();
+          scope.aceSrcTbLoaded(true);
+
+        }, function (e) {
+          if (e.data && e.data.exception) {
+            var message = e.data.exception;
+            var msg = !!(message) ? message : 'Failed to take action.';
+            SweetAlert.swal('Oops...', msg, 'error');
+          } else {
+            SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+          }
+          loadingRequest.hide();
+        })
+      }
+    };
+    $scope.trimType = function (typeName) {
+      if (typeName.match(/VARCHAR/i)) {
+        typeName = "VARCHAR";
+      }
+
+      return typeName.trim().toLowerCase();
+    }
+  });
+


[21/39] incubator-kylin git commit: update minicluster test data

Posted by li...@apache.org.
update minicluster test data


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

Branch: refs/heads/staging
Commit: 7514ad210a500a1452de1cfe6130fa38c727dcd2
Parents: d046f6a
Author: lukehan <lu...@apache.org>
Authored: Wed Apr 22 22:58:04 2015 +0800
Committer: lukehan <lu...@apache.org>
Committed: Thu Apr 23 23:05:22 2015 +0800

----------------------------------------------------------------------
 .../minicluster/hbase-export.tar.gz             | Bin 22225586 -> 22048217 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/7514ad21/examples/test_case_data/minicluster/hbase-export.tar.gz
----------------------------------------------------------------------
diff --git a/examples/test_case_data/minicluster/hbase-export.tar.gz b/examples/test_case_data/minicluster/hbase-export.tar.gz
old mode 100644
new mode 100755
index d68db55..9a327a2
Binary files a/examples/test_case_data/minicluster/hbase-export.tar.gz and b/examples/test_case_data/minicluster/hbase-export.tar.gz differ


[04/39] incubator-kylin git commit: KYLIN-681 Failed to build dictionary if the rowkey's dictionary property is "date(yyyy-mm-dd)"

Posted by li...@apache.org.
KYLIN-681 Failed to build dictionary if the rowkey's dictionary property is "date(yyyy-mm-dd)"

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

Branch: refs/heads/staging
Commit: 4a41d7e0902d91037f53cc0c96f20d9d246f4560
Parents: 022f05c
Author: Shao Feng, Shi <sh...@ebay.com>
Authored: Tue Apr 14 12:34:18 2015 +0800
Committer: Shao Feng, Shi <sh...@ebay.com>
Committed: Tue Apr 14 12:34:18 2015 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kylin/dict/DictionaryManager.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4a41d7e0/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
----------------------------------------------------------------------
diff --git a/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java b/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
index d61c4fa..8e5d599 100644
--- a/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
+++ b/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
@@ -244,7 +244,7 @@ public class DictionaryManager {
 
     private String unpackDataSet(String tempHDFSDir, String dataSetName) throws IOException {
 
-        InputStream in = this.getClass().getResourceAsStream("/com/kylinolap/dict/" + dataSetName + ".txt");
+        InputStream in = this.getClass().getResourceAsStream("/org/apache/kylin/dict/" + dataSetName + ".txt");
         if (in == null) // data set resource not found
             return null;
 


[14/39] incubator-kylin git commit: KYLIN-696 Dictionary couldn't recognize a value and throw IllegalArgumentException: "Not a valid value"

Posted by li...@apache.org.
KYLIN-696 Dictionary couldn't recognize a value and throw IllegalArgumentException: "Not a valid value"

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

Branch: refs/heads/staging
Commit: ac5bb81be349a7082de76cbeb92713c9a22e82d1
Parents: 9304cb2
Author: Shao Feng, Shi <sh...@ebay.com>
Authored: Mon Apr 20 12:55:07 2015 +0800
Committer: Shao Feng, Shi <sh...@ebay.com>
Committed: Mon Apr 20 12:55:07 2015 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kylin/dict/DictionaryManager.java  | 4 ++--
 .../java/org/apache/kylin/metadata/model/DataModelDesc.java     | 5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ac5bb81b/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
----------------------------------------------------------------------
diff --git a/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java b/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
index 8e5d599..3a2cb8d 100644
--- a/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
+++ b/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
@@ -211,9 +211,9 @@ public class DictionaryManager {
 
         // normal case, source from lookup table
         if ("true".equals(dict) || "string".equals(dict) || "number".equals(dict) || "any".equals(dict)) {
-            // FK on fact table, use PK from lookup instead
+            // FK on fact table and join type is inner, use PK from lookup instead
             if (model.isFactTable(col.getTable())) {
-                TblColRef pkCol = model.findPKByFK(col);
+                TblColRef pkCol = model.findPKByFK(col, "inner");
                 if (pkCol != null)
                     col = pkCol; // scan the counterparty PK on lookup table
                 // instead

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ac5bb81b/metadata/src/main/java/org/apache/kylin/metadata/model/DataModelDesc.java
----------------------------------------------------------------------
diff --git a/metadata/src/main/java/org/apache/kylin/metadata/model/DataModelDesc.java b/metadata/src/main/java/org/apache/kylin/metadata/model/DataModelDesc.java
index c9271fc..8a753f7 100644
--- a/metadata/src/main/java/org/apache/kylin/metadata/model/DataModelDesc.java
+++ b/metadata/src/main/java/org/apache/kylin/metadata/model/DataModelDesc.java
@@ -119,7 +119,7 @@ public class DataModelDesc extends RootPersistentEntity {
         this.capacity = capacity;
     }
 
-    public TblColRef findPKByFK(TblColRef fk) {
+    public TblColRef findPKByFK(TblColRef fk, String joinType) {
         assert isFactTable(fk.getTable());
 
         TblColRef candidate = null;
@@ -129,6 +129,9 @@ public class DataModelDesc extends RootPersistentEntity {
             if (join == null)
                 continue;
 
+            if(joinType != null && !joinType.equals(join.getType()))
+                continue;
+
             int find = ArrayUtils.indexOf(join.getForeignKeyColumns(), fk);
             if (find >= 0) {
                 candidate = join.getPrimaryKeyColumns()[find];


[28/39] incubator-kylin git commit: KYLIN-722 format local js

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/message.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/message.js b/webapp/app/js/services/message.js
index a5a6d1c..b2c3d09 100644
--- a/webapp/app/js/services/message.js
+++ b/webapp/app/js/services/message.js
@@ -14,44 +14,44 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.service('MessageService', ['config_ui_messenger', function (config_ui_messenger) {
 
-    this.sendMsg = function (msg, type, actions, sticky, position) {
-        var options = {
-            'theme': config_ui_messenger.theme
-        };
+  this.sendMsg = function (msg, type, actions, sticky, position) {
+    var options = {
+      'theme': config_ui_messenger.theme
+    };
 
-        var data = {
-            message: msg,
-            type: angular.isDefined(type) ? type : 'info',
-            actions: actions,
-            showCloseButton: true
-        };
+    var data = {
+      message: msg,
+      type: angular.isDefined(type) ? type : 'info',
+      actions: actions,
+      showCloseButton: true
+    };
 
-        // Whether sticky the message, otherwise it will hide after a period.
-        if (angular.isDefined(sticky) && sticky === true) {
-            data.hideAfter = false;
-        }
-
-        // Specify the position, otherwise it will be default 'bottom_right'.
-        if (angular.isDefined(position) && config_ui_messenger.location.hasOwnProperty(position)) {
-            options.extraClasses = config_ui_messenger.location[position];
-        }
+    // Whether sticky the message, otherwise it will hide after a period.
+    if (angular.isDefined(sticky) && sticky === true) {
+      data.hideAfter = false;
+    }
 
-        Messenger(options).post(data);
+    // Specify the position, otherwise it will be default 'bottom_right'.
+    if (angular.isDefined(position) && config_ui_messenger.location.hasOwnProperty(position)) {
+      options.extraClasses = config_ui_messenger.location[position];
     }
+
+    Messenger(options).post(data);
+  }
 }]);
 
 KylinApp.value('config_ui_messenger', {
-    location: {
-        top_left: 'messenger-fixed messenger-on-top messenger-on-left',
-        top_center: 'messenger-fixed messenger-on-top',
-        top_right: 'messenger-fixed messenger-on-top message-on-right',
-        bottom_left: "messenger-fixed messenger-on-bottom messenger-on-left",
-        bottom_center: 'messenger-fixed messenger-on-bottom',
-        bottom_right: 'messenger-fixed messenger-on-bottom messenger-on-right'
-    },
-    theme: 'ice'
+  location: {
+    top_left: 'messenger-fixed messenger-on-top messenger-on-left',
+    top_center: 'messenger-fixed messenger-on-top',
+    top_right: 'messenger-fixed messenger-on-top message-on-right',
+    bottom_left: "messenger-fixed messenger-on-bottom messenger-on-left",
+    bottom_center: 'messenger-fixed messenger-on-bottom',
+    bottom_right: 'messenger-fixed messenger-on-bottom messenger-on-right'
+  },
+  theme: 'ice'
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/model.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/model.js b/webapp/app/js/services/model.js
index 681ce75..b31b0a3 100644
--- a/webapp/app/js/services/model.js
+++ b/webapp/app/js/services/model.js
@@ -14,10 +14,10 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.factory('ModelService', ['$resource', function ($resource, config) {
-    return $resource(Config.service.url + 'model/:model_name/:propName/:propValue/:action', {}, {
-        get: {method: 'GET', params: {}, isArray: false}
-    });
+  return $resource(Config.service.url + 'model/:model_name/:propName/:propValue/:action', {}, {
+    get: {method: 'GET', params: {}, isArray: false}
+  });
 }])

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/ngLoading.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/ngLoading.js b/webapp/app/js/services/ngLoading.js
index be05a2c..b0c4312 100644
--- a/webapp/app/js/services/ngLoading.js
+++ b/webapp/app/js/services/ngLoading.js
@@ -14,39 +14,39 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 var module = angular.module('ngLoadingRequest', []);
 module.provider('loadingRequest', function () {
 
-    this.$get = ['$document', '$window', function ($document, $window) {
-        var body = $document.find('body');
+  this.$get = ['$document', '$window', function ($document, $window) {
+    var body = $document.find('body');
 
-        var loadTemplate = angular.element('<div class="kylinLoadingRequest"><div class="loadingOverlay" ></div>' +
-            '<div id="loadingCntnr" class="showbox" style="opacity: 0; margin-top: 250px;">'+
-            '<div class="loadingWord" ><img src="image/waiting.gif"><span>Please wait...</span></div>'+
-            '</div> </div>');
+    var loadTemplate = angular.element('<div class="kylinLoadingRequest"><div class="loadingOverlay" ></div>' +
+    '<div id="loadingCntnr" class="showbox" style="opacity: 0; margin-top: 250px;">' +
+    '<div class="loadingWord" ><img src="image/waiting.gif"><span>Please wait...</span></div>' +
+    '</div> </div>');
 
-        var createOverlay = function () {
-                if(!body.find(".kylinLoadingRequest").length){
-                   body.append(loadTemplate);
-                }
-                $(".loadingOverlay").css({'display':'block','opacity':'0.8'});
-                $(".showbox").stop(true).animate({'margin-top':'300px','opacity':'1'},200);
-            };
-        return {
-            show: function () {
-                createOverlay();
-            },
-            hide: function () {
-                $(".showbox").stop(true).animate({'margin-top':'250px','opacity':'0'},2000);
-                $(".loadingOverlay").css({'display':'none','opacity':'0'});
-                if(body.find(".kylinLoadingRequest").length){
-                    body.find(".kylinLoadingRequest").remove();
-                }
-
-            }
+    var createOverlay = function () {
+      if (!body.find(".kylinLoadingRequest").length) {
+        body.append(loadTemplate);
+      }
+      $(".loadingOverlay").css({'display': 'block', 'opacity': '0.8'});
+      $(".showbox").stop(true).animate({'margin-top': '300px', 'opacity': '1'}, 200);
+    };
+    return {
+      show: function () {
+        createOverlay();
+      },
+      hide: function () {
+        $(".showbox").stop(true).animate({'margin-top': '250px', 'opacity': '0'}, 2000);
+        $(".loadingOverlay").css({'display': 'none', 'opacity': '0'});
+        if (body.find(".kylinLoadingRequest").length) {
+          body.find(".kylinLoadingRequest").remove();
         }
 
-    }]
+      }
+    }
+
+  }]
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/projects.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/projects.js b/webapp/app/js/services/projects.js
index 2278d84..333e742 100644
--- a/webapp/app/js/services/projects.js
+++ b/webapp/app/js/services/projects.js
@@ -14,13 +14,13 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.factory('ProjectService', ['$resource', function ($resource, config) {
-    return $resource(Config.service.url + 'projects/:projecId/:propName/:propValue/:action', {}, {
-        list: {method: 'GET', params: {}, isArray: true},
-        save: {method: 'POST', params: {}, isArray: false},
-        update: {method: 'PUT', params:{}, isArray: false},
-        delete: {method: 'DELETE', params: {}, isArray: false }
-    });
+  return $resource(Config.service.url + 'projects/:projecId/:propName/:propValue/:action', {}, {
+    list: {method: 'GET', params: {}, isArray: true},
+    save: {method: 'POST', params: {}, isArray: false},
+    update: {method: 'PUT', params: {}, isArray: false},
+    delete: {method: 'DELETE', params: {}, isArray: false}
+  });
 }]);

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/query.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/query.js b/webapp/app/js/services/query.js
index cb82a54..fbc7ff9 100644
--- a/webapp/app/js/services/query.js
+++ b/webapp/app/js/services/query.js
@@ -14,16 +14,16 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.factory('QueryService', ['$resource', function ($resource, config) {
-    return $resource(Config.service.url + ':subject/:subject_id/:propName/:propValue/:action', {}, {
-        query: {method: 'POST', params: {action: 'query'}, isArray: false},
-        save: {method: 'POST', params: {subject: 'saved_queries'}, isArray: false},
-        delete: {method: 'DELETE', params: {subject: 'saved_queries'}, isArray: false},
-        list: {method: 'GET', params: {subject: 'saved_queries'}, isArray: true},
-        export: {method: 'GET', params: {subject: 'query', propName: 'format', propValue: 'csv'}, isArray: false},
-        getTables: {method: 'GET', params: {subject: 'tables_and_columns'}, isArray: true}
-    });
+  return $resource(Config.service.url + ':subject/:subject_id/:propName/:propValue/:action', {}, {
+    query: {method: 'POST', params: {action: 'query'}, isArray: false},
+    save: {method: 'POST', params: {subject: 'saved_queries'}, isArray: false},
+    delete: {method: 'DELETE', params: {subject: 'saved_queries'}, isArray: false},
+    list: {method: 'GET', params: {subject: 'saved_queries'}, isArray: true},
+    export: {method: 'GET', params: {subject: 'query', propName: 'format', propValue: 'csv'}, isArray: false},
+    getTables: {method: 'GET', params: {subject: 'tables_and_columns'}, isArray: true}
+  });
 }])
 ;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/tables.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/tables.js b/webapp/app/js/services/tables.js
index 9b9daad..1f1f15a 100755
--- a/webapp/app/js/services/tables.js
+++ b/webapp/app/js/services/tables.js
@@ -14,15 +14,15 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.factory('TableService', ['$resource', function ($resource, config) {
-    return $resource(Config.service.url + 'tables/:tableName/:action', {}, {
-        list: {method: 'GET', params: {}, cache: true, isArray: true},
-        get: {method: 'GET', params: {}, isArray: false},
-        getExd: {method: 'GET', params: {action: 'exd-map'}, isArray: false},
-        reload: {method: 'PUT', params: {action: 'reload'}, isArray: false},
-        loadHiveTable: {method: 'POST', params: {}, isArray: false},
-        genCardinality: {method: 'PUT', params: {action: 'cardinality'}, isArray: false}
-    });
+  return $resource(Config.service.url + 'tables/:tableName/:action', {}, {
+    list: {method: 'GET', params: {}, cache: true, isArray: true},
+    get: {method: 'GET', params: {}, isArray: false},
+    getExd: {method: 'GET', params: {action: 'exd-map'}, isArray: false},
+    reload: {method: 'PUT', params: {action: 'reload'}, isArray: false},
+    loadHiveTable: {method: 'POST', params: {}, isArray: false},
+    genCardinality: {method: 'PUT', params: {action: 'cardinality'}, isArray: false}
+  });
 }]);

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/tree.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/tree.js b/webapp/app/js/services/tree.js
index 0a565af..cb1ff39 100755
--- a/webapp/app/js/services/tree.js
+++ b/webapp/app/js/services/tree.js
@@ -14,313 +14,312 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.service('CubeGraphService', function () {
 
-    var margin = {top: 20, right: 100, bottom: 20, left: 100},
-        width = 1100 - margin.right - margin.left,
-        height = 600;
+  var margin = {top: 20, right: 100, bottom: 20, left: 100},
+    width = 1100 - margin.right - margin.left,
+    height = 600;
 
-    this.buildTree = function (cube) {
-        $("#cube_graph_" + cube.name).empty();
+  this.buildTree = function (cube) {
+    $("#cube_graph_" + cube.name).empty();
 
-        var tree = d3.layout.tree().size([height, width - 160]);
-        var diagonal = d3.svg.diagonal().projection(function (d) {
-            return [d.y, d.x];
-        });
-
-        var svg = d3.select("#cube_graph_" + cube.name).append("svg:svg")
-            .attr("width", width + margin.right + margin.left)
-            .attr("height", height)
-            .append("svg:g")
-            .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
+    var tree = d3.layout.tree().size([height, width - 160]);
+    var diagonal = d3.svg.diagonal().projection(function (d) {
+      return [d.y, d.x];
+    });
 
-        var graphData = {
-            "type": "fact",
-            "name": cube.model.fact_table,
-            "children": []
-        };
+    var svg = d3.select("#cube_graph_" + cube.name).append("svg:svg")
+      .attr("width", width + margin.right + margin.left)
+      .attr("height", height)
+      .append("svg:g")
+      .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
 
-        cube.graph = (!!cube.graph) ? cube.graph : {};
+    var graphData = {
+      "type": "fact",
+      "name": cube.model.fact_table,
+      "children": []
+    };
 
-      //angular.forEach(cube.detail.dimensions, function (dimension, index) {
-      angular.forEach(cube.model.lookups, function (lookup, index) {
-        if (lookup.join && lookup.join.primary_key.length > 0) {
+    cube.graph = (!!cube.graph) ? cube.graph : {};
 
-          var dimensionNode;
+    //angular.forEach(cube.detail.dimensions, function (dimension, index) {
+    angular.forEach(cube.model.lookups, function (lookup, index) {
+      if (lookup.join && lookup.join.primary_key.length > 0) {
 
-          /* Loop through the graphData.children array to find out: If the LKP table is already existed */
-          for(var j = 0; j < graphData.children.length; j++ ) {
-            if(graphData.children[j].name == lookup.table){
-              dimensionNode = graphData.children[j];
-              break;
-            }
-          }
+        var dimensionNode;
 
-          /* If not existed, create dimensionNode and push it */
-          if(j == graphData.children.length) {
-            dimensionNode = {
-              "type": "dimension",
-              "name": lookup.table,
-              "join": lookup.join,
-              "children": [],
-              "_children": []
-            };
+        /* Loop through the graphData.children array to find out: If the LKP table is already existed */
+        for (var j = 0; j < graphData.children.length; j++) {
+          if (graphData.children[j].name == lookup.table) {
+            dimensionNode = graphData.children[j];
+            break;
           }
+        }
 
-          if(j == graphData.children.length) {
-            graphData.children.push(dimensionNode);
-          }
+        /* If not existed, create dimensionNode and push it */
+        if (j == graphData.children.length) {
+          dimensionNode = {
+            "type": "dimension",
+            "name": lookup.table,
+            "join": lookup.join,
+            "children": [],
+            "_children": []
+          };
+        }
 
+        if (j == graphData.children.length) {
+          graphData.children.push(dimensionNode);
         }
-      });
 
-      angular.forEach(cube.detail.dimensions, function (dimension, index) {
-        // for dimension on lookup table
-        if(cube.model.fact_table!==dimension.table){
-            var lookup = _.find(graphData.children,function(item){
-              return item.name === dimension.table;
+      }
+    });
+
+    angular.forEach(cube.detail.dimensions, function (dimension, index) {
+      // for dimension on lookup table
+      if (cube.model.fact_table !== dimension.table) {
+        var lookup = _.find(graphData.children, function (item) {
+          return item.name === dimension.table;
+        });
+
+        angular.forEach(lookup.join.primary_key, function (pk, index) {
+          for (var i = 0; i < lookup._children.length; i++) {
+            if (lookup._children[i].name == pk)
+              break;
+          }
+          if (i == lookup._children.length) {
+            lookup._children.push({
+              "type": "column",
+              "name": pk
             });
+          }
+        });
 
-          angular.forEach(lookup.join.primary_key, function(pk, index){
-                  for (var i = 0; i < lookup._children.length; i++) {
-                      if(lookup._children[i].name == pk)
-                          break;
-                  }
-                  if(i == lookup._children.length) {
-                    lookup._children.push({
-                          "type": "column",
-                          "name": pk
-                      });
-                  }
+        if (dimension.derived && dimension.derived.length) {
+          angular.forEach(dimension.derived, function (derived, index) {
+            for (var i = 0; i < lookup._children.length; i++) {
+              if (lookup._children[i].name == derived)
+                break;
+            }
+            if (i == lookup._children.length) {
+              lookup._children.push({
+                "type": "column",
+                "name": derived + "(DERIVED)"
+              });
+            }
           });
+        }
 
-          if (dimension.derived&&dimension.derived.length)
-          {
-              angular.forEach(dimension.derived, function(derived, index){
-                  for (var i = 0; i < lookup._children.length; i++) {
-                      if(lookup._children[i].name == derived)
-                          break;
-                  }
-                  if(i == lookup._children.length) {
-                    lookup._children.push({
-                          "type": "column",
-                          "name": derived + "(DERIVED)"
-                      });
-                  }
+        if (dimension.hierarchy) {
+          angular.forEach(dimension.column, function (hierarchy, index) {
+            for (var i = 0; i < lookup._children.length; i++) {
+              if (lookup._children[i].name == hierarchy)
+                break;
+            }
+            if (i == lookup._children.length) {
+              lookup._children.push({
+                "type": "column",
+                "name": hierarchy + "(HIERARCHY)"
               });
+            }
+          });
+        }
+
+      }
+      ;
+    });
+    cube.graph.columnsCount = 0;
+    cube.graph.tree = tree;
+    cube.graph.root = graphData;
+    cube.graph.svg = svg;
+    cube.graph.diagonal = diagonal;
+    cube.graph.i = 0;
+
+    cube.graph.root.x0 = height / 2;
+    cube.graph.root.y0 = 0;
+    update(cube.graph.root, cube);
+  }
+
+  function update(source, cube) {
+    var duration = 750;
+
+    // Compute the new tree layout.
+    var nodes = cube.graph.tree.nodes(cube.graph.root).reverse();
+
+    // Update the nodes
+    var node = cube.graph.svg.selectAll("g.node")
+      .data(nodes, function (d) {
+        return d.id || (d.id = ++cube.graph.i);
+      });
+
+    var nodeEnter = node.enter().append("svg:g")
+      .attr("class", "node")
+      .attr("transform", function (d) {
+        return "translate(" + source.y0 + "," + source.x0 + ")";
+      });
+
+    // Enter any new nodes at the parent's previous position.
+    nodeEnter.append("svg:circle")
+      .attr("r", 4.5)
+      .style("fill", function (d) {
+        switch (d.type) {
+          case 'fact':
+            return '#fff';
+          case 'dimension':
+            return '#B0C4DE';
+          case 'column':
+            return 'black'
+          default:
+            return '#B0C4DE';
+        }
+      })
+      .on("click", function (d) {
+        if (d.children) {
+          d._children = d.children;
+          d.children = null;
+
+          if (d.type == 'dimension') {
+            cube.graph.columnsCount -= d._children.length;
           }
+        } else {
+          d.children = d._children;
+          d._children = null;
 
-          if (dimension.hierarchy)
-          {
-              angular.forEach(dimension.column, function(hierarchy, index){
-                  for (var i = 0; i < lookup._children.length; i++) {
-                      if(lookup._children[i].name == hierarchy)
-                          break;
-                  }
-                  if(i == lookup._children.length) {
-                    lookup._children.push({
-                          "type": "column",
-                          "name": hierarchy + "(HIERARCHY)"
-                      });
-                  }
-              });
+          if (d.type == 'dimension') {
+            cube.graph.columnsCount += d.children.length;
           }
+        }
 
-        };
+        var perColumn = 35;
+        var newHeight = (((cube.graph.columnsCount * perColumn > height) ? cube.graph.columnsCount * perColumn : height));
+        $("#cube_graph_" + cube.name + " svg").height(newHeight);
+        cube.graph.tree.size([newHeight, width - 160]);
+        update(d, cube);
       });
-        cube.graph.columnsCount = 0;
-        cube.graph.tree = tree;
-        cube.graph.root = graphData;
-        cube.graph.svg = svg;
-        cube.graph.diagonal = diagonal;
-        cube.graph.i = 0;
-
-        cube.graph.root.x0 = height / 2;
-        cube.graph.root.y0 = 0;
-        update(cube.graph.root, cube);
-    }
-
-    function update(source, cube) {
-        var duration = 750;
-
-        // Compute the new tree layout.
-        var nodes = cube.graph.tree.nodes(cube.graph.root).reverse();
-
-        // Update the nodes
-        var node = cube.graph.svg.selectAll("g.node")
-            .data(nodes, function (d) {
-                return d.id || (d.id = ++cube.graph.i);
-            });
 
-        var nodeEnter = node.enter().append("svg:g")
-            .attr("class", "node")
-            .attr("transform", function (d) {
-                return "translate(" + source.y0 + "," + source.x0 + ")";
-            });
+    nodeEnter.append("svg:text")
+      .attr("x", function (d) {
+        return -90;
+      })
+      .attr("y", 3)
+      .style("font-size", "14px")
+      .text(function (d) {
+        if (d.type == "dimension") {
+          var joinTip = "";
+
+          angular.forEach(d.join.primary_key, function (pk, index) {
+            joinTip += ( cube.graph.root.name + "." + d.join.foreign_key[index] + " = " + d.name + "." + pk + "<br>");
+          });
 
-        // Enter any new nodes at the parent's previous position.
-        nodeEnter.append("svg:circle")
-            .attr("r", 4.5)
-            .style("fill", function (d) {
-                switch (d.type) {
-                    case 'fact':
-                        return '#fff';
-                    case 'dimension':
-                        return '#B0C4DE';
-                    case 'column':
-                        return 'black'
-                    default:
-                        return '#B0C4DE';
-                }
-            })
-            .on("click", function (d) {
-                if (d.children) {
-                    d._children = d.children;
-                    d.children = null;
-
-                    if (d.type == 'dimension') {
-                        cube.graph.columnsCount -= d._children.length;
-                    }
-                } else {
-                    d.children = d._children;
-                    d._children = null;
-
-                    if (d.type == 'dimension') {
-                        cube.graph.columnsCount += d.children.length;
-                    }
-                }
-
-                var perColumn = 35;
-                var newHeight = (((cube.graph.columnsCount * perColumn > height) ? cube.graph.columnsCount * perColumn : height));
-                $("#cube_graph_" + cube.name + " svg").height(newHeight);
-                cube.graph.tree.size([newHeight, width - 160]);
-                update(d, cube);
-            });
+          d.tooltip = d3.select("body")
+            .append("div")
+            .style("position", "absolute")
+            .style("z-index", "10")
+            .style("font-size", "11px")
+            .style("visibility", "hidden")
+            .html(joinTip);
+          var joinType = (d.join) ? (d.join.type) : '';
 
-        nodeEnter.append("svg:text")
-            .attr("x", function (d) {
-                return -90;
-            })
-            .attr("y", 3)
-            .style("font-size", "14px")
-            .text(function (d) {
-                if (d.type == "dimension") {
-                    var joinTip = "";
-
-                    angular.forEach(d.join.primary_key, function (pk, index) {
-                        joinTip += ( cube.graph.root.name + "." + d.join.foreign_key[index] + " = " + d.name + "." + pk + "<br>");
-                    });
-
-                    d.tooltip = d3.select("body")
-                        .append("div")
-                        .style("position", "absolute")
-                        .style("z-index", "10")
-                        .style("font-size", "11px")
-                        .style("visibility", "hidden")
-                        .html(joinTip);
-                    var joinType = (d.join) ? (d.join.type) : '';
-
-                    return joinType + " join";
-                }
-                else {
-                    return "";
-                }
-            })
-            .on('mouseover', function (d) {
-                return d.tooltip.style("visibility", "visible");
-            })
-            .on("mousemove", function (d) {
-                return d.tooltip.style("top", (event.pageY + 30) + "px").style("left", (event.pageX - 50) + "px");
-            })
-            .on('mouseout', function (d) {
-                return d.tooltip.style("visibility", "hidden");
-            });
+          return joinType + " join";
+        }
+        else {
+          return "";
+        }
+      })
+      .on('mouseover', function (d) {
+        return d.tooltip.style("visibility", "visible");
+      })
+      .on("mousemove", function (d) {
+        return d.tooltip.style("top", (event.pageY + 30) + "px").style("left", (event.pageX - 50) + "px");
+      })
+      .on('mouseout', function (d) {
+        return d.tooltip.style("visibility", "hidden");
+      });
 
-        nodeEnter.append("svg:text")
-            .attr("x", function (d) {
-                return 8;
-            })
-            .attr("y", 3)
-            .text(function (d) {
-                var dataType = (d.dataType) ? ('(' + d.dataType + ')') : '';
+    nodeEnter.append("svg:text")
+      .attr("x", function (d) {
+        return 8;
+      })
+      .attr("y", 3)
+      .text(function (d) {
+        var dataType = (d.dataType) ? ('(' + d.dataType + ')') : '';
 
-                return d.name + dataType;
-            });
+        return d.name + dataType;
+      });
 
-        // Transition nodes to their new position.
-        nodeEnter.transition()
-            .duration(duration)
-            .attr("transform", function (d) {
-                return "translate(" + d.y + "," + d.x + ")";
-            })
-            .style("opacity", 1)
-            .select("circle")
-            .style("fill", function (d) {
-                switch (d.type) {
-                    case 'fact':
-                        return '#fff';
-                    case 'dimension':
-                        return '#B0C4DE';
-                    case 'column':
-                        return 'black'
-                    default:
-                        return '#B0C4DE';
-                }
-            });
+    // Transition nodes to their new position.
+    nodeEnter.transition()
+      .duration(duration)
+      .attr("transform", function (d) {
+        return "translate(" + d.y + "," + d.x + ")";
+      })
+      .style("opacity", 1)
+      .select("circle")
+      .style("fill", function (d) {
+        switch (d.type) {
+          case 'fact':
+            return '#fff';
+          case 'dimension':
+            return '#B0C4DE';
+          case 'column':
+            return 'black'
+          default:
+            return '#B0C4DE';
+        }
+      });
 
-        node.transition()
-            .duration(duration)
-            .attr("transform", function (d) {
-                return "translate(" + d.y + "," + d.x + ")";
-            })
-            .style("opacity", 1);
-
-        node.exit().transition()
-            .duration(duration)
-            .attr("transform", function (d) {
-                return "translate(" + source.y + "," + source.x + ")";
-            })
-            .style("opacity", 1e-6)
-            .remove();
-
-        // Update the links…
-        var link = cube.graph.svg.selectAll("path.link")
-            .data(cube.graph.tree.links(nodes), function (d) {
-                return d.target.id;
-            });
+    node.transition()
+      .duration(duration)
+      .attr("transform", function (d) {
+        return "translate(" + d.y + "," + d.x + ")";
+      })
+      .style("opacity", 1);
+
+    node.exit().transition()
+      .duration(duration)
+      .attr("transform", function (d) {
+        return "translate(" + source.y + "," + source.x + ")";
+      })
+      .style("opacity", 1e-6)
+      .remove();
+
+    // Update the links…
+    var link = cube.graph.svg.selectAll("path.link")
+      .data(cube.graph.tree.links(nodes), function (d) {
+        return d.target.id;
+      });
 
-        // Enter any new links at the parent's previous position.
-        link.enter().insert("svg:path", "g")
-            .attr("class", "link")
-            .attr("d", function (d) {
-                var o = {x: source.x0, y: source.y0};
-                return cube.graph.diagonal({source: o, target: o});
-            })
-            .transition()
-            .duration(duration)
-            .attr("d", cube.graph.diagonal);
-
-        // Transition links to their new position.
-        link.transition()
-            .duration(duration)
-            .attr("d", cube.graph.diagonal);
-
-        // Transition exiting nodes to the parent's new position.
-        link.exit().transition()
-            .duration(duration)
-            .attr("d", function (d) {
-                var o = {x: source.x, y: source.y};
-                return cube.graph.diagonal({source: o, target: o});
-            })
-            .remove();
-
-        // Stash the old positions for transition.
-        nodes.forEach(function (d) {
-            d.x0 = d.x;
-            d.y0 = d.y;
-        });
-    }
+    // Enter any new links at the parent's previous position.
+    link.enter().insert("svg:path", "g")
+      .attr("class", "link")
+      .attr("d", function (d) {
+        var o = {x: source.x0, y: source.y0};
+        return cube.graph.diagonal({source: o, target: o});
+      })
+      .transition()
+      .duration(duration)
+      .attr("d", cube.graph.diagonal);
+
+    // Transition links to their new position.
+    link.transition()
+      .duration(duration)
+      .attr("d", cube.graph.diagonal);
+
+    // Transition exiting nodes to the parent's new position.
+    link.exit().transition()
+      .duration(duration)
+      .attr("d", function (d) {
+        var o = {x: source.x, y: source.y};
+        return cube.graph.diagonal({source: o, target: o});
+      })
+      .remove();
+
+    // Stash the old positions for transition.
+    nodes.forEach(function (d) {
+      d.x0 = d.x;
+      d.y0 = d.y;
+    });
+  }
 
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/users.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/users.js b/webapp/app/js/services/users.js
index 7308a98..d05ca94 100644
--- a/webapp/app/js/services/users.js
+++ b/webapp/app/js/services/users.js
@@ -14,46 +14,46 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.service('UserService', function ($http, $q) {
-    var roles = {
-        'ROLE_MODELER': '/cubes',
-        'ROLE_ANALYST': '/cubes',
-        'ROLE_ADMIN': '/cubes'
-    };
-    var curUser = {};
+  var roles = {
+    'ROLE_MODELER': '/cubes',
+    'ROLE_ANALYST': '/cubes',
+    'ROLE_ADMIN': '/cubes'
+  };
+  var curUser = {};
 
-    this.getCurUser = function () {
-        return curUser;
-    };
-    this.setCurUser = function (user) {
-        curUser = user;
-    };
-    this.hasRole = function (role) {
-        var hasRole = false;
-        if (curUser.userDetails) {
-            angular.forEach(curUser.userDetails.authorities, function (authority, index) {
-                if (authority.authority == role) {
-                    hasRole = true;
-                }
-            });
+  this.getCurUser = function () {
+    return curUser;
+  };
+  this.setCurUser = function (user) {
+    curUser = user;
+  };
+  this.hasRole = function (role) {
+    var hasRole = false;
+    if (curUser.userDetails) {
+      angular.forEach(curUser.userDetails.authorities, function (authority, index) {
+        if (authority.authority == role) {
+          hasRole = true;
         }
+      });
+    }
 
-        return hasRole;
-    };
-    this.isAuthorized = function () {
-        return  curUser.userDetails && curUser.userDetails.authorities && curUser.userDetails.authorities.length > 0;
-    };
-    this.getHomePage = function () {
-        var homePage = "/login";
-
-        if (curUser.userDetails && curUser.userDetails.authorities) {
-            angular.forEach(curUser.userDetails.authorities, function (authority, index) {
-                homePage = (!!roles[authority.authority]) ? roles[authority.authority] : homePage;
-            });
-        }
+    return hasRole;
+  };
+  this.isAuthorized = function () {
+    return curUser.userDetails && curUser.userDetails.authorities && curUser.userDetails.authorities.length > 0;
+  };
+  this.getHomePage = function () {
+    var homePage = "/login";
 
-        return homePage;
+    if (curUser.userDetails && curUser.userDetails.authorities) {
+      angular.forEach(curUser.userDetails.authorities, function (authority, index) {
+        homePage = (!!roles[authority.authority]) ? roles[authority.authority] : homePage;
+      });
     }
+
+    return homePage;
+  }
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/utils/utils.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/utils/utils.js b/webapp/app/js/utils/utils.js
index 14dda8e..d838e9e 100644
--- a/webapp/app/js/utils/utils.js
+++ b/webapp/app/js/utils/utils.js
@@ -14,55 +14,55 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
 /* utils */
 
 KylinApp.factory('VdmUtil', function ($modal, $timeout, $location, $anchorScroll, $window) {
-    return {
-        createDialog: function (template, scope, thenFunc, options) {
-            options = (!!!options) ? {} : options;
-            options = angular.extend({
-                backdropFade: true,
-                templateUrl: template,
-                resolve: {
-                    scope: function () {
-                        return scope;
-                    }
-                },
-                controller: function ($scope, $modalInstance, scope) {
-                    $scope = angular.extend($scope, scope);
-                    $scope.animate = "fadeInRight";
-                    $scope.close = function (data) {
-                        $scope.animate = "fadeOutRight";
-                        $timeout(function () {
-                            $modalInstance.close(data);
-                        }, 500);
-                    }
-                }
-            }, options);
-
-            var dialog = $modal.open(options);
-            dialog.result.then(thenFunc);
+  return {
+    createDialog: function (template, scope, thenFunc, options) {
+      options = (!!!options) ? {} : options;
+      options = angular.extend({
+        backdropFade: true,
+        templateUrl: template,
+        resolve: {
+          scope: function () {
+            return scope;
+          }
         },
+        controller: function ($scope, $modalInstance, scope) {
+          $scope = angular.extend($scope, scope);
+          $scope.animate = "fadeInRight";
+          $scope.close = function (data) {
+            $scope.animate = "fadeOutRight";
+            $timeout(function () {
+              $modalInstance.close(data);
+            }, 500);
+          }
+        }
+      }, options);
 
-        formatDate: function (date, fmt) {
-            var o = {
-                "M+": date.getMonth() + 1,
-                "d+": date.getDate(),
-                "h+": date.getHours(),
-                "m+": date.getMinutes(),
-                "s+": date.getSeconds(),
-                "q+": Math.floor((date.getMonth() + 3) / 3),
-                "S": date.getMilliseconds()
-            };
-            if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
-            for (var k in o)
-                if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+      var dialog = $modal.open(options);
+      dialog.result.then(thenFunc);
+    },
 
-            return fmt;
-        }
+    formatDate: function (date, fmt) {
+      var o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": date.getHours(),
+        "m+": date.getMinutes(),
+        "s+": date.getSeconds(),
+        "q+": Math.floor((date.getMonth() + 3) / 3),
+        "S": date.getMilliseconds()
+      };
+      if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+      for (var k in o)
+        if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+
+      return fmt;
     }
+  }
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/less/app.less
----------------------------------------------------------------------
diff --git a/webapp/app/less/app.less b/webapp/app/less/app.less
index dfdba93..5675957 100644
--- a/webapp/app/less/app.less
+++ b/webapp/app/less/app.less
@@ -405,7 +405,7 @@ treecontrol {
 }
 
 treecontrol > ul {
-  width: 310px;
+//  width: 310px;
   overflow: auto;
 }
 
@@ -536,9 +536,6 @@ background-color:#ffffff;
 #loadingCntnr div.loadingWord{width:200px;height:70px;line-height:70px;border:2px solid #D6E7F2;background:#fff;}
 #loadingCntnr img{margin:17px 15px;float:left;display:inline;}
 
-treecontrol ul{
-  width:305px !important;
-}
 
 /** Customization for Messenger **/
 /** The top lower **/


[08/39] incubator-kylin git commit: Merge branch 'staging' of https://github.com/KylinOLAP/Kylin into staging

Posted by li...@apache.org.
Merge branch 'staging' of https://github.com/KylinOLAP/Kylin into staging


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

Branch: refs/heads/staging
Commit: 857daad065d4de594245fb74724396400ba694b1
Parents: 4e1d098 2f15260
Author: lukehan <lu...@apache.org>
Authored: Tue Apr 14 14:24:01 2015 +0800
Committer: lukehan <lu...@apache.org>
Committed: Tue Apr 14 14:24:01 2015 +0800

----------------------------------------------------------------------
 .../apache/kylin/dict/DictionaryManager.java    |  2 +-
 .../cube_desc/kylin_sales_cube_desc.json        | 24 +++++---------------
 .../test_kylin_cube_with_slr_desc.json          |  6 ++---
 ...test_kylin_cube_with_slr_left_join_desc.json |  6 ++---
 .../test_kylin_cube_without_slr_desc.json       |  6 ++---
 ...t_kylin_cube_without_slr_left_join_desc.json |  6 ++---
 .../metadata/measure/MeasureAggregator.java     |  2 +-
 7 files changed, 20 insertions(+), 32 deletions(-)
----------------------------------------------------------------------



[17/39] incubator-kylin git commit: KYLIN-714 add lisense

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox/capacity-scheduler.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/capacity-scheduler.xml b/examples/test_case_data/sandbox/capacity-scheduler.xml
index 7b4a367..ac5d0e0 100644
--- a/examples/test_case_data/sandbox/capacity-scheduler.xml
+++ b/examples/test_case_data/sandbox/capacity-scheduler.xml
@@ -1,99 +1,112 @@
-<!--Tue Dec 16 19:08:08 2014-->
-    <configuration>
-    
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
+
     <property>
-      <name>yarn.scheduler.capacity.default.minimum-user-limit-percent</name>
-      <value>100</value>
+        <name>yarn.scheduler.capacity.default.minimum-user-limit-percent</name>
+        <value>100</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.maximum-am-resource-percent</name>
-      <value>0.5</value>
+        <name>yarn.scheduler.capacity.maximum-am-resource-percent</name>
+        <value>0.5</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.maximum-applications</name>
-      <value>10000</value>
+        <name>yarn.scheduler.capacity.maximum-applications</name>
+        <value>10000</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.node-locality-delay</name>
-      <value>40</value>
+        <name>yarn.scheduler.capacity.node-locality-delay</name>
+        <value>40</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.resource-calculator</name>
-      <value>org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator</value>
+        <name>yarn.scheduler.capacity.resource-calculator</name>
+        <value>org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.accessible-node-labels</name>
-      <value>*</value>
+        <name>yarn.scheduler.capacity.root.accessible-node-labels</name>
+        <value>*</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.accessible-node-labels.default.capacity</name>
-      <value>-1</value>
+        <name>yarn.scheduler.capacity.root.accessible-node-labels.default.capacity</name>
+        <value>-1</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.accessible-node-labels.default.maximum-capacity</name>
-      <value>-1</value>
+        <name>yarn.scheduler.capacity.root.accessible-node-labels.default.maximum-capacity</name>
+        <value>-1</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.acl_administer_queue</name>
-      <value>*</value>
+        <name>yarn.scheduler.capacity.root.acl_administer_queue</name>
+        <value>*</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.capacity</name>
-      <value>100</value>
+        <name>yarn.scheduler.capacity.root.capacity</name>
+        <value>100</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.default-node-label-expression</name>
-      <value> </value>
+        <name>yarn.scheduler.capacity.root.default-node-label-expression</name>
+        <value></value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.default.acl_administer_jobs</name>
-      <value>*</value>
+        <name>yarn.scheduler.capacity.root.default.acl_administer_jobs</name>
+        <value>*</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.default.acl_submit_applications</name>
-      <value>*</value>
+        <name>yarn.scheduler.capacity.root.default.acl_submit_applications</name>
+        <value>*</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.default.capacity</name>
-      <value>100</value>
+        <name>yarn.scheduler.capacity.root.default.capacity</name>
+        <value>100</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.default.maximum-am-resource-percent</name>
-      <value>0.5</value>
+        <name>yarn.scheduler.capacity.root.default.maximum-am-resource-percent</name>
+        <value>0.5</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.default.maximum-capacity</name>
-      <value>100</value>
+        <name>yarn.scheduler.capacity.root.default.maximum-capacity</name>
+        <value>100</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.default.state</name>
-      <value>RUNNING</value>
+        <name>yarn.scheduler.capacity.root.default.state</name>
+        <value>RUNNING</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.default.user-limit-factor</name>
-      <value>1</value>
+        <name>yarn.scheduler.capacity.root.default.user-limit-factor</name>
+        <value>1</value>
     </property>
-    
+
     <property>
-      <name>yarn.scheduler.capacity.root.queues</name>
-      <value>default</value>
+        <name>yarn.scheduler.capacity.root.queues</name>
+        <value>default</value>
     </property>
-    
-  </configuration>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox/core-site.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/core-site.xml b/examples/test_case_data/sandbox/core-site.xml
index 1b3a3ee..3491a71 100644
--- a/examples/test_case_data/sandbox/core-site.xml
+++ b/examples/test_case_data/sandbox/core-site.xml
@@ -1,5 +1,18 @@
-<!--Mon Jan 19 07:28:25 2015-->
-    <configuration>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
     
     <property>
       <name>fs.defaultFS</name>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox/hadoop-policy.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/hadoop-policy.xml b/examples/test_case_data/sandbox/hadoop-policy.xml
index 0f7e0b9..3b3c57d 100644
--- a/examples/test_case_data/sandbox/hadoop-policy.xml
+++ b/examples/test_case_data/sandbox/hadoop-policy.xml
@@ -1,5 +1,18 @@
-<!--Tue Dec 16 19:07:40 2014-->
-    <configuration>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
     
     <property>
       <name>security.admin.operations.protocol.acl</name>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox/hbase-policy.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/hbase-policy.xml b/examples/test_case_data/sandbox/hbase-policy.xml
index 36756b8..b94da01 100644
--- a/examples/test_case_data/sandbox/hbase-policy.xml
+++ b/examples/test_case_data/sandbox/hbase-policy.xml
@@ -1,5 +1,18 @@
-<!--Mon Jan 19 07:29:07 2015-->
-    <configuration>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
     
     <property>
       <name>security.admin.protocol.acl</name>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox/hbase-site.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/hbase-site.xml b/examples/test_case_data/sandbox/hbase-site.xml
index 9fd97c9..33675a7 100644
--- a/examples/test_case_data/sandbox/hbase-site.xml
+++ b/examples/test_case_data/sandbox/hbase-site.xml
@@ -1,5 +1,18 @@
-<!--Mon Jan 19 07:29:07 2015-->
-    <configuration>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
     
     <property>
       <name>dfs.domain.socket.path</name>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox/hdfs-site.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/hdfs-site.xml b/examples/test_case_data/sandbox/hdfs-site.xml
index f8347dc..a3cc33b 100644
--- a/examples/test_case_data/sandbox/hdfs-site.xml
+++ b/examples/test_case_data/sandbox/hdfs-site.xml
@@ -1,5 +1,18 @@
-<!--Mon Jan 19 07:29:07 2015-->
-    <configuration>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
     
     <property>
       <name>dfs.block.access.token.enable</name>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox/hive-site.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/hive-site.xml b/examples/test_case_data/sandbox/hive-site.xml
index 40afbf6..8ec79ce 100644
--- a/examples/test_case_data/sandbox/hive-site.xml
+++ b/examples/test_case_data/sandbox/hive-site.xml
@@ -1,5 +1,18 @@
-<!--Tue Dec 16 19:33:41 2014-->
-    <configuration>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
     
     <property>
       <name>ambari.hive.db.schema.name</name>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/kylin.properties b/examples/test_case_data/sandbox/kylin.properties
index 8a29cdc..efaef5c 100644
--- a/examples/test_case_data/sandbox/kylin.properties
+++ b/examples/test_case_data/sandbox/kylin.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 ## Config for Kylin Engine ##
 
 # List of web servers in use, this enables one web server instance to sync up with other servers.

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox/kylin_job_conf.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/kylin_job_conf.xml b/examples/test_case_data/sandbox/kylin_job_conf.xml
index f62ce55..81704f2 100644
--- a/examples/test_case_data/sandbox/kylin_job_conf.xml
+++ b/examples/test_case_data/sandbox/kylin_job_conf.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0"?>
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. See accompanying LICENSE file.
+-->
+
 <configuration>
 
     <property>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox/mapred-site.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/mapred-site.xml b/examples/test_case_data/sandbox/mapred-site.xml
index ccede13..066d0c1 100644
--- a/examples/test_case_data/sandbox/mapred-site.xml
+++ b/examples/test_case_data/sandbox/mapred-site.xml
@@ -1,5 +1,18 @@
-<!--Tue Dec 16 19:08:08 2014-->
-    <configuration>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
     
     <property>
       <name>io.sort.mb</name>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox/yarn-site.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/yarn-site.xml b/examples/test_case_data/sandbox/yarn-site.xml
index 4e0ed9c..6562319 100644
--- a/examples/test_case_data/sandbox/yarn-site.xml
+++ b/examples/test_case_data/sandbox/yarn-site.xml
@@ -1,5 +1,18 @@
-<!--Tue Dec 16 19:08:08 2014-->
-    <configuration>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
     
     <property>
       <name>hadoop.registry.rm.enabled</name>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/jdbc/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/jdbc/src/main/resources/log4j.properties b/jdbc/src/main/resources/log4j.properties
index 3707ba8..7d5d9a3 100644
--- a/jdbc/src/main/resources/log4j.properties
+++ b/jdbc/src/main/resources/log4j.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 #define appenders
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/jdbc/src/main/resources/org-apache-kylin-jdbc.properties
----------------------------------------------------------------------
diff --git a/jdbc/src/main/resources/org-apache-kylin-jdbc.properties b/jdbc/src/main/resources/org-apache-kylin-jdbc.properties
index c16246b..7b6a3dc 100644
--- a/jdbc/src/main/resources/org-apache-kylin-jdbc.properties
+++ b/jdbc/src/main/resources/org-apache-kylin-jdbc.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 driver.name=Kylin JDBC Driver
 driver.version=0.1
 product.name=Kylin

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/metadata/src/main/assembly/assemble.xml
----------------------------------------------------------------------
diff --git a/metadata/src/main/assembly/assemble.xml b/metadata/src/main/assembly/assemble.xml
index 0a3c323..5149617 100644
--- a/metadata/src/main/assembly/assemble.xml
+++ b/metadata/src/main/assembly/assemble.xml
@@ -1,3 +1,18 @@
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+
 <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/metadata/src/test/resources/org/apache/kylin/metadata/kylin_env.properties
----------------------------------------------------------------------
diff --git a/metadata/src/test/resources/org/apache/kylin/metadata/kylin_env.properties b/metadata/src/test/resources/org/apache/kylin/metadata/kylin_env.properties
index b9acf90..98e3008 100644
--- a/metadata/src/test/resources/org/apache/kylin/metadata/kylin_env.properties
+++ b/metadata/src/test/resources/org/apache/kylin/metadata/kylin_env.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 PROD=/etc/kylin
 QA=/etc/kylin
 DEV=/etc/kylin

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 6753e69..cbf876c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
         <groupId>org.apache</groupId>
         <artifactId>apache</artifactId>
         <version>16</version>
-        </parent>
+    </parent>
 
     <groupId>org.apache.kylin</groupId>
     <artifactId>kylin</artifactId>
@@ -101,8 +101,10 @@
         <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
         <sonar.jacoco.reportPath>${project.basedir}/../target/jacoco.exec</sonar.jacoco.reportPath>
         <sonar.language>java</sonar.language>
-        <sonar.jacoco.excludes>org/apache/kylin/**/tools/**:**/*CLI.java:net/hydromatic/optiq/**:org/eigenbase/sql2rel/**</sonar.jacoco.excludes>
-        
+        <sonar.jacoco.excludes>
+            org/apache/kylin/**/tools/**:**/*CLI.java:net/hydromatic/optiq/**:org/eigenbase/sql2rel/**
+        </sonar.jacoco.excludes>
+
     </properties>
 
     <licenses>
@@ -633,69 +635,76 @@
             </build>
         </profile>
         <profile>
-      <!-- This profile adds/overrides few features of the 'apache-release'
-           profile in the parent pom. -->
-      <id>apache-release</id>
-      <build>
-        <plugins>
-          <!-- Apache-RAT checks for files without headers.
-               If run on a messy developer's sandbox, it will fail.
-               This serves as a reminder to only build a release in a clean
-               sandbox! -->
-          <plugin>
-            <groupId>org.apache.rat</groupId>
-            <artifactId>apache-rat-plugin</artifactId>
-            <configuration>
-              <!-- Exclude files/folders for apache release -->
-              <excludes>
-                <exclude>*.md</exclude>
-                <exclude>docs/website</exclude>
-                <exclude>docs/*.md</exclude>
-              </excludes>
-            </configuration>
-            <executions>
-              <execution>
-                <phase>verify</phase>
-                <goals>
-                  <goal>check</goal>
-                </goals>
-              </execution>
-            </executions>
-            <dependencies>
-                <dependency>
-                    <groupId>org.apache.maven.doxia</groupId>
-                    <artifactId>doxia-core</artifactId>
-                    <version>1.6</version>
-                    <exclusions>
-                        <exclusion>
-                            <groupId>xerces</groupId>
-                            <artifactId>xercesImpl</artifactId>
-                        </exclusion>
-                    </exclusions>
-                </dependency>
-            </dependencies>
-          </plugin>
-          <plugin>
-            <groupId>net.ju-n.maven.plugins</groupId>
-            <artifactId>checksum-maven-plugin</artifactId>
-            <version>1.2</version>
-            <executions>
-              <execution>
-                <goals>
-                  <goal>artifacts</goal>
-                </goals>
-              </execution>
-            </executions>
-            <configuration>
-              <algorithms>
-                <algorithm>MD5</algorithm>
-                <algorithm>SHA-1</algorithm>
-              </algorithms>
-              <failOnError>false</failOnError>
-            </configuration>
-          </plugin>          
-        </plugins>
-      </build>
-    </profile>
+            <!-- This profile adds/overrides few features of the 'apache-release'
+                 profile in the parent pom. -->
+            <id>apache-release</id>
+            <build>
+                <plugins>
+                    <!-- Apache-RAT checks for files without headers.
+                         If run on a messy developer's sandbox, it will fail.
+                         This serves as a reminder to only build a release in a clean
+                         sandbox! -->
+                    <plugin>
+                        <groupId>org.apache.rat</groupId>
+                        <artifactId>apache-rat-plugin</artifactId>
+                        <configuration>
+                            <numUnapprovedLicenses>0</numUnapprovedLicenses>
+                            <excludes>
+                                <!-- text files without comments -->
+                                <exclude>**/*.csv</exclude>
+                                <exclude>**/*.json</exclude>
+                                <exclude>**/*.md</exclude>
+                                <!-- binary files -->
+                                <exclude>**/*.dict</exclude>
+                                <exclude>**/*.snapshot</exclude>
+                                <exclude>**/*.pdf</exclude>
+                                <!-- generated files -->
+                                <exclude>**/target/**</exclude>
+                            </excludes>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>verify</phase>
+                                <goals>
+                                    <goal>check</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <dependencies>
+                            <dependency>
+                                <groupId>org.apache.maven.doxia</groupId>
+                                <artifactId>doxia-core</artifactId>
+                                <version>1.6</version>
+                                <exclusions>
+                                    <exclusion>
+                                        <groupId>xerces</groupId>
+                                        <artifactId>xercesImpl</artifactId>
+                                    </exclusion>
+                                </exclusions>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
+                    <plugin>
+                        <groupId>net.ju-n.maven.plugins</groupId>
+                        <artifactId>checksum-maven-plugin</artifactId>
+                        <version>1.2</version>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>artifacts</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <algorithms>
+                                <algorithm>MD5</algorithm>
+                                <algorithm>SHA-1</algorithm>
+                            </algorithms>
+                            <failOnError>false</failOnError>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/query/src/test/resources/logging.properties
----------------------------------------------------------------------
diff --git a/query/src/test/resources/logging.properties b/query/src/test/resources/logging.properties
index a925478..5767d05 100644
--- a/query/src/test/resources/logging.properties
+++ b/query/src/test/resources/logging.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 handlers=java.util.logging.ConsoleHandler
 .level=INFO
 #org.eigenbase.relopt.RelOptPlanner.level=FINEST

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/script/build.sh
----------------------------------------------------------------------
diff --git a/script/build.sh b/script/build.sh
index de6f76c..4c5f5d8 100755
--- a/script/build.sh
+++ b/script/build.sh
@@ -1,4 +1,20 @@
 #!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 echo "package back-end"
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/script/compress.sh
----------------------------------------------------------------------
diff --git a/script/compress.sh b/script/compress.sh
index 43ba9ae..d87eb12 100755
--- a/script/compress.sh
+++ b/script/compress.sh
@@ -1,4 +1,20 @@
 #!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 # pack webapp into kylin.war so that we have a all-in-one war
 dir=$(dirname ${0})

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/script/download-tomcat.sh
----------------------------------------------------------------------
diff --git a/script/download-tomcat.sh b/script/download-tomcat.sh
index 5632455..f43d202 100755
--- a/script/download-tomcat.sh
+++ b/script/download-tomcat.sh
@@ -1,4 +1,20 @@
 #!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 dir=$(dirname ${0})
 cd ${dir}/..

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/script/package.sh
----------------------------------------------------------------------
diff --git a/script/package.sh b/script/package.sh
index ce1a173..34d65f7 100755
--- a/script/package.sh
+++ b/script/package.sh
@@ -1,4 +1,20 @@
 #!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 echo "Checking maven..."
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/script/prepare.sh
----------------------------------------------------------------------
diff --git a/script/prepare.sh b/script/prepare.sh
index b38903b..a8b1c7d 100755
--- a/script/prepare.sh
+++ b/script/prepare.sh
@@ -1,4 +1,20 @@
 #!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 dir=$(dirname ${0})
 cd ${dir}/..

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/server/src/main/resources/applicationContext.xml
----------------------------------------------------------------------
diff --git a/server/src/main/resources/applicationContext.xml b/server/src/main/resources/applicationContext.xml
index 75c69df..b56987f 100644
--- a/server/src/main/resources/applicationContext.xml
+++ b/server/src/main/resources/applicationContext.xml
@@ -1,3 +1,17 @@
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
 <beans xmlns="http://www.springframework.org/schema/beans"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 	xmlns:context="http://www.springframework.org/schema/context"

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/server/src/main/resources/ehcache-test.xml
----------------------------------------------------------------------
diff --git a/server/src/main/resources/ehcache-test.xml b/server/src/main/resources/ehcache-test.xml
index a0c33f5..9669093 100644
--- a/server/src/main/resources/ehcache-test.xml
+++ b/server/src/main/resources/ehcache-test.xml
@@ -1,3 +1,17 @@
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
 <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">
 <cache name="SuccessQueryCache" 
     eternal="false" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/server/src/main/resources/ehcache.xml
----------------------------------------------------------------------
diff --git a/server/src/main/resources/ehcache.xml b/server/src/main/resources/ehcache.xml
index 5bc9770..29ca6bb 100644
--- a/server/src/main/resources/ehcache.xml
+++ b/server/src/main/resources/ehcache.xml
@@ -1,3 +1,17 @@
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
 <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">
 <cache name="SuccessQueryCache" 
     eternal="false" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/server/src/main/resources/kylinSecurity.xml
----------------------------------------------------------------------
diff --git a/server/src/main/resources/kylinSecurity.xml b/server/src/main/resources/kylinSecurity.xml
index 518a9bd..d372240 100644
--- a/server/src/main/resources/kylinSecurity.xml
+++ b/server/src/main/resources/kylinSecurity.xml
@@ -1,3 +1,17 @@
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:scr="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans
 	http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
 	http://www.springframework.org/schema/security

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/server/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/server/src/main/resources/log4j.properties b/server/src/main/resources/log4j.properties
index c52992d..d7dc3bf 100644
--- a/server/src/main/resources/log4j.properties
+++ b/server/src/main/resources/log4j.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 #define appenders
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/server/src/main/webapp/WEB-INF/kylin-servlet.xml
----------------------------------------------------------------------
diff --git a/server/src/main/webapp/WEB-INF/kylin-servlet.xml b/server/src/main/webapp/WEB-INF/kylin-servlet.xml
index 17755cd..c351c6b 100644
--- a/server/src/main/webapp/WEB-INF/kylin-servlet.xml
+++ b/server/src/main/webapp/WEB-INF/kylin-servlet.xml
@@ -1,3 +1,17 @@
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/server/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/server/src/main/webapp/WEB-INF/web.xml b/server/src/main/webapp/WEB-INF/web.xml
index 61874ed..d12f81a 100644
--- a/server/src/main/webapp/WEB-INF/web.xml
+++ b/server/src/main/webapp/WEB-INF/web.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. See accompanying LICENSE file.
+-->
+
 <web-app xmlns="http://java.sun.com/xml/ns/javaee"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/server/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/server/src/main/webapp/index.html b/server/src/main/webapp/index.html
index 94e0828..261fe66 100644
--- a/server/src/main/webapp/index.html
+++ b/server/src/main/webapp/index.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 <html>
   <head>
     <title>Welcome to Kylin</title>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/webapp/.editorconfig
----------------------------------------------------------------------
diff --git a/webapp/.editorconfig b/webapp/.editorconfig
index c2cdfb8..b9d861d 100644
--- a/webapp/.editorconfig
+++ b/webapp/.editorconfig
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 # EditorConfig helps developers define and maintain consistent
 # coding styles between different editors and IDEs
 # editorconfig.org

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/webapp/app/css/AdminLTE-fonts.css
----------------------------------------------------------------------
diff --git a/webapp/app/css/AdminLTE-fonts.css b/webapp/app/css/AdminLTE-fonts.css
index d4068cd..08710ad 100644
--- a/webapp/app/css/AdminLTE-fonts.css
+++ b/webapp/app/css/AdminLTE-fonts.css
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /* latin */
 @font-face {
     font-family: 'Source Sans Pro';

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/webapp/app/css/AdminLTE.css
----------------------------------------------------------------------
diff --git a/webapp/app/css/AdminLTE.css b/webapp/app/css/AdminLTE.css
index e1dda0e..e358b85 100644
--- a/webapp/app/css/AdminLTE.css
+++ b/webapp/app/css/AdminLTE.css
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /*!
  *   AdminLTE v1.2
  *   Author: AlmsaeedStudio.com

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/webapp/app/htaccess.dist
----------------------------------------------------------------------
diff --git a/webapp/app/htaccess.dist b/webapp/app/htaccess.dist
index dfde85b..9c89d46 100644
--- a/webapp/app/htaccess.dist
+++ b/webapp/app/htaccess.dist
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 # nginx rewrite rule
 rewrite ^(.*)$  /index.html break;
 # end nginx rewrite rule
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/webapp/app/less/animation.less
----------------------------------------------------------------------
diff --git a/webapp/app/less/animation.less b/webapp/app/less/animation.less
index faba226..73fab87 100644
--- a/webapp/app/less/animation.less
+++ b/webapp/app/less/animation.less
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /** animation for data model **/
 .data-model-animation.ng-enter {
   -webkit-animation: fadeInRight 1s;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/webapp/app/less/app.less
----------------------------------------------------------------------
diff --git a/webapp/app/less/app.less b/webapp/app/less/app.less
index f60a698..dfdba93 100644
--- a/webapp/app/less/app.less
+++ b/webapp/app/less/app.less
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /** override ace style - main style **/
 body {
   background-color: #FFF;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/webapp/app/less/build.less
----------------------------------------------------------------------
diff --git a/webapp/app/less/build.less b/webapp/app/less/build.less
index a8d0bb2..be8f7df 100644
--- a/webapp/app/less/build.less
+++ b/webapp/app/less/build.less
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 @import 'layout.less';
 @import 'navbar.less';
 @import 'home.less';

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/webapp/app/less/component.less
----------------------------------------------------------------------
diff --git a/webapp/app/less/component.less b/webapp/app/less/component.less
index 4caf964..ec69022 100644
--- a/webapp/app/less/component.less
+++ b/webapp/app/less/component.less
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /** table related **/
 .dataTables_wrapper>.row:first-child {
   padding-top: 12px;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/webapp/app/less/home.less
----------------------------------------------------------------------
diff --git a/webapp/app/less/home.less b/webapp/app/less/home.less
index b0cf629..ed7a0a4 100644
--- a/webapp/app/less/home.less
+++ b/webapp/app/less/home.less
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /** Home page style **/
 .bg-holder {
   position: absolute;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/webapp/app/less/layout.less
----------------------------------------------------------------------
diff --git a/webapp/app/less/layout.less b/webapp/app/less/layout.less
index 0f51359..b3ea6b6 100644
--- a/webapp/app/less/layout.less
+++ b/webapp/app/less/layout.less
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 .navbar-fixed-top+.main-container {
   padding-top: 45px;
 }

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/webapp/app/less/navbar.less
----------------------------------------------------------------------
diff --git a/webapp/app/less/navbar.less b/webapp/app/less/navbar.less
index cad2562..d56b98a 100644
--- a/webapp/app/less/navbar.less
+++ b/webapp/app/less/navbar.less
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 .navbar {
   margin: 0;
   padding-left: 0;


[27/39] incubator-kylin git commit: KYLIN-683 fix measure return type issue when expression is 'SUM'

Posted by li...@apache.org.
KYLIN-683 fix measure return type issue when expression is 'SUM'


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

Branch: refs/heads/staging
Commit: ccc0981246df48f1b2a98f3fecaaeb1fcaea6e00
Parents: e1960f8
Author: jiazhong <ji...@ebay.com>
Authored: Fri Apr 24 13:22:19 2015 +0800
Committer: jiazhong <ji...@ebay.com>
Committed: Fri Apr 24 13:31:41 2015 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeSchema.js        | 389 +++++++++++---------
 webapp/app/partials/cubeDesigner/measures.html |   1 +
 2 files changed, 207 insertions(+), 183 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ccc09812/webapp/app/js/controllers/cubeSchema.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeSchema.js b/webapp/app/js/controllers/cubeSchema.js
index d883b59..d8e490d 100755
--- a/webapp/app/js/controllers/cubeSchema.js
+++ b/webapp/app/js/controllers/cubeSchema.js
@@ -14,222 +14,245 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
-KylinApp.controller('CubeSchemaCtrl', function ($scope, QueryService, UserService, ProjectService, AuthenticationService,$filter,ModelService,MetaModel,CubeDescModel,CubeList,TableModel,ProjectModel) {
-
-    $scope.projects = [];
-    $scope.newDimension = null;
-    $scope.newMeasure = null;
+KylinApp.controller('CubeSchemaCtrl', function ($scope, QueryService, UserService, ProjectService, AuthenticationService, $filter, ModelService, MetaModel, CubeDescModel, CubeList, TableModel, ProjectModel) {
+
+  $scope.projects = [];
+  $scope.newDimension = null;
+  $scope.newMeasure = null;
+
+
+  $scope.wizardSteps = [
+    {title: 'Cube Info', src: 'partials/cubeDesigner/info.html', isComplete: false},
+    {title: 'Data Model', src: 'partials/cubeDesigner/data_model.html', isComplete: false},
+    {title: 'Dimensions', src: 'partials/cubeDesigner/dimensions.html', isComplete: false},
+    {title: 'Measures', src: 'partials/cubeDesigner/measures.html', isComplete: false},
+    {title: 'Filter', src: 'partials/cubeDesigner/filter.html', isComplete: false},
+    {title: 'Refresh Setting', src: 'partials/cubeDesigner/incremental.html', isComplete: false}
+  ];
+  if (UserService.hasRole("ROLE_ADMIN")) {
+    $scope.wizardSteps.push({
+      title: 'Advanced Setting',
+      src: 'partials/cubeDesigner/advanced_settings.html',
+      isComplete: false
+    });
+  }
+  $scope.wizardSteps.push({title: 'Overview', src: 'partials/cubeDesigner/overview.html', isComplete: false});
 
+  $scope.curStep = $scope.wizardSteps[0];
 
-    $scope.wizardSteps = [
-        {title: 'Cube Info', src: 'partials/cubeDesigner/info.html', isComplete: false},
-        {title: 'Data Model', src: 'partials/cubeDesigner/data_model.html', isComplete: false},
-        {title: 'Dimensions', src: 'partials/cubeDesigner/dimensions.html', isComplete: false},
-        {title: 'Measures', src: 'partials/cubeDesigner/measures.html', isComplete: false},
-        {title: 'Filter', src: 'partials/cubeDesigner/filter.html', isComplete: false},
-        {title: 'Refresh Setting', src: 'partials/cubeDesigner/incremental.html', isComplete: false}
-    ];
-    if (UserService.hasRole("ROLE_ADMIN")) {
-            $scope.wizardSteps.push({title: 'Advanced Setting', src: 'partials/cubeDesigner/advanced_settings.html', isComplete: false});
-    }
-    $scope.wizardSteps.push({title: 'Overview', src: 'partials/cubeDesigner/overview.html', isComplete: false});
 
-    $scope.curStep = $scope.wizardSteps[0];
+  // ~ init
+  if (!$scope.state) {
+    $scope.state = {mode: "view"};
+  }
 
+  $scope.$watch('cube.detail', function (newValue, oldValue) {
+    if (!newValue) {
+      return;
+    }
+    if (newValue && $scope.state.mode === "view") {
+      $scope.cubeMetaFrame = newValue;
+
+      // when viw state,each cubeSchema has its own metaModel
+      $scope.metaModel = {
+        model: {}
+      }
+
+      //init model
+      ModelService.get({model_name: $scope.cubeMetaFrame.model_name}, function (model) {
+        if (model) {
+          $scope.metaModel.model = model;
+        }
+      });
+    }
+  });
 
-    // ~ init
-    if (!$scope.state) {
-        $scope.state = {mode: "view"};
+  $scope.$watch('cubeMetaFrame', function (newValue, oldValue) {
+    if (!newValue) {
+      return;
+    }
+    if ($scope.cubeMode == "editExistCube" && newValue && !newValue.project) {
+      initProject();
     }
 
-    $scope.$watch('cube.detail', function (newValue, oldValue) {
-        if(!newValue){
-            return;
-        }
-        if (newValue&&$scope.state.mode==="view") {
-            $scope.cubeMetaFrame = newValue;
+  });
 
-            // when viw state,each cubeSchema has its own metaModel
-            $scope.metaModel={
-                model:{}
-            }
+  // ~ public methods
+  $scope.filterProj = function (project) {
+    return $scope.userService.hasRole('ROLE_ADMIN') || $scope.hasPermission(project, $scope.permissions.ADMINISTRATION.mask);
+  };
 
-            //init model
-            ModelService.get({model_name: $scope.cubeMetaFrame.model_name}, function (model) {
-                if (model) {
-                    $scope.metaModel.model = model;
-                }
-            });
+  $scope.addNewMeasure = function (measure) {
+    $scope.newMeasure = (!!measure) ? measure : CubeDescModel.createMeasure();
+  };
 
-        }
-    });
+  $scope.clearNewMeasure = function () {
+    $scope.newMeasure = null;
+  };
 
-    $scope.$watch('cubeMetaFrame', function (newValue, oldValue) {
-        if(!newValue){
-            return;
-        }
-        if ($scope.cubeMode=="editExistCube"&&newValue && !newValue.project) {
-            initProject();
-        }
+  $scope.saveNewMeasure = function () {
+    if ($scope.cubeMetaFrame.measures.indexOf($scope.newMeasure) === -1) {
+      $scope.cubeMetaFrame.measures.push($scope.newMeasure);
+    }
+    $scope.newMeasure = null;
+  };
+
+  //map right return type for param
+  $scope.measureReturnTypeUpdate = function () {
+    if ($scope.newMeasure.function.parameter.type == "constant" && $scope.newMeasure.function.expression !== "COUNT_DISTINCT") {
+      switch ($scope.newMeasure.function.expression) {
+        case "SUM":
+        case "COUNT":
+          $scope.newMeasure.function.returntype = "bigint";
+          break;
+        default:
+          $scope.newMeasure.function.returntype = "";
+          break;
+      }
+    }
 
-    });
+    if ($scope.newMeasure.function.parameter.type == "column" && $scope.newMeasure.function.expression !== "COUNT_DISTINCT") {
 
-    // ~ public methods
-    $scope.filterProj = function(project){
-        return $scope.userService.hasRole('ROLE_ADMIN') || $scope.hasPermission(project,$scope.permissions.ADMINISTRATION.mask);
-    };
+      var column = $scope.newMeasure.function.parameter.value;
+      var colType = $scope.getColumnType(column, $scope.metaModel.model.fact_table); // $scope.getColumnType defined in cubeEdit.js
 
-    $scope.addNewMeasure = function (measure) {
-        $scope.newMeasure = (!!measure)? measure:CubeDescModel.createMeasure();
-    };
+      if (colType == "" || !colType) {
+        $scope.newMeasure.function.returntype = "";
+        return;
+      }
 
-    $scope.clearNewMeasure = function () {
-        $scope.newMeasure = null;
-    };
 
-    $scope.saveNewMeasure = function () {
-        if ($scope.cubeMetaFrame.measures.indexOf($scope.newMeasure) === -1) {
-            $scope.cubeMetaFrame.measures.push($scope.newMeasure);
-        }
-        $scope.newMeasure = null;
-    };
-
-    //map right return type for param
-    $scope.measureReturnTypeUpdate = function(){
-        if($scope.newMeasure.function.expression!=="COUNT_DISTINCT"){
-
-            var column = $scope.newMeasure.function.parameter.value;
-            var colType = $scope.getColumnType(column, $scope.metaModel.model.fact_table); // $scope.getColumnType defined in cubeEdit.js
-
-
-            switch($scope.newMeasure.function.expression){
-                case "SUM":
-                    if(colType==="smallint"||colType==="int"||colType==="bigint"){
-                        $scope.newMeasure.function.returntype= 'bigint';
-                    }else{
-                        $scope.newMeasure.function.returntype= 'decimal';
-                    }
-                    break;
-                case "MIN":
-                case "MAX":
-                    $scope.newMeasure.function.returntype = colType;
-                    break;
-                case "COUNT":
-                    $scope.newMeasure.function.returntype = "bigint";
-                    break;
-                default:
-                    $scope.newMeasure.function.returntype = "";
-                    break;
+      switch ($scope.newMeasure.function.expression) {
+        case "SUM":
+          if (colType === "smallint" || colType === "int" || colType === "bigint") {
+            $scope.newMeasure.function.returntype = 'bigint';
+          } else {
+            if (colType.indexOf('decimal') != -1) {
+              $scope.newMeasure.function.returntype = colType;
+            } else {
+              $scope.newMeasure.function.returntype = 'decimal';
             }
-        }
+          }
+          break;
+        case "MIN":
+        case "MAX":
+          $scope.newMeasure.function.returntype = colType;
+          break;
+        case "COUNT":
+          $scope.newMeasure.function.returntype = "bigint";
+          break;
+        default:
+          $scope.newMeasure.function.returntype = "";
+          break;
+      }
     }
+  }
+
+  $scope.addNewRowkeyColumn = function () {
+    $scope.cubeMetaFrame.rowkey.rowkey_columns.push({
+      "column": "",
+      "length": 0,
+      "dictionary": "true",
+      "mandatory": false
+    });
+  };
 
-    $scope.addNewRowkeyColumn = function () {
-        $scope.cubeMetaFrame.rowkey.rowkey_columns.push({
-            "column": "",
-            "length": 0,
-            "dictionary": "true",
-            "mandatory": false
-        });
-    };
-
-    $scope.addNewAggregationGroup = function () {
-        $scope.cubeMetaFrame.rowkey.aggregation_groups.push([]);
-    };
-
-    $scope.refreshAggregationGroup = function (list, index, aggregation_groups) {
-        if (aggregation_groups) {
-            list[index] = aggregation_groups;
-        }
-    };
+  $scope.addNewAggregationGroup = function () {
+    $scope.cubeMetaFrame.rowkey.aggregation_groups.push([]);
+  };
 
-    $scope.removeElement = function (arr, element) {
-        var index = arr.indexOf(element);
-        if (index > -1) {
-            arr.splice(index, 1);
-        }
-    };
+  $scope.refreshAggregationGroup = function (list, index, aggregation_groups) {
+    if (aggregation_groups) {
+      list[index] = aggregation_groups;
+    }
+  };
 
-    $scope.open = function ($event) {
-        $event.preventDefault();
-        $event.stopPropagation();
+  $scope.removeElement = function (arr, element) {
+    var index = arr.indexOf(element);
+    if (index > -1) {
+      arr.splice(index, 1);
+    }
+  };
 
-        $scope.opened = true;
-    };
+  $scope.open = function ($event) {
+    $event.preventDefault();
+    $event.stopPropagation();
 
-    $scope.preView = function () {
-        var stepIndex = $scope.wizardSteps.indexOf($scope.curStep);
-        if (stepIndex >= 1) {
-            $scope.curStep.isComplete = false;
-            $scope.curStep = $scope.wizardSteps[stepIndex - 1];
-        }
-    };
+    $scope.opened = true;
+  };
 
-    $scope.nextView = function () {
-        var stepIndex = $scope.wizardSteps.indexOf($scope.curStep);
+  $scope.preView = function () {
+    var stepIndex = $scope.wizardSteps.indexOf($scope.curStep);
+    if (stepIndex >= 1) {
+      $scope.curStep.isComplete = false;
+      $scope.curStep = $scope.wizardSteps[stepIndex - 1];
+    }
+  };
+  $scope.nextView = function () {
+    var stepIndex = $scope.wizardSteps.indexOf($scope.curStep);
 
-        if (stepIndex < ($scope.wizardSteps.length - 1)) {
-            $scope.curStep.isComplete = true;
-            $scope.curStep = $scope.wizardSteps[stepIndex + 1];
+    if (stepIndex < ($scope.wizardSteps.length - 1)) {
+      $scope.curStep.isComplete = true;
+      $scope.curStep = $scope.wizardSteps[stepIndex + 1];
+
+      AuthenticationService.ping(function (data) {
+        UserService.setCurUser(data);
+      });
+    }
+  };
+
+  $scope.goToStep = function (stepIndex) {
+    for (var i = 0; i < $scope.wizardSteps.length; i++) {
+      if (i <= stepIndex) {
+        $scope.wizardSteps[i].isComplete = true;
+      } else {
+        $scope.wizardSteps[i].isComplete = false;
+      }
+    }
+    if (stepIndex < ($scope.wizardSteps.length)) {
+      $scope.curStep = $scope.wizardSteps[stepIndex];
 
-            AuthenticationService.ping(function (data) {
-                UserService.setCurUser(data);
+      AuthenticationService.ping(function (data) {
+        UserService.setCurUser(data);
+      });
+    }
+  }
+
+  // ~ private methods
+  function initProject() {
+    ProjectService.list({}, function (projects) {
+      $scope.projects = projects;
+
+      var cubeName = (!!$scope.routeParams.cubeName) ? $scope.routeParams.cubeName : $scope.state.cubeName;
+      if (cubeName) {
+        var projName = null;
+        if (ProjectModel.getSelectedProject()) {
+          projName = ProjectModel.getSelectedProject();
+        } else {
+          angular.forEach($scope.projects, function (project, index) {
+            angular.forEach(project.realizations, function (unit, index) {
+              if (!projName && unit.type == "CUBE" && unit.realization === cubeName) {
+                projName = project.name;
+              }
             });
+          });
         }
-    };
-
-    $scope.goToStep = function(stepIndex){
-        for(var i=0;i<$scope.wizardSteps.length;i++){
-            if(i<=stepIndex){
-                $scope.wizardSteps[i].isComplete = true;
-            }else{
-                $scope.wizardSteps[i].isComplete = false;
-            }
-        }
-        if (stepIndex < ($scope.wizardSteps.length)) {
-            $scope.curStep = $scope.wizardSteps[stepIndex];
 
-            AuthenticationService.ping(function (data) {
-                UserService.setCurUser(data);
-            });
+        if (!ProjectModel.getSelectedProject()) {
+          ProjectModel.setSelectedProject(projName);
+          TableModel.aceSrcTbLoaded();
         }
-    }
 
-    // ~ private methods
-    function initProject() {
-        ProjectService.list({}, function (projects) {
-            $scope.projects = projects;
-
-            var cubeName = (!!$scope.routeParams.cubeName)? $scope.routeParams.cubeName:$scope.state.cubeName;
-            if (cubeName) {
-                var projName = null;
-                if(ProjectModel.getSelectedProject()){
-                    projName=ProjectModel.getSelectedProject();
-                }else{
-                    angular.forEach($scope.projects, function (project, index) {
-                        angular.forEach(project.realizations, function (unit, index) {
-                            if (!projName && unit.type=="CUBE"&&unit.realization === cubeName) {
-                                projName = project.name;
-                            }
-                        });
-                    });
-                }
-
-                if(!ProjectModel.getSelectedProject()){
-                    ProjectModel.setSelectedProject(projName);
-                    TableModel.aceSrcTbLoaded();
-                }
-
-                $scope.cubeMetaFrame.project = projName;
-            }
+        $scope.cubeMetaFrame.project = projName;
+      }
 
-            angular.forEach($scope.projects, function (project, index) {
-                $scope.listAccess(project, 'ProjectInstance');
-            });
-        });
-    }
+      angular.forEach($scope.projects, function (project, index) {
+        $scope.listAccess(project, 'ProjectInstance');
+      });
+    });
+  }
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ccc09812/webapp/app/partials/cubeDesigner/measures.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubeDesigner/measures.html b/webapp/app/partials/cubeDesigner/measures.html
index a260e28..a11e6a1 100755
--- a/webapp/app/partials/cubeDesigner/measures.html
+++ b/webapp/app/partials/cubeDesigner/measures.html
@@ -126,6 +126,7 @@
                                 <select class="form-control" ng-if="newMeasure.function.expression != 'COUNT'"
                                     ng-init="newMeasure.function.parameter.type=(!!newMeasure.function.parameter.type)?newMeasure.function.parameter.type: 'column' "
                                     chosen ng-model="newMeasure.function.parameter.type" required
+                                    ng-change="measureReturnTypeUpdate()"
                                     ng-options="mpt as mpt for mpt in cubeConfig.measureParamType">
                                     <option value=""></option>
                                 </select>


[18/39] incubator-kylin git commit: KYLIN-714 add lisense

Posted by li...@apache.org.
KYLIN-714 add lisense


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

Branch: refs/heads/staging
Commit: 01c5aa7a06c8480c63dfd236aa48ca0ffb2607da
Parents: 13f92a2
Author: qianhao.zhou <qi...@ebay.com>
Authored: Thu Apr 23 11:24:33 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Thu Apr 23 11:24:33 2015 +0800

----------------------------------------------------------------------
 bin/check-env.sh                                |  18 +++
 bin/find-hive-dependency.sh                     |  17 +++
 bin/health-check.sh                             |  17 +++
 bin/kylin.sh                                    |  17 +++
 bin/sample.sh                                   |  18 +++
 bin/setenv.sh                                   |  17 +++
 common/src/main/resources/kylinlog4j.properties |  17 +++
 common/src/main/resources/log4j.properties      |  16 +++
 conf/kylin.properties                           |  17 +++
 conf/kylin_job_conf.xml                         |  14 ++
 cube/src/main/assembly/assemble.xml             |  14 ++
 docs/website/BingSiteAuth.xml                   |  14 ++
 docs/website/_config-prod.yml                   |  17 +++
 docs/website/_config.yml                        |  17 +++
 docs/website/_includes/footer.html              |  18 +++
 docs/website/_includes/head.cn.html             |  18 +++
 docs/website/_includes/head.html                |  18 +++
 docs/website/_includes/header.cn.html           |  18 +++
 docs/website/_includes/header.html              |  18 +++
 docs/website/_layouts/default-cn.html           |  18 +++
 docs/website/_layouts/default.html              |  18 +++
 docs/website/_layouts/page.html                 |  18 +++
 docs/website/_layouts/post.html                 |  18 +++
 docs/website/_sass/_base.scss                   |  17 +++
 docs/website/_sass/_layout.scss                 |  17 +++
 docs/website/_sass/_syntax-highlighting.scss    |  17 +++
 docs/website/assets/css/animate.css             |  17 +++
 docs/website/assets/css/styles.css              |  17 +++
 .../assets/fonts/fontawesome-webfont.svg        |  17 +++
 .../assets/fonts/helveticaneue-webfont.css      |  17 +++
 .../assets/fonts/helveticaneue-webfont.svg      |  17 +++
 docs/website/assets/fonts/helveticaneue_lt.css  |  17 +++
 docs/website/assets/fonts/helveticaneue_lt.svg  |  17 +++
 .../assets/fonts/opensans-light-webfont.svg     |  17 +++
 .../assets/fonts/opensans-regular-webfont.svg   |  17 +++
 docs/website/blog/index.html                    |  18 +++
 docs/website/community/index.html               |  18 +++
 docs/website/css/main.scss                      |  17 +++
 docs/website/docs/index.html                    |  18 +++
 docs/website/docs/installation-content.html     |  18 +++
 docs/website/docs/intro-content.html            |  18 +++
 docs/website/feed.xml                           |  14 ++
 docs/website/google0f781a4ad9402c21.html        |  18 +++
 .../test_case_data/localmeta/kylin.properties   |  17 +++
 .../test_case_data/localmeta/kylin_job_conf.xml |  14 ++
 .../localmeta_v1/kylin.properties               |  17 +++
 .../minicluster/b-kylin/kylin.properties        |  17 +++
 .../minicluster/b-kylin/meta/kylin.properties   |  17 +++
 .../test_case_data/minicluster/kylin.properties |  17 +++
 .../minicluster/kylin_job_conf.lzo_disabled.xml |  14 ++
 .../minicluster/kylin_job_conf.lzo_enabled.xml  |  14 ++
 .../minicluster/kylin_job_conf.xml              |  14 ++
 .../sandbox-hdp21/capacity-scheduler.xml        |   1 +
 .../test_case_data/sandbox-hdp21/core-site.xml  |  17 ++-
 .../test_case_data/sandbox-hdp21/hbase-site.xml |  14 ++
 .../test_case_data/sandbox-hdp21/hdfs-site.xml  |  17 ++-
 .../test_case_data/sandbox-hdp21/hive-site.xml  |  14 ++
 .../sandbox-hdp21/kylin.properties              |  17 +++
 .../kylin_job_conf.lzo_disabled.xml             |  14 ++
 .../kylin_job_conf.lzo_enabled.xml              |  14 ++
 .../sandbox-hdp21/kylin_job_conf.xml            |  14 ++
 .../sandbox-hdp21/mapred-site.xml               |  17 ++-
 .../test_case_data/sandbox-hdp21/yarn-site.xml  |  17 ++-
 .../sandbox/capacity-scheduler.xml              | 135 +++++++++--------
 examples/test_case_data/sandbox/core-site.xml   |  17 ++-
 .../test_case_data/sandbox/hadoop-policy.xml    |  17 ++-
 .../test_case_data/sandbox/hbase-policy.xml     |  17 ++-
 examples/test_case_data/sandbox/hbase-site.xml  |  17 ++-
 examples/test_case_data/sandbox/hdfs-site.xml   |  17 ++-
 examples/test_case_data/sandbox/hive-site.xml   |  17 ++-
 .../test_case_data/sandbox/kylin.properties     |  17 +++
 .../test_case_data/sandbox/kylin_job_conf.xml   |  14 ++
 examples/test_case_data/sandbox/mapred-site.xml |  17 ++-
 examples/test_case_data/sandbox/yarn-site.xml   |  17 ++-
 jdbc/src/main/resources/log4j.properties        |  17 +++
 .../resources/org-apache-kylin-jdbc.properties  |  17 +++
 metadata/src/main/assembly/assemble.xml         |  15 ++
 .../apache/kylin/metadata/kylin_env.properties  |  17 +++
 pom.xml                                         | 143 ++++++++++---------
 query/src/test/resources/logging.properties     |  17 +++
 script/build.sh                                 |  16 +++
 script/compress.sh                              |  16 +++
 script/download-tomcat.sh                       |  16 +++
 script/package.sh                               |  16 +++
 script/prepare.sh                               |  16 +++
 .../src/main/resources/applicationContext.xml   |  14 ++
 server/src/main/resources/ehcache-test.xml      |  14 ++
 server/src/main/resources/ehcache.xml           |  14 ++
 server/src/main/resources/kylinSecurity.xml     |  14 ++
 server/src/main/resources/log4j.properties      |  17 +++
 .../src/main/webapp/WEB-INF/kylin-servlet.xml   |  14 ++
 server/src/main/webapp/WEB-INF/web.xml          |  14 ++
 server/src/main/webapp/index.html               |  18 +++
 webapp/.editorconfig                            |  17 +++
 webapp/app/css/AdminLTE-fonts.css               |  17 +++
 webapp/app/css/AdminLTE.css                     |  17 +++
 webapp/app/htaccess.dist                        |  17 +++
 webapp/app/less/animation.less                  |  17 +++
 webapp/app/less/app.less                        |  17 +++
 webapp/app/less/build.less                      |  17 +++
 webapp/app/less/component.less                  |  17 +++
 webapp/app/less/home.less                       |  17 +++
 webapp/app/less/layout.less                     |  17 +++
 webapp/app/less/navbar.less                     |  17 +++
 104 files changed, 1794 insertions(+), 152 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/bin/check-env.sh
----------------------------------------------------------------------
diff --git a/bin/check-env.sh b/bin/check-env.sh
index 5380679..79076f9 100644
--- a/bin/check-env.sh
+++ b/bin/check-env.sh
@@ -1,4 +1,22 @@
 #!/bin/sh
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 #by source
 
 if [ -z "$KYLIN_HOME" ]

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/bin/find-hive-dependency.sh
----------------------------------------------------------------------
diff --git a/bin/find-hive-dependency.sh b/bin/find-hive-dependency.sh
index f15e87e..4adf739 100644
--- a/bin/find-hive-dependency.sh
+++ b/bin/find-hive-dependency.sh
@@ -1,5 +1,22 @@
 #!/bin/sh
 
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 hive_env=`hive -e set | grep 'env:CLASSPATH'`
 
 hive_classpath=`echo $hive_env | grep 'env:CLASSPATH' | awk -F '=' '{print $2}'`

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/bin/health-check.sh
----------------------------------------------------------------------
diff --git a/bin/health-check.sh b/bin/health-check.sh
index 439eef4..a9c774f 100644
--- a/bin/health-check.sh
+++ b/bin/health-check.sh
@@ -1,5 +1,22 @@
 #!/usr/bin/env bash
 
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 ALERT="your@email.com"
 
 OUTPUT=$(

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/bin/kylin.sh
----------------------------------------------------------------------
diff --git a/bin/kylin.sh b/bin/kylin.sh
index 5dabb37..6114542 100644
--- a/bin/kylin.sh
+++ b/bin/kylin.sh
@@ -1,5 +1,22 @@
 #!/bin/sh
 
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 if [ $1 == "start" ]
 then
     dir=$(dirname ${0})

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/bin/sample.sh
----------------------------------------------------------------------
diff --git a/bin/sample.sh b/bin/sample.sh
index 02930a9..fbad7fd 100644
--- a/bin/sample.sh
+++ b/bin/sample.sh
@@ -1,4 +1,22 @@
 #!/bin/sh
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 dir=$(dirname ${0})
 source ${dir}/check-env.sh
 job_jar=`find ${KYLIN_HOME}/lib/ -name kylin-job*.jar`

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/bin/setenv.sh
----------------------------------------------------------------------
diff --git a/bin/setenv.sh b/bin/setenv.sh
index 53f614d..2760537 100755
--- a/bin/setenv.sh
+++ b/bin/setenv.sh
@@ -1,5 +1,22 @@
 #!/bin/bash
 
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 # uncomment following to for it to take effect
 # export KYLIN_JVM_SETTINGS="-Xms16g -Xmx16g -XX:MaxPermSize=512m -XX:NewSize=3g -XX:MaxNewSize=3g -XX:SurvivorRatio=4 -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:CMSInitiatingOccupancyFraction=70 -XX:+DisableExplicitGC"
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/common/src/main/resources/kylinlog4j.properties
----------------------------------------------------------------------
diff --git a/common/src/main/resources/kylinlog4j.properties b/common/src/main/resources/kylinlog4j.properties
index 7c3f26a..564f15d 100644
--- a/common/src/main/resources/kylinlog4j.properties
+++ b/common/src/main/resources/kylinlog4j.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 # use this when conflict with hbase, enable this by -Dlog4j.configuration=kylinlog4j.properties
 
 log4j.rootLogger=INFO,stdout

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/common/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/common/src/main/resources/log4j.properties b/common/src/main/resources/log4j.properties
index 616f3a2..8c8b685 100644
--- a/common/src/main/resources/log4j.properties
+++ b/common/src/main/resources/log4j.properties
@@ -1,3 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 log4j.rootLogger=INFO,stdout
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/conf/kylin.properties
----------------------------------------------------------------------
diff --git a/conf/kylin.properties b/conf/kylin.properties
index 00bc91a..cf9756e 100644
--- a/conf/kylin.properties
+++ b/conf/kylin.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 ## Config for Kylin Engine ##
 
 # List of web servers in use, this enables one web server instance to sync up with other servers.

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/conf/kylin_job_conf.xml
----------------------------------------------------------------------
diff --git a/conf/kylin_job_conf.xml b/conf/kylin_job_conf.xml
index f62ce55..81704f2 100644
--- a/conf/kylin_job_conf.xml
+++ b/conf/kylin_job_conf.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0"?>
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. See accompanying LICENSE file.
+-->
+
 <configuration>
 
     <property>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/cube/src/main/assembly/assemble.xml
----------------------------------------------------------------------
diff --git a/cube/src/main/assembly/assemble.xml b/cube/src/main/assembly/assemble.xml
index c26c222..2596603 100644
--- a/cube/src/main/assembly/assemble.xml
+++ b/cube/src/main/assembly/assemble.xml
@@ -1,3 +1,17 @@
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
 <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
     <id>jar-with-dependencies</id>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/BingSiteAuth.xml
----------------------------------------------------------------------
diff --git a/docs/website/BingSiteAuth.xml b/docs/website/BingSiteAuth.xml
index af20afb..3997596 100644
--- a/docs/website/BingSiteAuth.xml
+++ b/docs/website/BingSiteAuth.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0"?>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
 <users>
 	<user>403B76701CE9848BFBBE0912251DDAA9</user>
 </users>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_config-prod.yml
----------------------------------------------------------------------
diff --git a/docs/website/_config-prod.yml b/docs/website/_config-prod.yml
index efc5c03..83a3dd1 100644
--- a/docs/website/_config-prod.yml
+++ b/docs/website/_config-prod.yml
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 # kylin.apache.org
 baseurl: ""
 noindex: 0 # Make sure this gets indexed by Google
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_config.yml
----------------------------------------------------------------------
diff --git a/docs/website/_config.yml b/docs/website/_config.yml
index 30079fc..9f347af 100644
--- a/docs/website/_config.yml
+++ b/docs/website/_config.yml
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 # Site settings
 title: kylin.io
 email: dev@kylin.incubator.apache.org

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_includes/footer.html
----------------------------------------------------------------------
diff --git a/docs/website/_includes/footer.html b/docs/website/_includes/footer.html
index 8561e95..9f0bebc 100644
--- a/docs/website/_includes/footer.html
+++ b/docs/website/_includes/footer.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 <footer id="underfooter">
   <div class="container">
     <div class="row">

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_includes/head.cn.html
----------------------------------------------------------------------
diff --git a/docs/website/_includes/head.cn.html b/docs/website/_includes/head.cn.html
index bb8a7e8..53d7204 100644
--- a/docs/website/_includes/head.cn.html
+++ b/docs/website/_includes/head.cn.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 <head>
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_includes/head.html
----------------------------------------------------------------------
diff --git a/docs/website/_includes/head.html b/docs/website/_includes/head.html
index 7c005ee..dc2063f 100644
--- a/docs/website/_includes/head.html
+++ b/docs/website/_includes/head.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 <head>
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_includes/header.cn.html
----------------------------------------------------------------------
diff --git a/docs/website/_includes/header.cn.html b/docs/website/_includes/header.cn.html
index 7e14a32..8ee7ebe 100644
--- a/docs/website/_includes/header.cn.html
+++ b/docs/website/_includes/header.cn.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 <header id="header" >
   <div id="head" class="parallax" parallax-speed="3" >
     <div id="logo" class="text-center"> <img class="img-circle" id="circlelogo" src="{{ "/assets/images/kylin_logo.jpg"| prepend: site.baseurl }}"> <span class="title" >Apache Kylin</span> <span class="tagline">Extreme OLAP Engine for Big Data</span> 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_includes/header.html
----------------------------------------------------------------------
diff --git a/docs/website/_includes/header.html b/docs/website/_includes/header.html
index 7753f5b..f264884 100644
--- a/docs/website/_includes/header.html
+++ b/docs/website/_includes/header.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 <header id="header" >
   
   <div id="head" class="parallax" parallax-speed="3" >

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_layouts/default-cn.html
----------------------------------------------------------------------
diff --git a/docs/website/_layouts/default-cn.html b/docs/website/_layouts/default-cn.html
index 1adae5b..f5bad69 100644
--- a/docs/website/_layouts/default-cn.html
+++ b/docs/website/_layouts/default-cn.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 <!DOCTYPE html>
 <html>
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_layouts/default.html
----------------------------------------------------------------------
diff --git a/docs/website/_layouts/default.html b/docs/website/_layouts/default.html
index 9c8968c..973eb0f 100644
--- a/docs/website/_layouts/default.html
+++ b/docs/website/_layouts/default.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 <!DOCTYPE html>
 <html>
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_layouts/page.html
----------------------------------------------------------------------
diff --git a/docs/website/_layouts/page.html b/docs/website/_layouts/page.html
index 74c1a11..de945f4 100644
--- a/docs/website/_layouts/page.html
+++ b/docs/website/_layouts/page.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 ---
 layout: default
 ---

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_layouts/post.html
----------------------------------------------------------------------
diff --git a/docs/website/_layouts/post.html b/docs/website/_layouts/post.html
index 0574e66..38c68c8 100644
--- a/docs/website/_layouts/post.html
+++ b/docs/website/_layouts/post.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 ---
 layout: default
 ---

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_sass/_base.scss
----------------------------------------------------------------------
diff --git a/docs/website/_sass/_base.scss b/docs/website/_sass/_base.scss
index e5fd0fd..6fed5eb 100644
--- a/docs/website/_sass/_base.scss
+++ b/docs/website/_sass/_base.scss
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /**
  * Reset some basic elements
  */

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_sass/_layout.scss
----------------------------------------------------------------------
diff --git a/docs/website/_sass/_layout.scss b/docs/website/_sass/_layout.scss
index def56f8..01c4336 100644
--- a/docs/website/_sass/_layout.scss
+++ b/docs/website/_sass/_layout.scss
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /**
  * Site header
  */

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/_sass/_syntax-highlighting.scss
----------------------------------------------------------------------
diff --git a/docs/website/_sass/_syntax-highlighting.scss b/docs/website/_sass/_syntax-highlighting.scss
index e36627d..44e482c 100644
--- a/docs/website/_sass/_syntax-highlighting.scss
+++ b/docs/website/_sass/_syntax-highlighting.scss
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /**
  * Syntax highlighting styles
  */

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/assets/css/animate.css
----------------------------------------------------------------------
diff --git a/docs/website/assets/css/animate.css b/docs/website/assets/css/animate.css
index d71da17..b090c1e 100644
--- a/docs/website/assets/css/animate.css
+++ b/docs/website/assets/css/animate.css
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 @charset "UTF-8";
 
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/assets/css/styles.css
----------------------------------------------------------------------
diff --git a/docs/website/assets/css/styles.css b/docs/website/assets/css/styles.css
index 8b6e1af..8381071 100644
--- a/docs/website/assets/css/styles.css
+++ b/docs/website/assets/css/styles.css
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 @font-face {
 	font-family: 'HelveticaNeueLight';
 	src: url('../fonts/helveticaneue_lt.eot');

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/assets/fonts/fontawesome-webfont.svg
----------------------------------------------------------------------
diff --git a/docs/website/assets/fonts/fontawesome-webfont.svg b/docs/website/assets/fonts/fontawesome-webfont.svg
index d907b25..cff2549 100644
--- a/docs/website/assets/fonts/fontawesome-webfont.svg
+++ b/docs/website/assets/fonts/fontawesome-webfont.svg
@@ -1,4 +1,21 @@
 <?xml version="1.0" standalone="no"?>
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
 <svg xmlns="http://www.w3.org/2000/svg">
 <metadata></metadata>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/assets/fonts/helveticaneue-webfont.css
----------------------------------------------------------------------
diff --git a/docs/website/assets/fonts/helveticaneue-webfont.css b/docs/website/assets/fonts/helveticaneue-webfont.css
index 6a42ad4..8c91d0d 100644
--- a/docs/website/assets/fonts/helveticaneue-webfont.css
+++ b/docs/website/assets/fonts/helveticaneue-webfont.css
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 @font-face {
     font-family: 'HelveticaNeueRegular';
     src: url('helveticaneue-webfont.eot');

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/assets/fonts/helveticaneue-webfont.svg
----------------------------------------------------------------------
diff --git a/docs/website/assets/fonts/helveticaneue-webfont.svg b/docs/website/assets/fonts/helveticaneue-webfont.svg
index d6476d6..0feefca 100644
--- a/docs/website/assets/fonts/helveticaneue-webfont.svg
+++ b/docs/website/assets/fonts/helveticaneue-webfont.svg
@@ -1,4 +1,21 @@
 <?xml version="1.0" standalone="no"?>
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
 <svg>
 <metadata>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/assets/fonts/helveticaneue_lt.css
----------------------------------------------------------------------
diff --git a/docs/website/assets/fonts/helveticaneue_lt.css b/docs/website/assets/fonts/helveticaneue_lt.css
index cb4cb73..f02d428 100644
--- a/docs/website/assets/fonts/helveticaneue_lt.css
+++ b/docs/website/assets/fonts/helveticaneue_lt.css
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 @font-face {
     font-family: 'HelveticaNeueLight';
     src: url('helveticaneue_lt.eot');

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/assets/fonts/helveticaneue_lt.svg
----------------------------------------------------------------------
diff --git a/docs/website/assets/fonts/helveticaneue_lt.svg b/docs/website/assets/fonts/helveticaneue_lt.svg
index 112404c..2db0e13 100644
--- a/docs/website/assets/fonts/helveticaneue_lt.svg
+++ b/docs/website/assets/fonts/helveticaneue_lt.svg
@@ -1,4 +1,21 @@
 <?xml version="1.0" standalone="no"?>
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
 <svg>
 <metadata>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/assets/fonts/opensans-light-webfont.svg
----------------------------------------------------------------------
diff --git a/docs/website/assets/fonts/opensans-light-webfont.svg b/docs/website/assets/fonts/opensans-light-webfont.svg
index a36a5b7..7e19254 100644
--- a/docs/website/assets/fonts/opensans-light-webfont.svg
+++ b/docs/website/assets/fonts/opensans-light-webfont.svg
@@ -1,4 +1,21 @@
 <?xml version="1.0" standalone="no"?>
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
 <svg xmlns="http://www.w3.org/2000/svg">
 <metadata></metadata>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/assets/fonts/opensans-regular-webfont.svg
----------------------------------------------------------------------
diff --git a/docs/website/assets/fonts/opensans-regular-webfont.svg b/docs/website/assets/fonts/opensans-regular-webfont.svg
index a169e01..0b97060 100644
--- a/docs/website/assets/fonts/opensans-regular-webfont.svg
+++ b/docs/website/assets/fonts/opensans-regular-webfont.svg
@@ -1,4 +1,21 @@
 <?xml version="1.0" standalone="no"?>
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
 <svg xmlns="http://www.w3.org/2000/svg">
 <metadata></metadata>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/blog/index.html
----------------------------------------------------------------------
diff --git a/docs/website/blog/index.html b/docs/website/blog/index.html
index 6db414f..d3967bd 100644
--- a/docs/website/blog/index.html
+++ b/docs/website/blog/index.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 ---
 layout: default
 title: Blog

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/community/index.html
----------------------------------------------------------------------
diff --git a/docs/website/community/index.html b/docs/website/community/index.html
index a426f6c..e451fba 100644
--- a/docs/website/community/index.html
+++ b/docs/website/community/index.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 ---
 layout: default
 title: Community

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/css/main.scss
----------------------------------------------------------------------
diff --git a/docs/website/css/main.scss b/docs/website/css/main.scss
index beee4e3..f077752 100755
--- a/docs/website/css/main.scss
+++ b/docs/website/css/main.scss
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 ---
 # Only the main Sass file needs front matter (the dashes are enough)
 ---

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/docs/index.html
----------------------------------------------------------------------
diff --git a/docs/website/docs/index.html b/docs/website/docs/index.html
index 599fd75..e59b386 100644
--- a/docs/website/docs/index.html
+++ b/docs/website/docs/index.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 ---
 layout: default
 title: Docs

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/docs/installation-content.html
----------------------------------------------------------------------
diff --git a/docs/website/docs/installation-content.html b/docs/website/docs/installation-content.html
index 0a7f872..38ffdaf 100644
--- a/docs/website/docs/installation-content.html
+++ b/docs/website/docs/installation-content.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 ---
 layout: default
 title: Docs

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/docs/intro-content.html
----------------------------------------------------------------------
diff --git a/docs/website/docs/intro-content.html b/docs/website/docs/intro-content.html
index b1a9ad0..0c96388 100644
--- a/docs/website/docs/intro-content.html
+++ b/docs/website/docs/intro-content.html
@@ -1,3 +1,21 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 ---
 layout: default
 title: Docs

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/feed.xml
----------------------------------------------------------------------
diff --git a/docs/website/feed.xml b/docs/website/feed.xml
index a6628bd..d2d4a6e 100644
--- a/docs/website/feed.xml
+++ b/docs/website/feed.xml
@@ -2,6 +2,20 @@
 layout: null
 ---
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
   <channel>
     <title>{{ site.title | xml_escape }}</title>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/docs/website/google0f781a4ad9402c21.html
----------------------------------------------------------------------
diff --git a/docs/website/google0f781a4ad9402c21.html b/docs/website/google0f781a4ad9402c21.html
index 9977b67..1bdaf0b 100644
--- a/docs/website/google0f781a4ad9402c21.html
+++ b/docs/website/google0f781a4ad9402c21.html
@@ -1 +1,19 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
 google-site-verification: google0f781a4ad9402c21.html
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/localmeta/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/kylin.properties b/examples/test_case_data/localmeta/kylin.properties
index aa18287..bf51be7 100644
--- a/examples/test_case_data/localmeta/kylin.properties
+++ b/examples/test_case_data/localmeta/kylin.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 ## Config for Kylin Engine ##
 
 # List of web servers in use, this enables one web server instance to sync up with other servers.

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/localmeta/kylin_job_conf.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/kylin_job_conf.xml b/examples/test_case_data/localmeta/kylin_job_conf.xml
index f62ce55..81704f2 100644
--- a/examples/test_case_data/localmeta/kylin_job_conf.xml
+++ b/examples/test_case_data/localmeta/kylin_job_conf.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0"?>
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. See accompanying LICENSE file.
+-->
+
 <configuration>
 
     <property>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/localmeta_v1/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta_v1/kylin.properties b/examples/test_case_data/localmeta_v1/kylin.properties
index aa18287..bf51be7 100644
--- a/examples/test_case_data/localmeta_v1/kylin.properties
+++ b/examples/test_case_data/localmeta_v1/kylin.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 ## Config for Kylin Engine ##
 
 # List of web servers in use, this enables one web server instance to sync up with other servers.

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/minicluster/b-kylin/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/minicluster/b-kylin/kylin.properties b/examples/test_case_data/minicluster/b-kylin/kylin.properties
index f1234a8..e2fe45c 100644
--- a/examples/test_case_data/minicluster/b-kylin/kylin.properties
+++ b/examples/test_case_data/minicluster/b-kylin/kylin.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 ## Config for Kylin Engine ##
 
 # List of web servers in use, this enables one web server instance to sync up with other servers.

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/minicluster/b-kylin/meta/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/minicluster/b-kylin/meta/kylin.properties b/examples/test_case_data/minicluster/b-kylin/meta/kylin.properties
index 642f845..6e2e951 100644
--- a/examples/test_case_data/minicluster/b-kylin/meta/kylin.properties
+++ b/examples/test_case_data/minicluster/b-kylin/meta/kylin.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 ## Config for Kylin Engine ##
 
 # List of web servers in use, this enables one web server instance to sync up with other servers.

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/minicluster/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/minicluster/kylin.properties b/examples/test_case_data/minicluster/kylin.properties
index 736de65..aa53158 100644
--- a/examples/test_case_data/minicluster/kylin.properties
+++ b/examples/test_case_data/minicluster/kylin.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 ## Config for Kylin Engine ##
 
 # List of web servers in use, this enables one web server instance to sync up with other servers.

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/minicluster/kylin_job_conf.lzo_disabled.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/minicluster/kylin_job_conf.lzo_disabled.xml b/examples/test_case_data/minicluster/kylin_job_conf.lzo_disabled.xml
index f62ce55..81704f2 100644
--- a/examples/test_case_data/minicluster/kylin_job_conf.lzo_disabled.xml
+++ b/examples/test_case_data/minicluster/kylin_job_conf.lzo_disabled.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0"?>
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. See accompanying LICENSE file.
+-->
+
 <configuration>
 
     <property>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/minicluster/kylin_job_conf.lzo_enabled.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/minicluster/kylin_job_conf.lzo_enabled.xml b/examples/test_case_data/minicluster/kylin_job_conf.lzo_enabled.xml
index f62ce55..81704f2 100644
--- a/examples/test_case_data/minicluster/kylin_job_conf.lzo_enabled.xml
+++ b/examples/test_case_data/minicluster/kylin_job_conf.lzo_enabled.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0"?>
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. See accompanying LICENSE file.
+-->
+
 <configuration>
 
     <property>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/minicluster/kylin_job_conf.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/minicluster/kylin_job_conf.xml b/examples/test_case_data/minicluster/kylin_job_conf.xml
index f62ce55..81704f2 100644
--- a/examples/test_case_data/minicluster/kylin_job_conf.xml
+++ b/examples/test_case_data/minicluster/kylin_job_conf.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0"?>
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. See accompanying LICENSE file.
+-->
+
 <configuration>
 
     <property>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox-hdp21/capacity-scheduler.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox-hdp21/capacity-scheduler.xml b/examples/test_case_data/sandbox-hdp21/capacity-scheduler.xml
index 80a9fec..bd2c284 100644
--- a/examples/test_case_data/sandbox-hdp21/capacity-scheduler.xml
+++ b/examples/test_case_data/sandbox-hdp21/capacity-scheduler.xml
@@ -11,6 +11,7 @@
   See the License for the specific language governing permissions and
   limitations under the License. See accompanying LICENSE file.
 -->
+
 <configuration>
 
   <property>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox-hdp21/core-site.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox-hdp21/core-site.xml b/examples/test_case_data/sandbox-hdp21/core-site.xml
index e8e54ad..4cc666e 100644
--- a/examples/test_case_data/sandbox-hdp21/core-site.xml
+++ b/examples/test_case_data/sandbox-hdp21/core-site.xml
@@ -1,5 +1,18 @@
-<!--Mon Feb 10 22:50:51 2014-->
-  <configuration>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
     <property>
     <name>hadoop.proxyuser.hcat.groups</name>
     <value>*</value>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox-hdp21/hbase-site.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox-hdp21/hbase-site.xml b/examples/test_case_data/sandbox-hdp21/hbase-site.xml
index 1fc6670..0e4a814 100644
--- a/examples/test_case_data/sandbox-hdp21/hbase-site.xml
+++ b/examples/test_case_data/sandbox-hdp21/hbase-site.xml
@@ -1,3 +1,17 @@
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
 <configuration>
 
 	<property>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox-hdp21/hdfs-site.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox-hdp21/hdfs-site.xml b/examples/test_case_data/sandbox-hdp21/hdfs-site.xml
index 48b7112..bb85d10 100644
--- a/examples/test_case_data/sandbox-hdp21/hdfs-site.xml
+++ b/examples/test_case_data/sandbox-hdp21/hdfs-site.xml
@@ -1,5 +1,18 @@
-<!--Mon Feb 10 22:50:51 2014-->
-  <configuration>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
     <property>
     <name>dfs.namenode.stale.datanode.interval</name>
     <value>30000</value>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox-hdp21/hive-site.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox-hdp21/hive-site.xml b/examples/test_case_data/sandbox-hdp21/hive-site.xml
index 5fcbd10..590a7fb 100644
--- a/examples/test_case_data/sandbox-hdp21/hive-site.xml
+++ b/examples/test_case_data/sandbox-hdp21/hive-site.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. See accompanying LICENSE file.
+-->
+
 <configuration>
   <property>
     <name>hive.metastore.uris</name>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox-hdp21/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox-hdp21/kylin.properties b/examples/test_case_data/sandbox-hdp21/kylin.properties
index 3e2f97a..04fa829 100644
--- a/examples/test_case_data/sandbox-hdp21/kylin.properties
+++ b/examples/test_case_data/sandbox-hdp21/kylin.properties
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 ## Config for Kylin Engine ##
 
 # List of web servers in use, this enables one web server instance to sync up with other servers.

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox-hdp21/kylin_job_conf.lzo_disabled.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox-hdp21/kylin_job_conf.lzo_disabled.xml b/examples/test_case_data/sandbox-hdp21/kylin_job_conf.lzo_disabled.xml
index 3cab986..62aff4a 100644
--- a/examples/test_case_data/sandbox-hdp21/kylin_job_conf.lzo_disabled.xml
+++ b/examples/test_case_data/sandbox-hdp21/kylin_job_conf.lzo_disabled.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0"?>
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. See accompanying LICENSE file.
+-->
+
 <configuration>
 
     <property>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox-hdp21/kylin_job_conf.lzo_enabled.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox-hdp21/kylin_job_conf.lzo_enabled.xml b/examples/test_case_data/sandbox-hdp21/kylin_job_conf.lzo_enabled.xml
index 3cab986..62aff4a 100644
--- a/examples/test_case_data/sandbox-hdp21/kylin_job_conf.lzo_enabled.xml
+++ b/examples/test_case_data/sandbox-hdp21/kylin_job_conf.lzo_enabled.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0"?>
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. See accompanying LICENSE file.
+-->
+
 <configuration>
 
     <property>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox-hdp21/kylin_job_conf.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox-hdp21/kylin_job_conf.xml b/examples/test_case_data/sandbox-hdp21/kylin_job_conf.xml
index 3cab986..62aff4a 100644
--- a/examples/test_case_data/sandbox-hdp21/kylin_job_conf.xml
+++ b/examples/test_case_data/sandbox-hdp21/kylin_job_conf.xml
@@ -1,4 +1,18 @@
 <?xml version="1.0"?>
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. See accompanying LICENSE file.
+-->
+
 <configuration>
 
     <property>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox-hdp21/mapred-site.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox-hdp21/mapred-site.xml b/examples/test_case_data/sandbox-hdp21/mapred-site.xml
index b699c5d..14e1dd9 100644
--- a/examples/test_case_data/sandbox-hdp21/mapred-site.xml
+++ b/examples/test_case_data/sandbox-hdp21/mapred-site.xml
@@ -1,5 +1,18 @@
-<!--Mon Feb 10 22:50:51 2014-->
-  <configuration>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
     <property>
     <name>mapreduce.jobhistory.webapp.address</name>
     <value>sandbox.hortonworks.com:19888</value>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/01c5aa7a/examples/test_case_data/sandbox-hdp21/yarn-site.xml
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox-hdp21/yarn-site.xml b/examples/test_case_data/sandbox-hdp21/yarn-site.xml
index 61da005..1b4c8be 100644
--- a/examples/test_case_data/sandbox-hdp21/yarn-site.xml
+++ b/examples/test_case_data/sandbox-hdp21/yarn-site.xml
@@ -1,5 +1,18 @@
-<!--Sun Jan 26 18:32:31 2014-->
-  <configuration>
+<!--
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+<configuration>
     <property>
     <name>yarn.nodemanager.aux-services</name>
     <value>mapreduce_shuffle</value>


[24/39] incubator-kylin git commit: KYLIN-715

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_distinct/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query04.sql b/query/src/test/resources/query/sql_distinct/query04.sql
index 3bd7072..694b32a 100644
--- a/query/src/test/resources/query/sql_distinct/query04.sql
+++ b/query/src/test/resources/query/sql_distinct/query04.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(1) as TRANS_CNT, count(distinct seller_id) as DIST_SELLER 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_distinct/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query05.sql b/query/src/test/resources/query/sql_distinct/query05.sql
index 4744c4b..f992fbb 100644
--- a/query/src/test/resources/query/sql_distinct/query05.sql
+++ b/query/src/test/resources/query/sql_distinct/query05.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, 
  sum(price) as GMV, 
  count(1) as TRANS_CNT, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_distinct/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query06.sql b/query/src/test/resources/query/sql_distinct/query06.sql
index b4ca929..19ef2a6 100644
--- a/query/src/test/resources/query/sql_distinct/query06.sql
+++ b/query/src/test/resources/query/sql_distinct/query06.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, 
  sum(price) as GMV, 
  count(1) as TRANS_CNT, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_distinct/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query07.sql b/query/src/test/resources/query/sql_distinct/query07.sql
index 1f48c52..aeaca89 100644
--- a/query/src/test/resources/query/sql_distinct/query07.sql
+++ b/query/src/test/resources/query/sql_distinct/query07.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, 
  sum(price) as GMV, 
  count(1) as TRANS_CNT, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_dynamic/query01.dat
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_dynamic/query01.dat b/query/src/test/resources/query/sql_dynamic/query01.dat
index e810421..5e68a24 100644
--- a/query/src/test/resources/query/sql_dynamic/query01.dat
+++ b/query/src/test/resources/query/sql_dynamic/query01.dat
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 FP-GTC
-Collectibles
\ No newline at end of file
+Collectibles

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_dynamic/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_dynamic/query01.sql b/query/src/test/resources/query/sql_dynamic/query01.sql
index 55f4e84..5e216c2 100644
--- a/query/src/test/resources/query/sql_dynamic/query01.sql
+++ b/query/src/test/resources/query/sql_dynamic/query01.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.week_beg_dt, test_kylin_fact.lstg_format_name, test_category_groupings.meta_categ_name, sum(test_kylin_fact.price) as gmv, count(*) as trans_cnt 
  from test_kylin_fact 
  inner JOIN edw.test_cal_dt as test_cal_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_dynamic/query02.dat
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_dynamic/query02.dat b/query/src/test/resources/query/sql_dynamic/query02.dat
index e810421..5e68a24 100644
--- a/query/src/test/resources/query/sql_dynamic/query02.dat
+++ b/query/src/test/resources/query/sql_dynamic/query02.dat
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 FP-GTC
-Collectibles
\ No newline at end of file
+Collectibles

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_dynamic/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_dynamic/query02.sql b/query/src/test/resources/query/sql_dynamic/query02.sql
index ba4f563..0452da9 100644
--- a/query/src/test/resources/query/sql_dynamic/query02.sql
+++ b/query/src/test/resources/query/sql_dynamic/query02.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select sum(1) as "col" from ( 
  select test_cal_dt.week_beg_dt, test_kylin_fact.lstg_format_name, test_category_groupings.meta_categ_name, sum(test_kylin_fact.price) as gmv, count(*) as trans_cnt 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_fast_common/query00.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_fast_common/query00.sql b/query/src/test/resources/query/sql_fast_common/query00.sql
index 198aea1..0ff7395 100644
--- a/query/src/test/resources/query/sql_fast_common/query00.sql
+++ b/query/src/test/resources/query/sql_fast_common/query00.sql
@@ -1,5 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, cal_dt,
  sum(price) as GMV,
  count(1) as TRANS_CNT
  from test_kylin_fact
- group by lstg_format_name, cal_dt
\ No newline at end of file
+ group by lstg_format_name, cal_dt

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_hive/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_hive/query01.sql b/query/src/test/resources/query/sql_hive/query01.sql
index 322c260..988ae84 100644
--- a/query/src/test/resources/query/sql_hive/query01.sql
+++ b/query/src/test/resources/query/sql_hive/query01.sql
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select cal_dt, sum(price)as GMV, count(1) as trans_cnt from test_kylin_fact 
  group by cal_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_hive/query10.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_hive/query10.sql b/query/src/test/resources/query/sql_hive/query10.sql
index 6073e25..c469e22 100644
--- a/query/src/test/resources/query/sql_hive/query10.sql
+++ b/query/src/test/resources/query/sql_hive/query10.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.QTR_BEG_DT,sum(test_kylin_fact.price) as gmv 
  , count(*) as trans_cnt 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_ii/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query01.sql b/query/src/test/resources/query/sql_ii/query01.sql
index 11dd4d8..1316dfd 100644
--- a/query/src/test/resources/query/sql_ii/query01.sql
+++ b/query/src/test/resources/query/sql_ii/query01.sql
@@ -1 +1,19 @@
-select count(*) as all_count from test_kylin_fact
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select count(*) as all_count from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_ii/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query02.sql b/query/src/test/resources/query/sql_ii/query02.sql
index 4c6d1e9..e2299eb 100644
--- a/query/src/test/resources/query/sql_ii/query02.sql
+++ b/query/src/test/resources/query/sql_ii/query02.sql
@@ -1 +1,19 @@
-select sum(price) as price_sum, min(price) as price_min, max(price) as price_max from test_kylin_fact
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select sum(price) as price_sum, min(price) as price_min, max(price) as price_max from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_ii/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query03.sql b/query/src/test/resources/query/sql_ii/query03.sql
index 0a37a97..410118b 100644
--- a/query/src/test/resources/query/sql_ii/query03.sql
+++ b/query/src/test/resources/query/sql_ii/query03.sql
@@ -1 +1,19 @@
-select sum(price) as price_sum, min(price) as price_min , max(price) as price_max , LSTG_FORMAT_NAME from test_kylin_fact group by LSTG_FORMAT_NAME
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select sum(price) as price_sum, min(price) as price_min , max(price) as price_max , LSTG_FORMAT_NAME from test_kylin_fact group by LSTG_FORMAT_NAME

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_ii/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query04.sql b/query/src/test/resources/query/sql_ii/query04.sql
index 29b7d85..91b3763 100644
--- a/query/src/test/resources/query/sql_ii/query04.sql
+++ b/query/src/test/resources/query/sql_ii/query04.sql
@@ -1 +1,19 @@
-select TRANS_ID,CAL_DT,LSTG_FORMAT_NAME,LEAF_CATEG_ID,LSTG_SITE_ID,SLR_SEGMENT_CD,PRICE,ITEM_COUNT,SELLER_ID from test_kylin_fact where LSTG_FORMAT_NAME = 'ABIN'
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select TRANS_ID,CAL_DT,LSTG_FORMAT_NAME,LEAF_CATEG_ID,LSTG_SITE_ID,SLR_SEGMENT_CD,PRICE,ITEM_COUNT,SELLER_ID from test_kylin_fact where LSTG_FORMAT_NAME = 'ABIN'

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_ii/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query05.sql b/query/src/test/resources/query/sql_ii/query05.sql
index 683c978..754ae45 100644
--- a/query/src/test/resources/query/sql_ii/query05.sql
+++ b/query/src/test/resources/query/sql_ii/query05.sql
@@ -1 +1,19 @@
-select sum(price) as price_sum, min(price) as price_min , max(price) as price_max , SELLER_ID from test_kylin_fact   where SELLER_ID > 10000149 group by SELLER_ID
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select sum(price) as price_sum, min(price) as price_min , max(price) as price_max , SELLER_ID from test_kylin_fact   where SELLER_ID > 10000149 group by SELLER_ID

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_ii/query06.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query06.sql.disabled b/query/src/test/resources/query/sql_ii/query06.sql.disabled
index fd9c3dc..0d16e5c 100644
--- a/query/src/test/resources/query/sql_ii/query06.sql.disabled
+++ b/query/src/test/resources/query/sql_ii/query06.sql.disabled
@@ -1 +1,19 @@
-select price from test_kylin_fact where price > 50
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select price from test_kylin_fact where price > 50

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_ii/query07.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query07.sql.disabled b/query/src/test/resources/query/sql_ii/query07.sql.disabled
index 45ecaf0..b6e7092 100644
--- a/query/src/test/resources/query/sql_ii/query07.sql.disabled
+++ b/query/src/test/resources/query/sql_ii/query07.sql.disabled
@@ -1 +1,19 @@
-select sum(price) as price_sum, min(price) as price_min , max(price) as price_max , LSTG_FORMAT_NAME from test_kylin_fact   where price > 50 group by LSTG_FORMAT_NAME
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select sum(price) as price_sum, min(price) as price_min , max(price) as price_max , LSTG_FORMAT_NAME from test_kylin_fact   where price > 50 group by LSTG_FORMAT_NAME

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_ii/query08.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query08.sql b/query/src/test/resources/query/sql_ii/query08.sql
index e331352..a1495eb 100644
--- a/query/src/test/resources/query/sql_ii/query08.sql
+++ b/query/src/test/resources/query/sql_ii/query08.sql
@@ -1 +1,19 @@
-select TRANS_ID,CAL_DT,LSTG_FORMAT_NAME,LEAF_CATEG_ID,LSTG_SITE_ID,SLR_SEGMENT_CD,PRICE,ITEM_COUNT,SELLER_ID from test_kylin_fact where LSTG_FORMAT_NAME > 'ABIN'
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select TRANS_ID,CAL_DT,LSTG_FORMAT_NAME,LEAF_CATEG_ID,LSTG_SITE_ID,SLR_SEGMENT_CD,PRICE,ITEM_COUNT,SELLER_ID from test_kylin_fact where LSTG_FORMAT_NAME > 'ABIN'

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_ii/query09.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query09.sql b/query/src/test/resources/query/sql_ii/query09.sql
index f932a22..f77c6d5 100644
--- a/query/src/test/resources/query/sql_ii/query09.sql
+++ b/query/src/test/resources/query/sql_ii/query09.sql
@@ -1 +1,19 @@
-select price, SELLER_ID from test_kylin_fact   where SELLER_ID > 10000149
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select price, SELLER_ID from test_kylin_fact   where SELLER_ID > 10000149

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_invalid/query29_invalid_SQL.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query29_invalid_SQL.sql b/query/src/test/resources/query/sql_invalid/query29_invalid_SQL.sql
index 5c050c6..d7fa053 100644
--- a/query/src/test/resources/query/sql_invalid/query29_invalid_SQL.sql
+++ b/query/src/test/resources/query/sql_invalid/query29_invalid_SQL.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt_test 
  ,test_cal_dt.retail_year 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql b/query/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql
index decdc76..f6abc04 100644
--- a/query/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql
+++ b/query/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt_test 
  ,test_cal_dt.retail_year 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql b/query/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql
index e479f78..0d8318b 100644
--- a/query/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql
+++ b/query/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt_test 
  ,test_cal_dt.retail_year 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_invalid/query32_invalid_SQL.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query32_invalid_SQL.sql b/query/src/test/resources/query/sql_invalid/query32_invalid_SQL.sql
index e8cb459..bd29963 100644
--- a/query/src/test/resources/query/sql_invalid/query32_invalid_SQL.sql
+++ b/query/src/test/resources/query/sql_invalid/query32_invalid_SQL.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt_test 
  ,test_cal_dt.retail_year 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_invalid/query33_invalid_SQL.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query33_invalid_SQL.sql b/query/src/test/resources/query/sql_invalid/query33_invalid_SQL.sql
index 0202dce..0cbc9b9 100644
--- a/query/src/test/resources/query/sql_invalid/query33_invalid_SQL.sql
+++ b/query/src/test/resources/query/sql_invalid/query33_invalid_SQL.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt_test 
  ,test_cal_dt.retail_year 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_invalid/query34_invalid_SQL.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query34_invalid_SQL.sql b/query/src/test/resources/query/sql_invalid/query34_invalid_SQL.sql
index 0bcc5b4..3483555 100644
--- a/query/src/test/resources/query/sql_invalid/query34_invalid_SQL.sql
+++ b/query/src/test/resources/query/sql_invalid/query34_invalid_SQL.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT COUNT(DISTINCT "TableauSQL"."TRANS_CNT") AS "ctd_TRANS_CNT_qk", "TableauSQL"."LSTG_FORMAT_NAME" AS "none_LSTG_FORMAT_NAME_nk" 
  FROM ( select test_kylin_fact.lstg_format_name, sum(price) as GMV, count(seller_id) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_invalid/query_count_distinct_on_dimension.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query_count_distinct_on_dimension.sql.disabled b/query/src/test/resources/query/sql_invalid/query_count_distinct_on_dimension.sql.disabled
index 94f7faf..351126b 100644
--- a/query/src/test/resources/query/sql_invalid/query_count_distinct_on_dimension.sql.disabled
+++ b/query/src/test/resources/query/sql_invalid/query_count_distinct_on_dimension.sql.disabled
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 ##dd 
-select count(distinct cal_dt) from test_kylin_fact
\ No newline at end of file
+select count(distinct cal_dt) from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_lookup/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_lookup/query01.sql b/query/src/test/resources/query/sql_lookup/query01.sql
index 5ebeb92..97010dd 100644
--- a/query/src/test/resources/query/sql_lookup/query01.sql
+++ b/query/src/test/resources/query/sql_lookup/query01.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select CAL_DT, WEEK_BEG_DT from edw.test_cal_dt
 
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_lookup/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_lookup/query02.sql b/query/src/test/resources/query/sql_lookup/query02.sql
index bfc2beb..c1b45ff 100644
--- a/query/src/test/resources/query/sql_lookup/query02.sql
+++ b/query/src/test/resources/query/sql_lookup/query02.sql
@@ -1 +1,19 @@
-select CATEG_LVL3_NAME, CATEG_LVL2_NAME, SITE_ID, META_CATEG_NAME, LEAF_CATEG_ID  from test_category_groupings
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select CATEG_LVL3_NAME, CATEG_LVL2_NAME, SITE_ID, META_CATEG_NAME, LEAF_CATEG_ID  from test_category_groupings

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_lookup/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_lookup/query03.sql b/query/src/test/resources/query/sql_lookup/query03.sql
index c3ba6b3..64360db 100644
--- a/query/src/test/resources/query/sql_lookup/query03.sql
+++ b/query/src/test/resources/query/sql_lookup/query03.sql
@@ -1 +1,19 @@
-select SELLER_TYPE_DESC, SELLER_TYPE_CD from edw.test_seller_type_dim
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select SELLER_TYPE_DESC, SELLER_TYPE_CD from edw.test_seller_type_dim

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_lookup/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_lookup/query04.sql b/query/src/test/resources/query/sql_lookup/query04.sql
index 1c31efa..4000b95 100644
--- a/query/src/test/resources/query/sql_lookup/query04.sql
+++ b/query/src/test/resources/query/sql_lookup/query04.sql
@@ -1 +1,19 @@
-select SITE_NAME, SITE_ID from edw.test_sites
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select SITE_NAME, SITE_ID from edw.test_sites

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_optimize/enable-limit01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_optimize/enable-limit01.sql b/query/src/test/resources/query/sql_optimize/enable-limit01.sql
index a17869a..feae828 100644
--- a/query/src/test/resources/query/sql_optimize/enable-limit01.sql
+++ b/query/src/test/resources/query/sql_optimize/enable-limit01.sql
@@ -1 +1,19 @@
-select * from test_kylin_fact limit 10
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select * from test_kylin_fact limit 10

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_orderby/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_orderby/query01.sql b/query/src/test/resources/query/sql_orderby/query01.sql
index b3359e0..e528fb2 100644
--- a/query/src/test/resources/query/sql_orderby/query01.sql
+++ b/query/src/test/resources/query/sql_orderby/query01.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.Week_Beg_Dt, sum(price) as c1, count(1) as c2 
  from test_kylin_fact
  inner JOIN edw.test_cal_dt as test_cal_dt

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_orderby/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_orderby/query02.sql b/query/src/test/resources/query/sql_orderby/query02.sql
index 44485c5..c722eb2 100644
--- a/query/src/test/resources/query/sql_orderby/query02.sql
+++ b/query/src/test/resources/query/sql_orderby/query02.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, 
  sum(price) as GMV, 
  count(1) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_orderby/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_orderby/query03.sql b/query/src/test/resources/query/sql_orderby/query03.sql
index 4093650..aeaf9fd 100644
--- a/query/src/test/resources/query/sql_orderby/query03.sql
+++ b/query/src/test/resources/query/sql_orderby/query03.sql
@@ -1,6 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, 
  sum(price) as GMV, 
  count(1) as TRANS_CNT 
  from test_kylin_fact 
  group by lstg_format_name 
- order by sum(price)
\ No newline at end of file
+ order by sum(price)

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_subquery/query00.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query00.sql b/query/src/test/resources/query/sql_subquery/query00.sql
index 75503f0..322ec83 100644
--- a/query/src/test/resources/query/sql_subquery/query00.sql
+++ b/query/src/test/resources/query/sql_subquery/query00.sql
@@ -1,4 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price)  as sum_price, count(1) as cnt_1
  from test_kylin_fact
  inner join edw.test_cal_dt as test_cal_dt ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt 
- group by test_cal_dt.week_beg_dt 
\ No newline at end of file
+ group by test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_subquery/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query01.sql b/query/src/test/resources/query/sql_subquery/query01.sql
index 9d7a2a0..5cb6279 100644
--- a/query/src/test/resources/query/sql_subquery/query01.sql
+++ b/query/src/test/resources/query/sql_subquery/query01.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT sum(sum_price) AS "COL" 
  FROM ( 
  select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) as sum_price, count(1) as cnt_1
@@ -5,4 +23,4 @@ SELECT sum(sum_price) AS "COL"
  inner join edw.test_cal_dt as test_cal_dt ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt 
  group by test_cal_dt.week_beg_dt 
  ) "TableauSQL" 
- HAVING COUNT(1)>0 
\ No newline at end of file
+ HAVING COUNT(1)>0 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_subquery/query02.sql.disable
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query02.sql.disable b/query/src/test/resources/query/sql_subquery/query02.sql.disable
index 6e70b77..e590dcf 100644
--- a/query/src/test/resources/query/sql_subquery/query02.sql.disable
+++ b/query/src/test/resources/query/sql_subquery/query02.sql.disable
@@ -1,7 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT sum(1) AS "COL" 
  FROM ( 
  select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) as sum_price
  from test_kylin_fact 
  inner join test_cal_dt ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt 
  group by test_cal_dt.week_beg_dt 
- ) "TableauSQL" 
\ No newline at end of file
+ ) "TableauSQL" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_subquery/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query03.sql b/query/src/test/resources/query/sql_subquery/query03.sql
index 2f285ad..95157f0 100644
--- a/query/src/test/resources/query/sql_subquery/query03.sql
+++ b/query/src/test/resources/query/sql_subquery/query03.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select fact.cal_dt, sum(fact.price) as sum_price, count(1) as cnt_1
 from test_kylin_fact fact 
 left join edw.test_cal_dt cal on fact.cal_dt=cal.cal_dt
@@ -6,4 +24,4 @@ inner join
 	select test_kylin_fact.cal_dt, sum(test_kylin_fact.price) from test_kylin_fact left join edw.test_cal_dt test_cal_dt
 	on test_kylin_fact.cal_dt=test_cal_dt.cal_dt group by test_kylin_fact.cal_dt order by 2 desc limit 7
 ) cal_2 on fact.cal_dt = cal_2.cal_dt 
-group by fact.cal_dt
\ No newline at end of file
+group by fact.cal_dt

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_subquery/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query04.sql b/query/src/test/resources/query/sql_subquery/query04.sql
index 52fb10f..108a092 100644
--- a/query/src/test/resources/query/sql_subquery/query04.sql
+++ b/query/src/test/resources/query/sql_subquery/query04.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select fact.cal_dt, sum(fact.price) as sum_price, count(1) as cnt_1
 from test_kylin_fact fact 
 left join edw.test_cal_dt cal on fact.cal_dt=cal.cal_dt
@@ -6,4 +24,4 @@ inner join
 	select test_kylin_fact.cal_dt, max(test_kylin_fact.cal_dt) as mmm from test_kylin_fact left join edw.test_cal_dt test_cal_dt
 	on test_kylin_fact.cal_dt=test_cal_dt.cal_dt group by test_kylin_fact.cal_dt order by 2 desc limit 7
 ) cal_2 on fact.cal_dt = cal_2.mmm
-group by fact.cal_dt
\ No newline at end of file
+group by fact.cal_dt

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_subquery/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query05.sql b/query/src/test/resources/query/sql_subquery/query05.sql
index 91b15d9..da43f5c 100644
--- a/query/src/test/resources/query/sql_subquery/query05.sql
+++ b/query/src/test/resources/query/sql_subquery/query05.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT  SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" 
 	FROM "TEST_KYLIN_FACT"
     INNER JOIN "EDW"."TEST_CAL_DT" AS "TEST_CAL_DT" ON ("TEST_KYLIN_FACT"."CAL_DT" = "TEST_CAL_DT"."CAL_DT")
@@ -7,4 +25,4 @@ SELECT  SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok"
        "TEST_KYLIN_FACT"."CAL_DT" AS "none_CAL_DT_ok"   FROM "TEST_KYLIN_FACT"
          INNER JOIN "EDW"."TEST_CAL_DT" AS "TEST_CAL_DT" ON ("TEST_KYLIN_FACT"."CAL_DT" = "TEST_CAL_DT"."CAL_DT")
      GROUP BY "TEST_KYLIN_FACT"."CAL_DT"   ORDER BY 2 DESC   LIMIT 10  ) "t0" ON ("TEST_KYLIN_FACT"."CAL_DT" = "t0"."none_CAL_DT_ok") 
-    GROUP BY "TEST_KYLIN_FACT"."CAL_DT"
\ No newline at end of file
+    GROUP BY "TEST_KYLIN_FACT"."CAL_DT"

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_subquery/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query06.sql b/query/src/test/resources/query/sql_subquery/query06.sql
index 724eb2d..cac08e4 100644
--- a/query/src/test/resources/query/sql_subquery/query06.sql
+++ b/query/src/test/resources/query/sql_subquery/query06.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "TEST_KYLIN_FACT"."CAL_DT", SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" FROM "TEST_KYLIN_FACT" "TEST_KYLIN_FACT"
   INNER JOIN (
              SELECT COUNT(1) AS "XTableau_join_flag",     SUM("TEST_KYLIN_FACT"."PRICE") AS "X__alias__A",     "TEST_KYLIN_FACT"."CAL_DT" AS "none_CAL_DT_ok"   FROM "TEST_KYLIN_FACT" "TEST_KYLIN_FACT"

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_subquery/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query07.sql b/query/src/test/resources/query/sql_subquery/query07.sql
index 627e59b..d8c6024 100644
--- a/query/src/test/resources/query/sql_subquery/query07.sql
+++ b/query/src/test/resources/query/sql_subquery/query07.sql
@@ -1,6 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select cal_dt, sum(price) as sum_price
 from test_kylin_fact fact
 inner join (
 select count(1) as cnt, min(cal_dt) as "mmm",  cal_dt as dt from test_kylin_fact group by cal_dt order by 2 desc limit 10
 ) t0 on (fact.cal_dt = t0.dt) 
-group by cal_dt
\ No newline at end of file
+group by cal_dt

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query00.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query00.sql b/query/src/test/resources/query/sql_tableau/query00.sql
index a9f4642..c7a90de 100644
--- a/query/src/test/resources/query/sql_tableau/query00.sql
+++ b/query/src/test/resources/query/sql_tableau/query00.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) 
  from test_kylin_fact 
  inner join edw.test_cal_dt as test_cal_dt ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query01.sql b/query/src/test/resources/query/sql_tableau/query01.sql
index 0503355..b1ce79e 100644
--- a/query/src/test/resources/query/sql_tableau/query01.sql
+++ b/query/src/test/resources/query/sql_tableau/query01.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT SUM(1) AS "COL", 
  2 AS "COL2" 
  FROM ( 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query02.sql b/query/src/test/resources/query/sql_tableau/query02.sql
index efe6cef..fd642c0 100644
--- a/query/src/test/resources/query/sql_tableau/query02.sql
+++ b/query/src/test/resources/query/sql_tableau/query02.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT * 
  FROM ( 
  select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query03.sql b/query/src/test/resources/query/sql_tableau/query03.sql
index 02225f0..5dcd1c2 100644
--- a/query/src/test/resources/query/sql_tableau/query03.sql
+++ b/query/src/test/resources/query/sql_tableau/query03.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query04.sql b/query/src/test/resources/query/sql_tableau/query04.sql
index 0cd6f6e..290b0b5 100644
--- a/query/src/test/resources/query/sql_tableau/query04.sql
+++ b/query/src/test/resources/query/sql_tableau/query04.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "TableauSQL"."META_CATEG_NAME" AS "none_META_CATEG_NAME_nk" 
  FROM ( 
  SELECT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query05.sql b/query/src/test/resources/query/sql_tableau/query05.sql
index 40062f1..7622bc1 100644
--- a/query/src/test/resources/query/sql_tableau/query05.sql
+++ b/query/src/test/resources/query/sql_tableau/query05.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT SUM("TableauSQL"."GMV") AS "sum_GMV_ok", 
  SUM("TableauSQL"."TRANS_CNT") AS "sum_TRANS_CNT_ok" 
  FROM ( 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query06.sql b/query/src/test/resources/query/sql_tableau/query06.sql
index 40062f1..7622bc1 100644
--- a/query/src/test/resources/query/sql_tableau/query06.sql
+++ b/query/src/test/resources/query/sql_tableau/query06.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT SUM("TableauSQL"."GMV") AS "sum_GMV_ok", 
  SUM("TableauSQL"."TRANS_CNT") AS "sum_TRANS_CNT_ok" 
  FROM ( 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query07.sql b/query/src/test/resources/query/sql_tableau/query07.sql
index eda5533..e9fb06b 100644
--- a/query/src/test/resources/query/sql_tableau/query07.sql
+++ b/query/src/test/resources/query/sql_tableau/query07.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT SUM("TableauSQL"."GMV") AS "sum_GMV_ok", SUM("TableauSQL"."TRANS_CNT") AS "sum_TRANS_CNT_ok" 
  FROM ( 
  SELECT test_cal_dt.week_beg_dt ,test_category_groupings.meta_categ_name ,test_category_groupings.categ_lvl2_name ,test_category_groupings.categ_lvl3_name ,sum(test_kylin_fact.price) as GMV , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query08.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query08.sql.disabled b/query/src/test/resources/query/sql_tableau/query08.sql.disabled
index c5deb9c..be9c0c5 100644
--- a/query/src/test/resources/query/sql_tableau/query08.sql.disabled
+++ b/query/src/test/resources/query/sql_tableau/query08.sql.disabled
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 -- LEAF_CATEG_ID is a join field on fact table, but no on cuboid. We really support this?
 
 SELECT "TEST_KYLIN_FACT"."LEAF_CATEG_ID" AS "NONE_LEAF_CATEG_ID_OK"

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query09.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query09.sql.disabled b/query/src/test/resources/query/sql_tableau/query09.sql.disabled
index 5814c81..2113b2c 100644
--- a/query/src/test/resources/query/sql_tableau/query09.sql.disabled
+++ b/query/src/test/resources/query/sql_tableau/query09.sql.disabled
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "TEST_CATEGORY_GROUPINGS"."ADULT_CATEG_YN" AS "ADULT_CATEG_YN",
   "TEST_CATEGORY_GROUPINGS"."BSNS_VRTCL_NAME" AS "BSNS_VRTCL_NAME",
   "TEST_CATEGORY_GROUPINGS"."CATEG_BUSN_MGR" AS "CATEG_BUSN_MGR",

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query10.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query10.sql b/query/src/test/resources/query/sql_tableau/query10.sql
index 290fd57..3535185 100644
--- a/query/src/test/resources/query/sql_tableau/query10.sql
+++ b/query/src/test/resources/query/sql_tableau/query10.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "TEST_CAL_DT"."WEEK_BEG_DT" AS "none_WEEK_BEG_DT_nk", 
  SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" 
  FROM "TEST_KYLIN_FACT" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query11.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query11.sql b/query/src/test/resources/query/sql_tableau/query11.sql
index 3b649c8..621ef4a 100644
--- a/query/src/test/resources/query/sql_tableau/query11.sql
+++ b/query/src/test/resources/query/sql_tableau/query11.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT COUNT(1) AS cnt_ITEM_COUNT_ok, 
  TEST_CAL_DT.WEEK_BEG_DT AS none_WEEK_BEG_DT_nk 
  FROM "TEST_KYLIN_FACT" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query12.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query12.sql b/query/src/test/resources/query/sql_tableau/query12.sql
index 290fd57..3535185 100644
--- a/query/src/test/resources/query/sql_tableau/query12.sql
+++ b/query/src/test/resources/query/sql_tableau/query12.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "TEST_CAL_DT"."WEEK_BEG_DT" AS "none_WEEK_BEG_DT_nk", 
  SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" 
  FROM "TEST_KYLIN_FACT" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query13.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query13.sql b/query/src/test/resources/query/sql_tableau/query13.sql
index 7896269..3fc1fbf 100644
--- a/query/src/test/resources/query/sql_tableau/query13.sql
+++ b/query/src/test/resources/query/sql_tableau/query13.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT EXTRACT(YEAR FROM TEST_CAL_DT.WEEK_BEG_DT) AS yr_WEEK_BEG_DT_ok 
  FROM TEST_KYLIN_FACT 
  inner JOIN EDW.TEST_CAL_DT AS TEST_CAL_DT ON (TEST_KYLIN_FACT.CAL_DT = TEST_CAL_DT.CAL_DT) 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query14.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query14.sql b/query/src/test/resources/query/sql_tableau/query14.sql
index 6a2d9d8..0e4b6b7 100644
--- a/query/src/test/resources/query/sql_tableau/query14.sql
+++ b/query/src/test/resources/query/sql_tableau/query14.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT QUARTER("TEST_CAL_DT"."WEEK_BEG_DT") AS "qr_WEEK_BEG_DT_ok", EXTRACT(YEAR FROM "TEST_CAL_DT"."WEEK_BEG_DT") AS "yr_WEEK_BEG_DT_ok" FROM "TEST_KYLIN_FACT" inner JOIN "EDW"."TEST_CAL_DT" AS "TEST_CAL_DT"  ON ("TEST_KYLIN_FACT"."CAL_DT" = "TEST_CAL_DT"."CAL_DT") GROUP BY QUARTER("TEST_CAL_DT"."WEEK_BEG_DT"), EXTRACT(YEAR FROM "TEST_CAL_DT"."WEEK_BEG_DT") 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query15.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query15.sql b/query/src/test/resources/query/sql_tableau/query15.sql
index 23c324d..7dc052c 100644
--- a/query/src/test/resources/query/sql_tableau/query15.sql
+++ b/query/src/test/resources/query/sql_tableau/query15.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT QUARTER(TEST_CAL_DT.WEEK_BEG_DT) AS qr_WEEK_BEG_DT_ok 
  FROM TEST_KYLIN_FACT 
  inner JOIN EDW.TEST_CAL_DT AS TEST_CAL_DT  ON (TEST_KYLIN_FACT.CAL_DT = TEST_CAL_DT.CAL_DT) 


[29/39] incubator-kylin git commit: KYLIN-722 format local js

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/directives/directives.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/directives/directives.js b/webapp/app/js/directives/directives.js
index f30e8ae..346cd93 100644
--- a/webapp/app/js/directives/directives.js
+++ b/webapp/app/js/directives/directives.js
@@ -14,183 +14,183 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
 /* Directives */
 
 KylinApp.directive('kylinPagination', function ($parse, $q) {
-    return {
-        restrict: 'E',
-        scope: {},
-        templateUrl: 'partials/directives/pagination.html',
-        link: function (scope, element, attrs) {
-            var _this = this;
-            scope.limit = 15;
-            scope.hasMore = false;
-            scope.data = $parse(attrs.data)(scope.$parent);
-            scope.action = $parse(attrs.action)(scope.$parent);
-            scope.loadFunc = $parse(attrs.loadFunc)(scope.$parent);
-            scope.autoLoad = true;
-
-
-            scope.$watch("action.reload", function (newValue, oldValue) {
-                if (newValue != oldValue) {
-                    scope.reload();
-                }
-            });
-
-            var autoLoad = $parse(attrs.autoLoad)(scope.$parent);
-            if (autoLoad==false) {
-                scope.autoLoad = autoLoad;
-            }
-
-            scope.getLength = function (object) {
-                if (!object) {
-                    return 0;
-                }
-                if (Object.prototype.toString.call(object) === '[object Array]') {
-                    return object.length;
-                }
-                else {
-                    var size = 0, key;
-                    for (key in object) {
-                        if (object.hasOwnProperty(key) && key != 'reload') size++;
-                    }
-
-                    return size;
-                }
-            }
-
-            scope.reload = function () {
-                var length = scope.getLength(scope.data);
-                scope.loadFunc(0, scope.limit).then(function (dataLength) {
-                    scope.data = $parse(attrs.data)(scope.$parent);
-                    scope.hasMore = dataLength == scope.limit;
-
-                    return scope.data;
-                });
-            }
-
-            if (scope.autoLoad) {
-                scope.reload();
-            }
-
-            scope.loaded = true;
-            return scope.showMore = function () {
-                var loadPromise,
-                    _this = this;
-                scope.loaded = false;
-                var promises = [];
-                var length = scope.getLength(scope.data);
-                loadPromise = scope.loadFunc(length, scope.limit).then(function (dataLength) {
-                    scope.data = $parse(attrs.data)(scope.$parent);
-                    scope.hasMore = (dataLength == scope.limit);
-
-                    return scope.data;
-                });
-                promises.push(loadPromise);
-
-                return $q.all(promises).then(function () {
-                    return scope.loaded = true;
-                });
-            };
+  return {
+    restrict: 'E',
+    scope: {},
+    templateUrl: 'partials/directives/pagination.html',
+    link: function (scope, element, attrs) {
+      var _this = this;
+      scope.limit = 15;
+      scope.hasMore = false;
+      scope.data = $parse(attrs.data)(scope.$parent);
+      scope.action = $parse(attrs.action)(scope.$parent);
+      scope.loadFunc = $parse(attrs.loadFunc)(scope.$parent);
+      scope.autoLoad = true;
+
+
+      scope.$watch("action.reload", function (newValue, oldValue) {
+        if (newValue != oldValue) {
+          scope.reload();
         }
-    };
+      });
+
+      var autoLoad = $parse(attrs.autoLoad)(scope.$parent);
+      if (autoLoad == false) {
+        scope.autoLoad = autoLoad;
+      }
+
+      scope.getLength = function (object) {
+        if (!object) {
+          return 0;
+        }
+        if (Object.prototype.toString.call(object) === '[object Array]') {
+          return object.length;
+        }
+        else {
+          var size = 0, key;
+          for (key in object) {
+            if (object.hasOwnProperty(key) && key != 'reload') size++;
+          }
+
+          return size;
+        }
+      }
+
+      scope.reload = function () {
+        var length = scope.getLength(scope.data);
+        scope.loadFunc(0, scope.limit).then(function (dataLength) {
+          scope.data = $parse(attrs.data)(scope.$parent);
+          scope.hasMore = dataLength == scope.limit;
+
+          return scope.data;
+        });
+      }
+
+      if (scope.autoLoad) {
+        scope.reload();
+      }
+
+      scope.loaded = true;
+      return scope.showMore = function () {
+        var loadPromise,
+          _this = this;
+        scope.loaded = false;
+        var promises = [];
+        var length = scope.getLength(scope.data);
+        loadPromise = scope.loadFunc(length, scope.limit).then(function (dataLength) {
+          scope.data = $parse(attrs.data)(scope.$parent);
+          scope.hasMore = (dataLength == scope.limit);
+
+          return scope.data;
+        });
+        promises.push(loadPromise);
+
+        return $q.all(promises).then(function () {
+          return scope.loaded = true;
+        });
+      };
+    }
+  };
 })
-    .directive('loading', function ($parse, $q) {
-        return {
-            restrict: 'E',
-            scope: {},
-            templateUrl: 'partials/directives/loading.html',
-            link: function (scope, element, attrs) {
-                scope.text = (!!!attrs.text) ? 'Loading...' : attrs.text;
-            }
+  .directive('loading', function ($parse, $q) {
+    return {
+      restrict: 'E',
+      scope: {},
+      templateUrl: 'partials/directives/loading.html',
+      link: function (scope, element, attrs) {
+        scope.text = (!!!attrs.text) ? 'Loading...' : attrs.text;
+      }
+    };
+  })
+  .directive('noResult', function ($parse, $q) {
+    return {
+      scope: {},
+      templateUrl: 'partials/directives/noResult.html',
+      link: function (scope, element, attrs) {
+        scope.text = (!!!attrs.text) ? 'No Result.' : attrs.text;
+      }
+    };
+  })
+  .directive('typeahead', function ($timeout, $filter) {
+    return {
+      restrict: 'AEC',
+      scope: {
+        items: '=',
+        prompt: '@',
+        title: '@',
+        model: '=',
+        required: '@'
+      },
+      templateUrl: 'partials/directives/typeahead.html',
+      link: function (scope, elem, attrs) {
+        scope.current = null;
+        scope.selected = true; // hides the list initially
+
+        scope.handleSelection = function () {
+          scope.model = scope.current[scope.title];
+          scope.current = null;
+          scope.selected = true;
         };
-    })
-    .directive('noResult', function ($parse, $q) {
-        return {
-            scope: {},
-            templateUrl: 'partials/directives/noResult.html',
-            link: function (scope, element, attrs) {
-                scope.text = (!!!attrs.text) ? 'No Result.' : attrs.text;
-            }
+        scope.isCurrent = function (item) {
+          return scope.current == item;
         };
-    })
-    .directive('typeahead', function ($timeout, $filter) {
-        return {
-            restrict: 'AEC',
-            scope: {
-                items: '=',
-                prompt: '@',
-                title: '@',
-                model: '=',
-                required: '@'
-            },
-            templateUrl: 'partials/directives/typeahead.html',
-            link: function (scope, elem, attrs) {
-                scope.current = null;
-                scope.selected = true; // hides the list initially
-
-                scope.handleSelection = function () {
-                    scope.model = scope.current[scope.title];
-                    scope.current = null;
-                    scope.selected = true;
-                };
-                scope.isCurrent = function (item) {
-                    return scope.current == item;
-                };
-                scope.setCurrent = function (item) {
-                    scope.current = item;
-                };
-                scope.keyListener = function (event) {
-                    var list, idx;
-                    switch (event.keyCode) {
-                        case 13:
-                            scope.handleSelection();
-                            break;
-                        case 38:
-                            list = $filter('filter')(scope.items, {name: scope.model});
-                            scope.candidates = $filter('orderBy')(list, 'name');
-                            idx = scope.candidates.indexOf(scope.current);
-                            if (idx > 0) {
-                                scope.setCurrent(scope.candidates[idx - 1]);
-                            } else if (idx == 0) {
-                                scope.setCurrent(scope.candidates[scope.candidates.length - 1]);
-                            }
-                            break;
-                        case 40:
-                            list = $filter('filter')(scope.items, {name: scope.model});
-                            scope.candidates = $filter('orderBy')(list, 'name');
-                            idx = scope.candidates.indexOf(scope.current);
-                            if (idx < scope.candidates.length - 1) {
-                                scope.setCurrent(scope.candidates[idx + 1]);
-                            } else if (idx == scope.candidates.length - 1) {
-                                scope.setCurrent(scope.candidates[0]);
-                            }
-                            break;
-                        default:
-                            break;
-                    }
-                };
-
-            }
+        scope.setCurrent = function (item) {
+          scope.current = item;
         };
-    })
-    .directive('autoFillSync', function($timeout) {
-        return {
-            require: 'ngModel',
-            link: function(scope, elem, attrs, ngModel) {
-                var origVal = elem.val();
-                $timeout(function () {
-                    var newVal = elem.val();
-                    if(ngModel.$pristine && origVal !== newVal) {
-                        ngModel.$setViewValue(newVal);
-                    }
-                }, 500);
-            }
-        }
-    })
+        scope.keyListener = function (event) {
+          var list, idx;
+          switch (event.keyCode) {
+            case 13:
+              scope.handleSelection();
+              break;
+            case 38:
+              list = $filter('filter')(scope.items, {name: scope.model});
+              scope.candidates = $filter('orderBy')(list, 'name');
+              idx = scope.candidates.indexOf(scope.current);
+              if (idx > 0) {
+                scope.setCurrent(scope.candidates[idx - 1]);
+              } else if (idx == 0) {
+                scope.setCurrent(scope.candidates[scope.candidates.length - 1]);
+              }
+              break;
+            case 40:
+              list = $filter('filter')(scope.items, {name: scope.model});
+              scope.candidates = $filter('orderBy')(list, 'name');
+              idx = scope.candidates.indexOf(scope.current);
+              if (idx < scope.candidates.length - 1) {
+                scope.setCurrent(scope.candidates[idx + 1]);
+              } else if (idx == scope.candidates.length - 1) {
+                scope.setCurrent(scope.candidates[0]);
+              }
+              break;
+            default:
+              break;
+          }
+        };
+
+      }
+    };
+  })
+  .directive('autoFillSync', function ($timeout) {
+    return {
+      require: 'ngModel',
+      link: function (scope, elem, attrs, ngModel) {
+        var origVal = elem.val();
+        $timeout(function () {
+          var newVal = elem.val();
+          if (ngModel.$pristine && origVal !== newVal) {
+            ngModel.$setViewValue(newVal);
+          }
+        }, 500);
+      }
+    }
+  })
 
 ;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/factories/graph.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/factories/graph.js b/webapp/app/js/factories/graph.js
index 0ce25cc..e02e13a 100644
--- a/webapp/app/js/factories/graph.js
+++ b/webapp/app/js/factories/graph.js
@@ -14,64 +14,64 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.factory('GraphBuilder', function () {
-    var graphBuilder = {};
+  var graphBuilder = {};
 
-    graphBuilder.buildLineGraph = function (dimension, metrics, aggregatedData) {
-        var values = [];
-        angular.forEach(getSortedKeys(aggregatedData), function (sortedKey, index) {
-            values.push([(dimension.type == 'date') ? moment(sortedKey).unix() : sortedKey, aggregatedData[sortedKey]]);
-        });
+  graphBuilder.buildLineGraph = function (dimension, metrics, aggregatedData) {
+    var values = [];
+    angular.forEach(getSortedKeys(aggregatedData), function (sortedKey, index) {
+      values.push([(dimension.type == 'date') ? moment(sortedKey).unix() : sortedKey, aggregatedData[sortedKey]]);
+    });
 
-        var newGraph = [
-            {
-                "key": metrics.column.label,
-                "values": values
-            }
-        ];
+    var newGraph = [
+      {
+        "key": metrics.column.label,
+        "values": values
+      }
+    ];
 
-        return newGraph;
-    }
+    return newGraph;
+  }
 
-    graphBuilder.buildBarGraph = function (dimension, metrics, aggregatedData) {
-        var newGraph = [];
-        angular.forEach(getSortedKeys(aggregatedData), function (sortedKey, index) {
-            newGraph.push({
-                key: sortedKey,
-                values: [
-                    [sortedKey, aggregatedData[sortedKey]]
-                ]
-            });
-        });
+  graphBuilder.buildBarGraph = function (dimension, metrics, aggregatedData) {
+    var newGraph = [];
+    angular.forEach(getSortedKeys(aggregatedData), function (sortedKey, index) {
+      newGraph.push({
+        key: sortedKey,
+        values: [
+          [sortedKey, aggregatedData[sortedKey]]
+        ]
+      });
+    });
 
-        return newGraph;
-    }
+    return newGraph;
+  }
 
-    graphBuilder.buildPieGraph = function (dimension, metrics, aggregatedData) {
-        var newGraph = [];
-        angular.forEach(getSortedKeys(aggregatedData), function (sortedKey, index) {
-            newGraph.push({
-                key: sortedKey,
-                y: aggregatedData[sortedKey]
-            });
-        });
+  graphBuilder.buildPieGraph = function (dimension, metrics, aggregatedData) {
+    var newGraph = [];
+    angular.forEach(getSortedKeys(aggregatedData), function (sortedKey, index) {
+      newGraph.push({
+        key: sortedKey,
+        y: aggregatedData[sortedKey]
+      });
+    });
 
-        return newGraph;
-    }
+    return newGraph;
+  }
 
-    function getSortedKeys(results) {
-        var sortedKeys = [];
-        for (var k in results) {
-            if (results.hasOwnProperty(k)) {
-                sortedKeys.push(k);
-            }
-        }
-        sortedKeys.sort();
-
-        return sortedKeys;
+  function getSortedKeys(results) {
+    var sortedKeys = [];
+    for (var k in results) {
+      if (results.hasOwnProperty(k)) {
+        sortedKeys.push(k);
+      }
     }
+    sortedKeys.sort();
+
+    return sortedKeys;
+  }
 
-    return graphBuilder;
+  return graphBuilder;
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/filters/filter.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/filters/filter.js b/webapp/app/js/filters/filter.js
index 555e31d..7dff440 100755
--- a/webapp/app/js/filters/filter.js
+++ b/webapp/app/js/filters/filter.js
@@ -14,147 +14,149 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
 /* Filters */
 KylinApp
-    .filter('orderObjectBy', function () {
-        return function (input, attribute, reverse) {
-            if (!angular.isObject(input)) return input;
+  .filter('orderObjectBy', function () {
+    return function (input, attribute, reverse) {
+      if (!angular.isObject(input)) return input;
 
-            var array = [];
-            for (var objectKey in input) {
-                array.push(input[objectKey]);
-            }
+      var array = [];
+      for (var objectKey in input) {
+        array.push(input[objectKey]);
+      }
 
-            array.sort(function (a, b) {
-                if (!attribute)
-                {
-                    return 0;
-                }
-                var result = 0;
-                var attriOfA = a, attriOfB = b;
-                var temps = attribute.split(".");
-                if (temps.length > 1) {
-                    angular.forEach(temps, function (temp, index) {
-                        attriOfA = attriOfA[temp];
-                        attriOfB = attriOfB[temp];
-                    });
-                }
-                else {
-                    attriOfA = a[attribute];
-                    attriOfB = b[attribute];
-                }
-
-                if (!attriOfA) {
-                    result = -1;
-                }
-                else if (!attriOfB) {
-                    result = 1;
-                }
-                else {
-                    result = attriOfA > attriOfB ? 1 : attriOfA < attriOfB ? -1 : 0;
-                }
-                return reverse ? -result : result;
-            });
-            return array;
+      array.sort(function (a, b) {
+        if (!attribute) {
+          return 0;
         }
-    })
-
-    .filter('reverse', function () {
-        return function (items) {
-            if (items) {
-                return items.slice().reverse();
-            } else {
-                return items;
-            }
+        var result = 0;
+        var attriOfA = a, attriOfB = b;
+        var temps = attribute.split(".");
+        if (temps.length > 1) {
+          angular.forEach(temps, function (temp, index) {
+            attriOfA = attriOfA[temp];
+            attriOfB = attriOfB[temp];
+          });
         }
-    })
-    .filter('range', function () {
-        return function (input, total) {
-            total = parseInt(total);
-            for (var i = 0; i < total; i++)
-                input.push(i);
-            return input;
+        else {
+          attriOfA = a[attribute];
+          attriOfB = b[attribute];
         }
-    })
-    // Convert bytes into human readable format.
-    .filter('bytes', function() {
-        return function(bytes, precision) {
-            if (bytes === 0) { return '0 bytes' };
-            if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) {
-                return '-';
-            }
-
-            if (typeof precision === 'undefined') {
-                precision = 1;
-            }
 
-            var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'],
-                number = Math.floor(Math.log(bytes) / Math.log(1024));
-            return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) +  ' ' + units[number];
+        if (!attriOfA) {
+          result = -1;
         }
-    }).filter('resizePieHeight',function(){
-        return function(item){
-            if(item<150){
-                return 1300;
-            }
-            return 1300;
+        else if (!attriOfB) {
+          result = 1;
         }
-    }).filter('utcToConfigTimeZone',function($filter,kylinConfig){
+        else {
+          result = attriOfA > attriOfB ? 1 : attriOfA < attriOfB ? -1 : 0;
+        }
+        return reverse ? -result : result;
+      });
+      return array;
+    }
+  })
 
-        var gmttimezone;
-        //convert GMT+0 time to specified Timezone
-        return function(item,timezone,format){
+  .filter('reverse', function () {
+    return function (items) {
+      if (items) {
+        return items.slice().reverse();
+      } else {
+        return items;
+      }
+    }
+  })
+  .filter('range', function () {
+    return function (input, total) {
+      total = parseInt(total);
+      for (var i = 0; i < total; i++)
+        input.push(i);
+      return input;
+    }
+  })
+  // Convert bytes into human readable format.
+  .filter('bytes', function () {
+    return function (bytes, precision) {
+      if (bytes === 0) {
+        return '0 bytes'
+      }
+      ;
+      if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) {
+        return '-';
+      }
 
-            // undefined and 0 is not necessary to show
-            if(angular.isUndefined(item)||item===0){
-                return "";
-            }
+      if (typeof precision === 'undefined') {
+        precision = 1;
+      }
 
-            if(angular.isUndefined(timezone)||timezone===''){
-                timezone = kylinConfig.getTimeZone()==""?'PST':kylinConfig.getTimeZone();
-            }
-            if(angular.isUndefined(format)||format===''){
-                format ="yyyy-MM-dd HH:mm:ss";
-            }
+      var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'],
+        number = Math.floor(Math.log(bytes) / Math.log(1024));
+      return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number];
+    }
+  }).filter('resizePieHeight', function () {
+    return function (item) {
+      if (item < 150) {
+        return 1300;
+      }
+      return 1300;
+    }
+  }).filter('utcToConfigTimeZone', function ($filter, kylinConfig) {
 
-            //convert short name timezone to GMT
-            switch(timezone){
-                //convert PST to GMT
-                case "PST":
-                    gmttimezone= "GMT-8";
-                    break;
-                default:
-                    gmttimezone = timezone;
-            }
+    var gmttimezone;
+    //convert GMT+0 time to specified Timezone
+    return function (item, timezone, format) {
 
-            var localOffset = new Date().getTimezoneOffset();
-            var convertedMillis = item;
-            if(gmttimezone.indexOf("GMT+")!=-1){
-                var offset = gmttimezone.substr(4,1);
-                convertedMillis= item+offset*60*60000+localOffset*60000;
-            }
-            else if(gmttimezone.indexOf("GMT-")!=-1){
-                var offset = gmttimezone.substr(4,1);
-                convertedMillis= item-offset*60*60000+localOffset*60000;
-            }
-            else{
-                // return PST by default
-                timezone="PST";
-                convertedMillis = item-8*60*60000+localOffset*60000;
-            }
-            return $filter('date')(convertedMillis, format)+ " "+timezone;
+      // undefined and 0 is not necessary to show
+      if (angular.isUndefined(item) || item === 0) {
+        return "";
+      }
 
-        }
-    }).filter('reverseToGMT0',function($filter){
-        //backend store GMT+0 timezone ,by default front will show local,so convert to GMT+0 Date String format
-        return function(item) {
-            if(item||item==0){
-             item += new Date().getTimezoneOffset() * 60000;
-             return $filter('date')(item, "yyyy-MM-dd HH:mm:ss");
-            }
-        }
-    });
+      if (angular.isUndefined(timezone) || timezone === '') {
+        timezone = kylinConfig.getTimeZone() == "" ? 'PST' : kylinConfig.getTimeZone();
+      }
+      if (angular.isUndefined(format) || format === '') {
+        format = "yyyy-MM-dd HH:mm:ss";
+      }
+
+      //convert short name timezone to GMT
+      switch (timezone) {
+        //convert PST to GMT
+        case "PST":
+          gmttimezone = "GMT-8";
+          break;
+        default:
+          gmttimezone = timezone;
+      }
+
+      var localOffset = new Date().getTimezoneOffset();
+      var convertedMillis = item;
+      if (gmttimezone.indexOf("GMT+") != -1) {
+        var offset = gmttimezone.substr(4, 1);
+        convertedMillis = item + offset * 60 * 60000 + localOffset * 60000;
+      }
+      else if (gmttimezone.indexOf("GMT-") != -1) {
+        var offset = gmttimezone.substr(4, 1);
+        convertedMillis = item - offset * 60 * 60000 + localOffset * 60000;
+      }
+      else {
+        // return PST by default
+        timezone = "PST";
+        convertedMillis = item - 8 * 60 * 60000 + localOffset * 60000;
+      }
+      return $filter('date')(convertedMillis, format) + " " + timezone;
+
+    }
+  }).filter('reverseToGMT0', function ($filter) {
+    //backend store GMT+0 timezone ,by default front will show local,so convert to GMT+0 Date String format
+    return function (item) {
+      if (item || item == 0) {
+        item += new Date().getTimezoneOffset() * 60000;
+        return $filter('date')(item, "yyyy-MM-dd HH:mm:ss");
+      }
+    }
+  });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/listeners.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/listeners.js b/webapp/app/js/listeners.js
index 4524696..08a9bf9 100644
--- a/webapp/app/js/listeners.js
+++ b/webapp/app/js/listeners.js
@@ -14,82 +14,82 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
-KylinApp.run(function ($rootScope,$http, $location, UserService, AuthenticationService, MessageService,loadingRequest,SweetAlert) {
+KylinApp.run(function ($rootScope, $http, $location, UserService, AuthenticationService, MessageService, loadingRequest, SweetAlert) {
 
-    $rootScope.permissions = {
-        READ: {name: 'CUBE QUERY', value: 'READ', mask: 1},
-        MANAGEMENT: {name: 'CUBE EDIT', value: 'MANAGEMENT', mask: 32},
-        OPERATION: {name: 'CUBE OPERATION', value: 'OPERATION', mask: 64},
-        ADMINISTRATION: {name: 'CUBE ADMIN', value: 'ADMINISTRATION', mask: 16}
-    };
+  $rootScope.permissions = {
+    READ: {name: 'CUBE QUERY', value: 'READ', mask: 1},
+    MANAGEMENT: {name: 'CUBE EDIT', value: 'MANAGEMENT', mask: 32},
+    OPERATION: {name: 'CUBE OPERATION', value: 'OPERATION', mask: 64},
+    ADMINISTRATION: {name: 'CUBE ADMIN', value: 'ADMINISTRATION', mask: 16}
+  };
 
-    $rootScope.$on("$routeChangeStart", function () {
-        AuthenticationService.ping(function (data) {
-            UserService.setCurUser(data);
-        });
-
-        if ($location.url() == '' || $location.url() == '/') {
-            AuthenticationService.ping(function (data) {
-                UserService.setCurUser(data);
-                $location.path(UserService.getHomePage());
-            });
-            return;
-        }
-    });
-
-    /**
-     * Holds all the requests which failed due to 401 response.
-     */
-    $rootScope.requests401 = [];
-
-    $rootScope.$on('event:loginRequired', function () {
-        $rootScope.requests401 = [];
-        $location.path('/login');
-        loadingRequest.hide();
+  $rootScope.$on("$routeChangeStart", function () {
+    AuthenticationService.ping(function (data) {
+      UserService.setCurUser(data);
     });
 
-    /**
-     * On 'event:loginConfirmed', resend all the 401 requests.
-     */
-    $rootScope.$on('event:loginConfirmed', function () {
-        var i,
-            requests = $rootScope.requests401,
-            retry = function (req) {
-                $http(req.config).then(function (response) {
-                    req.deferred.resolve(response);
-                });
-            };
+    if ($location.url() == '' || $location.url() == '/') {
+      AuthenticationService.ping(function (data) {
+        UserService.setCurUser(data);
+        $location.path(UserService.getHomePage());
+      });
+      return;
+    }
+  });
 
-        for (i = 0; i < requests.length; i += 1) {
-            retry(requests[i]);
-        }
-        $rootScope.requests401 = [];
-    });
+  /**
+   * Holds all the requests which failed due to 401 response.
+   */
+  $rootScope.requests401 = [];
 
-    /**
-     * On 'logoutRequest' invoke logout on the server.
-     */
-    $rootScope.$on('event:logoutRequest', function () {
-        httpHeaders.common['Authorization'] = null;
-    });
+  $rootScope.$on('event:loginRequired', function () {
+    $rootScope.requests401 = [];
+    $location.path('/login');
+    loadingRequest.hide();
+  });
 
-    if ($location.url() == '' || $location.url() == '/') {
-        AuthenticationService.ping(function (data) {
-            UserService.setCurUser(data);
-            $location.path(UserService.getHomePage());
+  /**
+   * On 'event:loginConfirmed', resend all the 401 requests.
+   */
+  $rootScope.$on('event:loginConfirmed', function () {
+    var i,
+      requests = $rootScope.requests401,
+      retry = function (req) {
+        $http(req.config).then(function (response) {
+          req.deferred.resolve(response);
         });
-        return;
+      };
+
+    for (i = 0; i < requests.length; i += 1) {
+      retry(requests[i]);
     }
+    $rootScope.requests401 = [];
+  });
 
-    /**
-     * On 'event:forbidden', resend all the 403 requests.
-     */
-    $rootScope.$on('event:forbidden', function (event, message) {
-        var msg = !!(message) ? message : 'You don\' have right to take the action.';
-        SweetAlert.swal('Oops...', 'Permission Denied: ' + msg, 'error');
+  /**
+   * On 'logoutRequest' invoke logout on the server.
+   */
+  $rootScope.$on('event:logoutRequest', function () {
+    httpHeaders.common['Authorization'] = null;
+  });
 
+  if ($location.url() == '' || $location.url() == '/') {
+    AuthenticationService.ping(function (data) {
+      UserService.setCurUser(data);
+      $location.path(UserService.getHomePage());
     });
+    return;
+  }
+
+  /**
+   * On 'event:forbidden', resend all the 403 requests.
+   */
+  $rootScope.$on('event:forbidden', function (event, message) {
+    var msg = !!(message) ? message : 'You don\' have right to take the action.';
+    SweetAlert.swal('Oops...', 'Permission Denied: ' + msg, 'error');
+
+  });
 
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/model/cubeConfig.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/cubeConfig.js b/webapp/app/js/model/cubeConfig.js
index ecdd316..d284f00 100644
--- a/webapp/app/js/model/cubeConfig.js
+++ b/webapp/app/js/model/cubeConfig.js
@@ -1,74 +1,74 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-KylinApp.constant('cubeConfig', {
-
-    //~ Define metadata & class
-    measureParamType : ['column', 'constant'],
-    measureExpressions : ['SUM', 'MIN', 'MAX', 'COUNT', 'COUNT_DISTINCT'],
-    dimensionDataTypes : ["string", "tinyint", "int", "bigint", "date"],
-    cubeCapacities : ["SMALL", "MEDIUM","LARGE"],
-//    cubePartitionTypes : ['APPEND', 'UPDATE_INSERT'],
-    cubePartitionTypes : ['APPEND'],
-    joinTypes : [
-        {name: 'Left', value: 'left'},
-        {name: 'Inner', value: 'inner'},
-        {name: 'Right', value: 'right'}
-    ],
-    queryPriorities : [
-        {name: 'NORMAL', value: 50},
-        {name: 'LOW', value: 70},
-        {name: 'HIGH', value: 30}
-    ],
-    measureDataTypes : [
-        {name: 'INT', value: 'int'},
-        {name: 'BIGINT', value: 'bigint'},
-        {name: 'DECIMAL', value: 'decimal'},
-        {name: 'DOUBLE', value: 'double'},
-        {name: 'DATE', value: 'date'},
-        {name: 'STRING', value: 'string'}
-    ],
-    distinctDataTypes : [
-        {name: 'Error Rate < 9.75%', value: 'hllc10'},
-        {name: 'Error Rate < 4.88%', value: 'hllc12'},
-        {name: 'Error Rate < 2.44%', value: 'hllc14'},
-        {name: 'Error Rate < 1.72%', value: 'hllc15'},
-        {name: 'Error Rate < 1.22%', value: 'hllc16'}
-    ],
-    dftSelections : {
-        measureExpression: 'SUM',
-        measureParamType: 'column',
-        measureDataType: {name: 'BIGINT', value: 'bigint'},
-        distinctDataType: {name: 'Error Rate < 4.88%', value: 'hllc12'},
-        cubeCapacity: 'MEDIUM',
-        queryPriority: {name: 'NORMAL', value: 50},
-        cubePartitionType: 'APPEND'
-    },
-    dictionaries : ["true", "false"],
-
-//    cubes config
-    theaditems : [
-    {attr: 'name', name: 'Name'},
-    {attr: 'status', name: 'Status'},
-    {attr: 'size_kb', name: 'Cube Size'},
-    {attr: 'source_records_count', name: 'Source Records'},
-    {attr: 'last_build_time', name: 'Last Build Time'},
-    {attr: 'owner', name: 'Owner'},
-    {attr: 'create_time', name: 'Create Time'}
-     ]
-    });
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+KylinApp.constant('cubeConfig', {
+
+  //~ Define metadata & class
+  measureParamType: ['column', 'constant'],
+  measureExpressions: ['SUM', 'MIN', 'MAX', 'COUNT', 'COUNT_DISTINCT'],
+  dimensionDataTypes: ["string", "tinyint", "int", "bigint", "date"],
+  cubeCapacities: ["SMALL", "MEDIUM", "LARGE"],
+//    cubePartitionTypes : ['APPEND', 'UPDATE_INSERT'],
+  cubePartitionTypes: ['APPEND'],
+  joinTypes: [
+    {name: 'Left', value: 'left'},
+    {name: 'Inner', value: 'inner'},
+    {name: 'Right', value: 'right'}
+  ],
+  queryPriorities: [
+    {name: 'NORMAL', value: 50},
+    {name: 'LOW', value: 70},
+    {name: 'HIGH', value: 30}
+  ],
+  measureDataTypes: [
+    {name: 'INT', value: 'int'},
+    {name: 'BIGINT', value: 'bigint'},
+    {name: 'DECIMAL', value: 'decimal'},
+    {name: 'DOUBLE', value: 'double'},
+    {name: 'DATE', value: 'date'},
+    {name: 'STRING', value: 'string'}
+  ],
+  distinctDataTypes: [
+    {name: 'Error Rate < 9.75%', value: 'hllc10'},
+    {name: 'Error Rate < 4.88%', value: 'hllc12'},
+    {name: 'Error Rate < 2.44%', value: 'hllc14'},
+    {name: 'Error Rate < 1.72%', value: 'hllc15'},
+    {name: 'Error Rate < 1.22%', value: 'hllc16'}
+  ],
+  dftSelections: {
+    measureExpression: 'SUM',
+    measureParamType: 'column',
+    measureDataType: {name: 'BIGINT', value: 'bigint'},
+    distinctDataType: {name: 'Error Rate < 4.88%', value: 'hllc12'},
+    cubeCapacity: 'MEDIUM',
+    queryPriority: {name: 'NORMAL', value: 50},
+    cubePartitionType: 'APPEND'
+  },
+  dictionaries: ["true", "false"],
+
+//    cubes config
+  theaditems: [
+    {attr: 'name', name: 'Name'},
+    {attr: 'status', name: 'Status'},
+    {attr: 'size_kb', name: 'Cube Size'},
+    {attr: 'source_records_count', name: 'Source Records'},
+    {attr: 'last_build_time', name: 'Last Build Time'},
+    {attr: 'owner', name: 'Owner'},
+    {attr: 'create_time', name: 'Create Time'}
+  ]
+});

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/model/cubeDescModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/cubeDescModel.js b/webapp/app/js/model/cubeDescModel.js
index 773ce95..a8c827b 100644
--- a/webapp/app/js/model/cubeDescModel.js
+++ b/webapp/app/js/model/cubeDescModel.js
@@ -1,73 +1,74 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-KylinApp.service('CubeDescModel',function(){
-
-    this.cubeMetaFrame = {};
-
-    //
-    this.createNew = function () {
-            var cubeMeta = {
-                "name": "",
-                "description": "",
-                "dimensions": [],
-                "measures": [
-                    {   "id": 1,
-                        "name": "_COUNT_",
-                        "function": {
-                            "expression": "COUNT",
-                            "returntype": "bigint",
-                            "parameter": {
-                                "type": "constant",
-                                "value": "1"
-                            }
-                        }
-                    }
-                ],
-                "rowkey": {
-                    "rowkey_columns": [],
-                    "aggregation_groups": []
-                },
-                "notify_list": [],
-                "capacity": "",
-                "hbase_mapping": {
-                    "column_family": []
-                }
-            };
-
-            return cubeMeta;
-        };
-
-        this.createMeasure = function (){
-            var measure = {
-                "id": "",
-                "name": "",
-                "function": {
-                    "expression": "",
-                    "returntype": "",
-                    "parameter": {
-                        "type": "",
-                        "value": ""
-                    }
-                }
-            };
-
-            return measure;
-        }
-
-})
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+KylinApp.service('CubeDescModel', function () {
+
+  this.cubeMetaFrame = {};
+
+  //
+  this.createNew = function () {
+    var cubeMeta = {
+      "name": "",
+      "description": "",
+      "dimensions": [],
+      "measures": [
+        {
+          "id": 1,
+          "name": "_COUNT_",
+          "function": {
+            "expression": "COUNT",
+            "returntype": "bigint",
+            "parameter": {
+              "type": "constant",
+              "value": "1"
+            }
+          }
+        }
+      ],
+      "rowkey": {
+        "rowkey_columns": [],
+        "aggregation_groups": []
+      },
+      "notify_list": [],
+      "capacity": "",
+      "hbase_mapping": {
+        "column_family": []
+      }
+    };
+
+    return cubeMeta;
+  };
+
+  this.createMeasure = function () {
+    var measure = {
+      "id": "",
+      "name": "",
+      "function": {
+        "expression": "",
+        "returntype": "",
+        "parameter": {
+          "type": "",
+          "value": ""
+        }
+      }
+    };
+
+    return measure;
+  }
+
+})

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/model/cubeListModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/cubeListModel.js b/webapp/app/js/model/cubeListModel.js
index 3cd1b2b..d385c8b 100755
--- a/webapp/app/js/model/cubeListModel.js
+++ b/webapp/app/js/model/cubeListModel.js
@@ -14,52 +14,54 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
-KylinApp.service('CubeList',function(CubeService,$q){
-    var cubes=[];
-    var _this = this;
+KylinApp.service('CubeList', function (CubeService, $q) {
+  var cubes = [];
+  var _this = this;
 
-    this.list = function(queryParam){
+  this.list = function (queryParam) {
 
-        var defer = $q.defer();
-        CubeService.list(queryParam, function (_cubes) {
-            angular.forEach(_cubes, function (cube, index) {
-                if(cube.name){
+    var defer = $q.defer();
+    CubeService.list(queryParam, function (_cubes) {
+      angular.forEach(_cubes, function (cube, index) {
+        if (cube.name) {
 //                    $scope.listAccess(cube, 'CubeInstance');
-                    if (cube.segments && cube.segments.length > 0) {
-                        for(var i= cube.segments.length-1;i>=0;i--){
-                            if(cube.segments[i].status==="READY"){
-                                cube.last_build_time = cube.segments[i].last_build_time;
-                                break;
-                            }else if(i===0){
-                                cube.last_build_time = cube.create_time_utc;
-                            }
-                        }
-                    } else {
-                        cube.last_build_time = cube.create_time_utc;
-                    }
-                }
-            });
-            _cubes = _.filter(_cubes,function(cube){return cube.name!=undefined});
-            _this.cubes = _this.cubes.concat(_cubes);
-            defer.resolve(_this.cubes.length);
-        },function(){
-            defer.reject("Failed to load cubes");
-        });
-        return defer.promise;
+          if (cube.segments && cube.segments.length > 0) {
+            for (var i = cube.segments.length - 1; i >= 0; i--) {
+              if (cube.segments[i].status === "READY") {
+                cube.last_build_time = cube.segments[i].last_build_time;
+                break;
+              } else if (i === 0) {
+                cube.last_build_time = cube.create_time_utc;
+              }
+            }
+          } else {
+            cube.last_build_time = cube.create_time_utc;
+          }
+        }
+      });
+      _cubes = _.filter(_cubes, function (cube) {
+        return cube.name != undefined
+      });
+      _this.cubes = _this.cubes.concat(_cubes);
+      defer.resolve(_this.cubes.length);
+    }, function () {
+      defer.reject("Failed to load cubes");
+    });
+    return defer.promise;
 
-    };
+  };
 
-    this.removeCube = function(cube){
-        var cubeIndex = _this.cubes.indexOf(cube);
-        if (cubeIndex > -1) {
-            _this.cubes.splice(cubeIndex, 1);
-        }
+  this.removeCube = function (cube) {
+    var cubeIndex = _this.cubes.indexOf(cube);
+    if (cubeIndex > -1) {
+      _this.cubes.splice(cubeIndex, 1);
     }
+  }
 
-    this.removeAll = function(){
-        _this.cubes=[];
-    };
+  this.removeAll = function () {
+    _this.cubes = [];
+  };
 
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/model/cubesManager.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/cubesManager.js b/webapp/app/js/model/cubesManager.js
index 6ba303f..236d036 100644
--- a/webapp/app/js/model/cubesManager.js
+++ b/webapp/app/js/model/cubesManager.js
@@ -17,6 +17,6 @@
  */
 
 // TODO add cubes manager
-KylinApp.service('cubesManager',function(){
+KylinApp.service('cubesManager', function () {
 
 })

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/model/jobConfig.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/jobConfig.js b/webapp/app/js/model/jobConfig.js
index 0d59762..2e74845 100644
--- a/webapp/app/js/model/jobConfig.js
+++ b/webapp/app/js/model/jobConfig.js
@@ -14,23 +14,23 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.constant('jobConfig', {
-    allStatus : [
-        {name: 'NEW', value: 0},
-        {name: 'PENDING', value: 1},
-        {name: 'RUNNING', value: 2},
-        {name: 'FINISHED', value: 4},
-        {name: 'ERROR', value: 8},
-        {name: 'DISCARDED', value: 16}
-    ],
-    theaditems : [
-        {attr: 'name', name: 'Job Name'},
-        {attr: 'related_cube', name: 'Cube'},
-        {attr: 'progress', name: 'Progress'},
-        {attr: 'last_modified', name: 'Last Modified Time'},
-        {attr: 'duration', name: 'Duration'}
-    ]
+  allStatus: [
+    {name: 'NEW', value: 0},
+    {name: 'PENDING', value: 1},
+    {name: 'RUNNING', value: 2},
+    {name: 'FINISHED', value: 4},
+    {name: 'ERROR', value: 8},
+    {name: 'DISCARDED', value: 16}
+  ],
+  theaditems: [
+    {attr: 'name', name: 'Job Name'},
+    {attr: 'related_cube', name: 'Cube'},
+    {attr: 'progress', name: 'Progress'},
+    {attr: 'last_modified', name: 'Last Modified Time'},
+    {attr: 'duration', name: 'Duration'}
+  ]
 
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/model/jobListModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/jobListModel.js b/webapp/app/js/model/jobListModel.js
index 764791a..61c5cc3 100755
--- a/webapp/app/js/model/jobListModel.js
+++ b/webapp/app/js/model/jobListModel.js
@@ -14,37 +14,37 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
-
-KylinApp.service('JobList',function(JobService,$q){
-    var _this = this;
-    this.jobs=[];
-
-    this.list = function(jobRequest){
-
-        var defer = $q.defer();
-        JobService.list(jobRequest, function (jobs) {
-            angular.forEach(jobs, function (job) {
-                var id = job.uuid;
-                if (angular.isDefined(_this.jobs[id])) {
-                    if (job.last_modified != _this.jobs[id].last_modified) {
-                        _this.jobs[id] = job;
-                    } else {
-                    }
-                } else {
-                    _this.jobs[id] = job;
-                }
-            });
-
-            defer.resolve(jobs.length);
-        });
-
-        return defer.promise;
-
-    };
-
-    this.removeAll = function(){
-        _this.jobs=[];
-    };
+ */
+
+KylinApp.service('JobList', function (JobService, $q) {
+  var _this = this;
+  this.jobs = [];
+
+  this.list = function (jobRequest) {
+
+    var defer = $q.defer();
+    JobService.list(jobRequest, function (jobs) {
+      angular.forEach(jobs, function (job) {
+        var id = job.uuid;
+        if (angular.isDefined(_this.jobs[id])) {
+          if (job.last_modified != _this.jobs[id].last_modified) {
+            _this.jobs[id] = job;
+          } else {
+          }
+        } else {
+          _this.jobs[id] = job;
+        }
+      });
+
+      defer.resolve(jobs.length);
+    });
+
+    return defer.promise;
+
+  };
+
+  this.removeAll = function () {
+    _this.jobs = [];
+  };
 
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/model/metaModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/metaModel.js b/webapp/app/js/model/metaModel.js
index a21c83c..e63576c 100644
--- a/webapp/app/js/model/metaModel.js
+++ b/webapp/app/js/model/metaModel.js
@@ -1,84 +1,84 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-KylinApp.service('MetaModel',function(){
-
-    //data model when edit model
-    this.model={
-        name: null,
-        fact_table: null,
-        lookups: [],
-        filter_condition:null,
-        capacity:null,
-        "partition_desc" : {
-            "partition_date_column" : '',
-            "partition_date_start" : 0,
-            "partition_type" : 'APPEND'
-        },
-        last_modified:0
-    };
-
-    this.setMetaModel =function(model){
-        var _model = {};
-        _model.name = model.name;
-        _model.fact_table = model.fact_table;
-        _model.lookups =model.lookups;
-        _model.filter_condition = model.filter_condition;
-        _model.capacity = model.capacity;
-        _model.partition_desc = model.partition_desc;
-        _model.last_modified = model.last_modified;
-        this.model = _model;
-    };
-
-    this.initModel = function(){
-        this.model = this.createNew();
-    }
-
-    this.getMetaModel = function(){
-        return this.model;
-    };
-
-    this.setFactTable = function(fact_table) {
-        this.model.fact_table =fact_table;
-    };
-
-
-    this.converDateToGMT = function(){
-        if(this.model.partition_desc&&this.model.partition_desc.partition_date_start){
-            this.model.partition_desc.partition_date_start+=new Date().getTimezoneOffset()*60000;
-        }
-    };
-    //
-    this.createNew = function () {
-            var metaModel = {
-                name: '',
-                fact_table: '',
-                lookups: [],
-                filter_condition:'',
-                capacity:'MEDIUM',
-                "partition_desc" : {
-                    "partition_date_column" : '',
-                    "partition_date_start" : 0,
-                    "partition_type" : 'APPEND'
-                },
-                last_modified:0
-            };
-
-            return metaModel;
-        }
-})
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+KylinApp.service('MetaModel', function () {
+
+  //data model when edit model
+  this.model = {
+    name: null,
+    fact_table: null,
+    lookups: [],
+    filter_condition: null,
+    capacity: null,
+    "partition_desc": {
+      "partition_date_column": '',
+      "partition_date_start": 0,
+      "partition_type": 'APPEND'
+    },
+    last_modified: 0
+  };
+
+  this.setMetaModel = function (model) {
+    var _model = {};
+    _model.name = model.name;
+    _model.fact_table = model.fact_table;
+    _model.lookups = model.lookups;
+    _model.filter_condition = model.filter_condition;
+    _model.capacity = model.capacity;
+    _model.partition_desc = model.partition_desc;
+    _model.last_modified = model.last_modified;
+    this.model = _model;
+  };
+
+  this.initModel = function () {
+    this.model = this.createNew();
+  }
+
+  this.getMetaModel = function () {
+    return this.model;
+  };
+
+  this.setFactTable = function (fact_table) {
+    this.model.fact_table = fact_table;
+  };
+
+
+  this.converDateToGMT = function () {
+    if (this.model.partition_desc && this.model.partition_desc.partition_date_start) {
+      this.model.partition_desc.partition_date_start += new Date().getTimezoneOffset() * 60000;
+    }
+  };
+  //
+  this.createNew = function () {
+    var metaModel = {
+      name: '',
+      fact_table: '',
+      lookups: [],
+      filter_condition: '',
+      capacity: 'MEDIUM',
+      "partition_desc": {
+        "partition_date_column": '',
+        "partition_date_start": 0,
+        "partition_type": 'APPEND'
+      },
+      last_modified: 0
+    };
+
+    return metaModel;
+  }
+})

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/model/projectConfig.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/projectConfig.js b/webapp/app/js/model/projectConfig.js
index aba9909..270eb7a 100644
--- a/webapp/app/js/model/projectConfig.js
+++ b/webapp/app/js/model/projectConfig.js
@@ -14,14 +14,14 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.constant('projectConfig', {
-    theaditems : [
-        {attr: 'name', name: 'Name'},
-        {attr: 'owner', name: 'Owner'},
-        {attr: 'description', name: 'Description'},
-        {attr: 'create_time', name: 'Create Time'}
-    ]
+  theaditems: [
+    {attr: 'name', name: 'Name'},
+    {attr: 'owner', name: 'Owner'},
+    {attr: 'description', name: 'Description'},
+    {attr: 'create_time', name: 'Create Time'}
+  ]
 
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/model/projectModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/projectModel.js b/webapp/app/js/model/projectModel.js
index b0c05fe..7a94766 100644
--- a/webapp/app/js/model/projectModel.js
+++ b/webapp/app/js/model/projectModel.js
@@ -1,69 +1,71 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-KylinApp.service('ProjectModel',function(){
-
-    this.projects = [];
-    this.selectedProject =null;
-
-
-    this.setSelectedProject = function(project) {
-        if(this.projects.indexOf(project) > -1) {
-            this.selectedProject = project;
-        }
-    };
-    this.getSelectedProject = function(project) {
-         return this.selectedProject;
-    };
-
-    this.setProjects = function(projects){
-        if(projects.length){
-            this.projects = projects;
-        }
-    }
-
-    this.addProject = function(project){
-        this.projects.push(project);
-        this.sortProjects();
-    }
-
-    this.removeProject = function(project){
-        var index =this.projects.indexOf(project);
-        if(index>-1){
-            this.projects.splice(index,1);
-        }
-        this.selectedProject = this.projects[0];
-        this.sortProjects();
-    }
-
-    this.updateProject = function (_new,_old) {
-        var index =this.projects.indexOf(_old);
-        if(index>-1){
-            this.projects[index] = _new;
-        }
-    }
-
-    this.getProjects = function(){
-        return this.projects;
-    }
-
-    this.sortProjects = function (){
-        this.projects = _.sortBy(this.projects, function (i) { return i.toLowerCase(); });
-    }
-
-})
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+KylinApp.service('ProjectModel', function () {
+
+  this.projects = [];
+  this.selectedProject = null;
+
+
+  this.setSelectedProject = function (project) {
+    if (this.projects.indexOf(project) > -1) {
+      this.selectedProject = project;
+    }
+  };
+  this.getSelectedProject = function (project) {
+    return this.selectedProject;
+  };
+
+  this.setProjects = function (projects) {
+    if (projects.length) {
+      this.projects = projects;
+    }
+  }
+
+  this.addProject = function (project) {
+    this.projects.push(project);
+    this.sortProjects();
+  }
+
+  this.removeProject = function (project) {
+    var index = this.projects.indexOf(project);
+    if (index > -1) {
+      this.projects.splice(index, 1);
+    }
+    this.selectedProject = this.projects[0];
+    this.sortProjects();
+  }
+
+  this.updateProject = function (_new, _old) {
+    var index = this.projects.indexOf(_old);
+    if (index > -1) {
+      this.projects[index] = _new;
+    }
+  }
+
+  this.getProjects = function () {
+    return this.projects;
+  }
+
+  this.sortProjects = function () {
+    this.projects = _.sortBy(this.projects, function (i) {
+      return i.toLowerCase();
+    });
+  }
+
+})

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/model/tableConfig.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/tableConfig.js b/webapp/app/js/model/tableConfig.js
index 90f76aa..f994b09 100644
--- a/webapp/app/js/model/tableConfig.js
+++ b/webapp/app/js/model/tableConfig.js
@@ -14,14 +14,14 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.constant('tableConfig', {
-    theaditems : [
-        {attr: 'id', name: 'ID'},
-        {attr: 'name', name: 'Name'},
-        {attr: 'datatype', name: 'Data Type'},
-        {attr: 'cardinality', name: 'Cardinality'}
-    ]
+  theaditems: [
+    {attr: 'id', name: 'ID'},
+    {attr: 'name', name: 'Name'},
+    {attr: 'datatype', name: 'Data Type'},
+    {attr: 'cardinality', name: 'Cardinality'}
+  ]
 
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/model/tableModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/tableModel.js b/webapp/app/js/model/tableModel.js
index 687acb5..18967bb 100755
--- a/webapp/app/js/model/tableModel.js
+++ b/webapp/app/js/model/tableModel.js
@@ -14,112 +14,112 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
-KylinApp.service('TableModel', function(ProjectModel,$q,TableService) {
+KylinApp.service('TableModel', function (ProjectModel, $q, TableService) {
 
 
-    var _this = this;
-   //for tables in cubeDesigner
+  var _this = this;
+  //for tables in cubeDesigner
+  this.selectProjectTables = [];
+
+  this.initTables = function () {
     this.selectProjectTables = [];
+  }
 
-    this.initTables = function(){
-        this.selectProjectTables = [];
-    }
+  this.addTable = function (table) {
+    this.selectProjectTables.push(table);
+  }
 
-    this.addTable = function(table){
-        this.selectProjectTables.push(table);
-    }
-
-    this.setSelectedProjectTables = function(tables) {
-        this.selectProjectTables = tables;
-    }
+  this.setSelectedProjectTables = function (tables) {
+    this.selectProjectTables = tables;
+  }
 
 
   // for load table page
+  this.selectedSrcDb = [];
+  this.selectedSrcTable = {};
+
+  this.init = function () {
     this.selectedSrcDb = [];
     this.selectedSrcTable = {};
-
-    this.init = function(){
-      this.selectedSrcDb = [];
-      this.selectedSrcTable = {};
+  }
+
+
+  this.treeOptions = {
+    nodeChildren: "columns",
+    injectClasses: {
+      ul: "a1",
+      li: "a2",
+      liSelected: "a7",
+      iExpanded: "a3",
+      iCollapsed: "a4",
+      iLeaf: "a5",
+      label: "a6",
+      labelSelected: "a8"
     }
+  };
 
+  this.aceSrcTbLoaded = function (forceLoad) {
+    _this.selectedSrcDb = [];
 
-    this.treeOptions = {
-        nodeChildren: "columns",
-        injectClasses: {
-            ul: "a1",
-            li: "a2",
-            liSelected: "a7",
-            iExpanded: "a3",
-            iCollapsed: "a4",
-            iLeaf: "a5",
-            label: "a6",
-            labelSelected: "a8"
-        }
-    };
+    _this.selectedSrcTable = {};
+    var defer = $q.defer();
 
-    this.aceSrcTbLoaded = function (forceLoad) {
-        _this.selectedSrcDb = [];
-
-        _this.selectedSrcTable = {};
-        var defer = $q.defer();
+    var param = {
+      ext: true,
+      project: ProjectModel.selectedProject
+    };
 
-        var param = {
-            ext: true,
-            project:ProjectModel.selectedProject
-        };
+    if (!ProjectModel.selectedProject) {
+      defer.resolve();
+      return defer.promise;
+    }
 
-        if(!ProjectModel.selectedProject){
-            defer.resolve();
-            return defer.promise;
+    TableService.list(param, function (tables) {
+      var tableMap = [];
+      angular.forEach(tables, function (table) {
+        if (!tableMap[table.database]) {
+          tableMap[table.database] = [];
         }
-
-        TableService.list(param, function (tables) {
-            var tableMap = [];
-            angular.forEach(tables, function (table) {
-                if (!tableMap[table.database]) {
-                    tableMap[table.database] = [];
-                }
-                angular.forEach(table.columns, function (column) {
-                    if(table.cardinality[column.name]) {
-                        column.cardinality = table.cardinality[column.name];
-                    }else{
-                        column.cardinality = null;
-                    }
-                    column.id = parseInt(column.id);
-                });
-                tableMap[table.database].push(table);
-            });
+        angular.forEach(table.columns, function (column) {
+          if (table.cardinality[column.name]) {
+            column.cardinality = table.cardinality[column.name];
+          } else {
+            column.cardinality = null;
+          }
+          column.id = parseInt(column.id);
+        });
+        tableMap[table.database].push(table);
+      });
 
 //                Sort Table
-            for (var key in  tableMap) {
-                var obj = tableMap[key];
-                obj.sort(_this.innerSort);
-            }
-
-            _this.selectedSrcDb = [];
-            for (var key in  tableMap) {
-                var tables = tableMap[key];
-                _this.selectedSrcDb.push({
-                    "name": key,
-                    "columns": tables
-                });
-            }
-            defer.resolve();
+      for (var key in  tableMap) {
+        var obj = tableMap[key];
+        obj.sort(_this.innerSort);
+      }
+
+      _this.selectedSrcDb = [];
+      for (var key in  tableMap) {
+        var tables = tableMap[key];
+        _this.selectedSrcDb.push({
+          "name": key,
+          "columns": tables
         });
-
-        return defer.promise;
-    };
-    this.innerSort =function(a, b) {
-        var nameA = a.name.toLowerCase(), nameB = b.name.toLowerCase();
-        if (nameA < nameB) //sort string ascending
-            return -1;
-        if (nameA > nameB)
-            return 1;
-        return 0; //default return value (no sorting)
-    };
+      }
+      defer.resolve();
+    });
+
+    return defer.promise;
+  };
+  this.innerSort = function (a, b) {
+    var nameA = a.name.toLowerCase(), nameB = b.name.toLowerCase();
+    if (nameA < nameB) //sort string ascending
+      return -1;
+    if (nameA > nameB)
+      return 1;
+    return 0; //default return value (no sorting)
+  };
 
 });
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/access.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/access.js b/webapp/app/js/services/access.js
index cdb74f5..5dabaa4 100644
--- a/webapp/app/js/services/access.js
+++ b/webapp/app/js/services/access.js
@@ -14,13 +14,13 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.factory('AccessService', ['$resource', function ($resource, config) {
-    return $resource(Config.service.url + 'access/:type/:uuid', {}, {
-        list: {method: 'GET', params: {}, isArray: true},
-        grant: {method: 'POST', params: {}, isArray: true},
-        update: {method: 'PUT', params: {}, isArray: true},
-        revoke: {method: 'DELETE', params: {}, isArray: false}
-    });
+  return $resource(Config.service.url + 'access/:type/:uuid', {}, {
+    list: {method: 'GET', params: {}, isArray: true},
+    grant: {method: 'POST', params: {}, isArray: true},
+    update: {method: 'PUT', params: {}, isArray: true},
+    revoke: {method: 'DELETE', params: {}, isArray: false}
+  });
 }]);

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/admin.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/admin.js b/webapp/app/js/services/admin.js
index ac57bd1..47dce92 100644
--- a/webapp/app/js/services/admin.js
+++ b/webapp/app/js/services/admin.js
@@ -14,13 +14,13 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.factory('AdminService', ['$resource', function ($resource, config) {
-    return $resource(Config.service.url + 'admin/:action', {}, {
-        env: {method: 'GET', params: {action: 'env'}, isArray: false},
-        config: {method: 'GET', params: {action: 'config'}, isArray: false},
-        cleanStorage: {method: 'DELETE', params:{action: 'storage'}, isArray: false},
-        updateConfig: {method: 'PUT', params:{action: 'config'}, isArray:false}
-    });
+  return $resource(Config.service.url + 'admin/:action', {}, {
+    env: {method: 'GET', params: {action: 'env'}, isArray: false},
+    config: {method: 'GET', params: {action: 'config'}, isArray: false},
+    cleanStorage: {method: 'DELETE', params: {action: 'storage'}, isArray: false},
+    updateConfig: {method: 'PUT', params: {action: 'config'}, isArray: false}
+  });
 }]);

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/auth.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/auth.js b/webapp/app/js/services/auth.js
index b639c58..3970b0d 100644
--- a/webapp/app/js/services/auth.js
+++ b/webapp/app/js/services/auth.js
@@ -14,12 +14,12 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.factory('AuthenticationService', ['$resource', function ($resource, config) {
-    return $resource(Config.service.url + 'user/authentication/:action', {}, {
-        ping: {method: 'GET', params: {}, isArray: false},
-        login: {method: 'POST', params: {}, isArray: false},
-        authorities: {method: 'GET', params: {action: 'authorities'}, cache: true, isArray: false}
-    });
+  return $resource(Config.service.url + 'user/authentication/:action', {}, {
+    ping: {method: 'GET', params: {}, isArray: false},
+    login: {method: 'POST', params: {}, isArray: false},
+    authorities: {method: 'GET', params: {action: 'authorities'}, cache: true, isArray: false}
+  });
 }]);

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/cache.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/cache.js b/webapp/app/js/services/cache.js
index b8481c4..b61a179 100644
--- a/webapp/app/js/services/cache.js
+++ b/webapp/app/js/services/cache.js
@@ -14,10 +14,10 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.factory('CacheService', ['$resource', function ($resource, config) {
-    return $resource(Config.service.url + 'cache/:type/:name/:action', {}, {
-        clean: {method: 'PUT', params: {type:'all', name:'all', action: 'update'}, isArray: false}
-    });
+  return $resource(Config.service.url + 'cache/:type/:name/:action', {}, {
+    clean: {method: 'PUT', params: {type: 'all', name: 'all', action: 'update'}, isArray: false}
+  });
 }]);

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/cubeDesc.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/cubeDesc.js b/webapp/app/js/services/cubeDesc.js
index b101dae..09700c1 100644
--- a/webapp/app/js/services/cubeDesc.js
+++ b/webapp/app/js/services/cubeDesc.js
@@ -14,10 +14,10 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.factory('CubeDescService', ['$resource', function ($resource, config) {
-    return $resource(Config.service.url + 'cube_desc/:cube_name/:propName/:propValue/:action', {}, {
-        get: {method: 'GET', params: {}, isArray: true}
-    });
+  return $resource(Config.service.url + 'cube_desc/:cube_name/:propName/:propValue/:action', {}, {
+    get: {method: 'GET', params: {}, isArray: true}
+  });
 }])

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/cubes.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/cubes.js b/webapp/app/js/services/cubes.js
index d5782d2..3431c9a 100644
--- a/webapp/app/js/services/cubes.js
+++ b/webapp/app/js/services/cubes.js
@@ -14,22 +14,22 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.factory('CubeService', ['$resource', function ($resource, config) {
-    return $resource(Config.service.url + 'cubes/:cubeId/:propName/:propValue/:action', {}, {
-        list: {method: 'GET', params: {}, isArray: true},
-        getSql: {method: 'GET', params: {propName: 'segs', action: 'sql'}, isArray: false},
-        updateNotifyList: {method: 'PUT', params: {propName: 'notify_list'}, isArray: false},
-        cost: {method: 'PUT', params: {action: 'cost'}, isArray: false},
-        rebuildLookUp: {method: 'PUT', params: {propName: 'segs', action: 'refresh_lookup'}, isArray: false},
-        rebuildCube: {method: 'PUT', params: {action: 'rebuild'}, isArray: false},
-        disable: {method: 'PUT', params: {action: 'disable'}, isArray: false},
-        enable: {method: 'PUT', params: {action: 'enable'}, isArray: false},
-        purge: {method: 'PUT', params: {action: 'purge'}, isArray: false},
-        drop: {method: 'DELETE', params: {}, isArray: false},
-        save: {method: 'POST', params: {}, isArray: false},
-        update: {method: 'PUT', params: {}, isArray: false},
-        getHbaseInfo: {method: 'GET', params: {propName: 'hbase'}, isArray: true}
-    });
+  return $resource(Config.service.url + 'cubes/:cubeId/:propName/:propValue/:action', {}, {
+    list: {method: 'GET', params: {}, isArray: true},
+    getSql: {method: 'GET', params: {propName: 'segs', action: 'sql'}, isArray: false},
+    updateNotifyList: {method: 'PUT', params: {propName: 'notify_list'}, isArray: false},
+    cost: {method: 'PUT', params: {action: 'cost'}, isArray: false},
+    rebuildLookUp: {method: 'PUT', params: {propName: 'segs', action: 'refresh_lookup'}, isArray: false},
+    rebuildCube: {method: 'PUT', params: {action: 'rebuild'}, isArray: false},
+    disable: {method: 'PUT', params: {action: 'disable'}, isArray: false},
+    enable: {method: 'PUT', params: {action: 'enable'}, isArray: false},
+    purge: {method: 'PUT', params: {action: 'purge'}, isArray: false},
+    drop: {method: 'DELETE', params: {}, isArray: false},
+    save: {method: 'POST', params: {}, isArray: false},
+    update: {method: 'PUT', params: {}, isArray: false},
+    getHbaseInfo: {method: 'GET', params: {propName: 'hbase'}, isArray: true}
+  });
 }]);

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/graph.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/graph.js b/webapp/app/js/services/graph.js
index fb98ad1..b191c50 100644
--- a/webapp/app/js/services/graph.js
+++ b/webapp/app/js/services/graph.js
@@ -14,33 +14,33 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.service('GraphService', function (GraphBuilder) {
 
-    this.buildGraph = function (query) {
-        var graphData = null;
-        var dimension = query.graph.state.dimensions;
+  this.buildGraph = function (query) {
+    var graphData = null;
+    var dimension = query.graph.state.dimensions;
 
-        if (dimension && query.graph.type.dimension.types.indexOf(dimension.type) > -1) {
-            var metricsList = [];
-            metricsList = metricsList.concat(query.graph.state.metrics);
-            angular.forEach(metricsList, function (metrics, index) {
-                var aggregatedData = {};
-                angular.forEach(query.result.results, function (data, index) {
-                    aggregatedData[data[dimension.index]] = (!!aggregatedData[data[dimension.index]] ? aggregatedData[data[dimension.index]] : 0)
-                        + parseFloat(data[metrics.index].replace(/[^\d\.\-]/g, ""));
-                });
+    if (dimension && query.graph.type.dimension.types.indexOf(dimension.type) > -1) {
+      var metricsList = [];
+      metricsList = metricsList.concat(query.graph.state.metrics);
+      angular.forEach(metricsList, function (metrics, index) {
+        var aggregatedData = {};
+        angular.forEach(query.result.results, function (data, index) {
+          aggregatedData[data[dimension.index]] = (!!aggregatedData[data[dimension.index]] ? aggregatedData[data[dimension.index]] : 0)
+          + parseFloat(data[metrics.index].replace(/[^\d\.\-]/g, ""));
+        });
 
-                var newData = GraphBuilder["build" + capitaliseFirstLetter(query.graph.type.value) + "Graph"](dimension, metrics, aggregatedData);
-                graphData = (!!graphData) ? graphData.concat(newData) : newData;
-            });
-        }
-
-        return graphData;
+        var newData = GraphBuilder["build" + capitaliseFirstLetter(query.graph.type.value) + "Graph"](dimension, metrics, aggregatedData);
+        graphData = (!!graphData) ? graphData.concat(newData) : newData;
+      });
     }
 
-    function capitaliseFirstLetter(string) {
-        return string.charAt(0).toUpperCase() + string.slice(1);
-    }
+    return graphData;
+  }
+
+  function capitaliseFirstLetter(string) {
+    return string.charAt(0).toUpperCase() + string.slice(1);
+  }
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/jobs.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/jobs.js b/webapp/app/js/services/jobs.js
index 55d2248..c0f297b 100644
--- a/webapp/app/js/services/jobs.js
+++ b/webapp/app/js/services/jobs.js
@@ -14,14 +14,14 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 KylinApp.factory('JobService', ['$resource', function ($resource, config) {
-    return $resource(Config.service.url + 'jobs/:jobId/:propName/:propValue/:action', {}, {
-        list: {method: 'GET', params: {}, isArray: true},
-        get: {method: 'GET', params: {}, isArray: false},
-        stepOutput: {method: 'GET', params: {propName: 'steps', action: 'output'}, isArray: false},
-        resume: {method: 'PUT', params: {action: 'resume'}, isArray: false},
-        cancel: {method: 'PUT', params: {action: 'cancel'}, isArray: false}
-    });
+  return $resource(Config.service.url + 'jobs/:jobId/:propName/:propValue/:action', {}, {
+    list: {method: 'GET', params: {}, isArray: true},
+    get: {method: 'GET', params: {}, isArray: false},
+    stepOutput: {method: 'GET', params: {propName: 'steps', action: 'output'}, isArray: false},
+    resume: {method: 'PUT', params: {action: 'resume'}, isArray: false},
+    cancel: {method: 'PUT', params: {action: 'cancel'}, isArray: false}
+  });
 }]);

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/services/kylinProperties.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/services/kylinProperties.js b/webapp/app/js/services/kylinProperties.js
index 0f8129b..76b8087 100644
--- a/webapp/app/js/services/kylinProperties.js
+++ b/webapp/app/js/services/kylinProperties.js
@@ -1,78 +1,78 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-KylinApp.service('kylinConfig', function(AdminService,$log) {
-    var _config;
-    var timezone;
-    var deployEnv;
-
-
-    this.init = function (){
-       return AdminService.config({}, function(config){
-            _config = config.config;
-        },function(e){
-            $log.error("failed to load kylin.properties"+e);
-        });
-    };
-
-    this.getProperty = function(name){
-        var keyIndex = _config.indexOf(name);
-        var keyLength = name.length;
-        var partialResult = _config.substr(keyIndex);
-        var preValueIndex = partialResult.indexOf("=");
-        var sufValueIndex = partialResult.indexOf("\n");
-        return partialResult.substring(preValueIndex+1,sufValueIndex);
-
-    }
-
-    this.getTimeZone = function(){
-        if(!this.timezone){
-            this.timezone = this.getProperty("kylin.rest.timezone").trim();
-        }
-        return this.timezone;
-    }
-
-    this.getDeployEnv = function(){
-        if(!this.deployEnv){
-            this.deployEnv = this.getProperty("deploy.env").trim();
-        }
-        return this.deployEnv.toUpperCase();
-    }
-
-    //fill config info for Config from backend
-    this.initWebConfigInfo = function(){
-
-            try{
-                Config.reference_links.hadoop.link = this.getProperty("kylin.web.hadoop").trim();
-                Config.reference_links.diagnostic.link = this.getProperty("kylin.web.diagnostic").trim();
-                Config.contact_mail =  this.getProperty("kylin.web.contact_mail").trim();
-                var doc_length = this.getProperty("kylin.web.help.length").trim();
-                for(var i=0;i<doc_length;i++){
-                    var _doc = {};
-                    _doc.name = this.getProperty("kylin.web.help."+i).trim().split("|")[0];
-                    _doc.displayName = this.getProperty("kylin.web.help."+i).trim().split("|")[1];
-                    _doc.link = this.getProperty("kylin.web.help."+i).trim().split("|")[2];
-                    Config.documents.push(_doc);
-                }
-            }catch(e){
-                $log.error("failed to load kylin web info");
-            }
-    }
-
-});
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+KylinApp.service('kylinConfig', function (AdminService, $log) {
+  var _config;
+  var timezone;
+  var deployEnv;
+
+
+  this.init = function () {
+    return AdminService.config({}, function (config) {
+      _config = config.config;
+    }, function (e) {
+      $log.error("failed to load kylin.properties" + e);
+    });
+  };
+
+  this.getProperty = function (name) {
+    var keyIndex = _config.indexOf(name);
+    var keyLength = name.length;
+    var partialResult = _config.substr(keyIndex);
+    var preValueIndex = partialResult.indexOf("=");
+    var sufValueIndex = partialResult.indexOf("\n");
+    return partialResult.substring(preValueIndex + 1, sufValueIndex);
+
+  }
+
+  this.getTimeZone = function () {
+    if (!this.timezone) {
+      this.timezone = this.getProperty("kylin.rest.timezone").trim();
+    }
+    return this.timezone;
+  }
+
+  this.getDeployEnv = function () {
+    if (!this.deployEnv) {
+      this.deployEnv = this.getProperty("deploy.env").trim();
+    }
+    return this.deployEnv.toUpperCase();
+  }
+
+  //fill config info for Config from backend
+  this.initWebConfigInfo = function () {
+
+    try {
+      Config.reference_links.hadoop.link = this.getProperty("kylin.web.hadoop").trim();
+      Config.reference_links.diagnostic.link = this.getProperty("kylin.web.diagnostic").trim();
+      Config.contact_mail = this.getProperty("kylin.web.contact_mail").trim();
+      var doc_length = this.getProperty("kylin.web.help.length").trim();
+      for (var i = 0; i < doc_length; i++) {
+        var _doc = {};
+        _doc.name = this.getProperty("kylin.web.help." + i).trim().split("|")[0];
+        _doc.displayName = this.getProperty("kylin.web.help." + i).trim().split("|")[1];
+        _doc.link = this.getProperty("kylin.web.help." + i).trim().split("|")[2];
+        Config.documents.push(_doc);
+      }
+    } catch (e) {
+      $log.error("failed to load kylin web info");
+    }
+  }
+
+});
+


[12/39] incubator-kylin git commit: KYLIN-695

Posted by li...@apache.org.
KYLIN-695


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

Branch: refs/heads/staging
Commit: d4d7cefe3727dd4895fb4981bc69934ae9e3cd49
Parents: 325c275
Author: jiazhong <ji...@ebay.com>
Authored: Thu Apr 16 18:01:14 2015 +0800
Committer: jiazhong <ji...@ebay.com>
Committed: Thu Apr 16 18:01:14 2015 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubes.js   | 4 ++++
 webapp/app/partials/cubes/cubes.html | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/d4d7cefe/webapp/app/js/controllers/cubes.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubes.js b/webapp/app/js/controllers/cubes.js
index fce706a..6c23c5e 100755
--- a/webapp/app/js/controllers/cubes.js
+++ b/webapp/app/js/controllers/cubes.js
@@ -348,6 +348,10 @@ KylinApp
 
         };
 
+        $scope.cubeEdit = function(cube){
+            $location.path("cubes/edit/"+cube.name);
+        }
+
         $scope.startMerge = function (cube) {
             $scope.loadDetail(cube).then(function(){
               $modal.open({

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/d4d7cefe/webapp/app/partials/cubes/cubes.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubes/cubes.html b/webapp/app/partials/cubes/cubes.html
index 0a9676a..fbf0281 100644
--- a/webapp/app/partials/cubes/cubes.html
+++ b/webapp/app/partials/cubes/cubes.html
@@ -115,7 +115,7 @@
                         <li ng-if="cube.status=='DISABLED' && userService.hasRole('ROLE_ADMIN') ">
                             <a ng-click="dropCube(cube)" tooltip="Drop the cube, related jobs and data permanently.">Drop</a></li>
                         <li ng-if="cube.status=='DISABLED' && (userService.hasRole('ROLE_ADMIN') || hasPermission(cube, permissions.ADMINISTRATION.mask, permissions.MANAGEMENT.mask))">
-                            <a href="cubes/edit/{{cube.name}}">Edit</a></li>
+                            <a ng-click="cubeEdit(cube);">Edit</a></li>
                         <li><a ng-click="startJobSubmit(cube);">Build</a></li>
                         <li><a ng-click="startRefresh(cube)">Refresh</a></li>
                         <li><a ng-click="startMerge(cube)">Merge</a></li>


[26/39] incubator-kylin git commit: KYLIN-715

Posted by li...@apache.org.
KYLIN-715


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

Branch: refs/heads/staging
Commit: e1960f8388b0bccb81106b3eabf497738299ce39
Parents: 0f3c6ae
Author: qianhao.zhou <qi...@ebay.com>
Authored: Fri Apr 24 10:43:57 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Fri Apr 24 12:32:36 2015 +0800

----------------------------------------------------------------------
 examples/sample_cube/create_sample_tables.sql   |  32 +++---
 pom.xml                                         |   3 +
 query/src/test/resources/query/.gitignore       |   1 -
 query/src/test/resources/query/h2/query07.sql   |  18 ++++
 query/src/test/resources/query/h2/query09.sql   |  18 ++++
 query/src/test/resources/query/h2/query10.sql   |  18 ++++
 query/src/test/resources/query/sql/.gitignore   |  18 ++++
 query/src/test/resources/query/sql/query00.sql  |  18 ++++
 query/src/test/resources/query/sql/query01.sql  |  18 ++++
 query/src/test/resources/query/sql/query02.sql  |  18 ++++
 query/src/test/resources/query/sql/query03.sql  |  18 ++++
 query/src/test/resources/query/sql/query04.sql  |  18 ++++
 query/src/test/resources/query/sql/query05.sql  |  18 ++++
 query/src/test/resources/query/sql/query06.sql  |  18 ++++
 query/src/test/resources/query/sql/query07.sql  |  18 ++++
 query/src/test/resources/query/sql/query08.sql  |  18 ++++
 query/src/test/resources/query/sql/query09.sql  |  18 ++++
 query/src/test/resources/query/sql/query10.sql  |  18 ++++
 query/src/test/resources/query/sql/query11.sql  |  18 ++++
 query/src/test/resources/query/sql/query12.sql  |  18 ++++
 query/src/test/resources/query/sql/query13.sql  |  18 ++++
 query/src/test/resources/query/sql/query14.sql  |  18 ++++
 query/src/test/resources/query/sql/query15.sql  |  18 ++++
 query/src/test/resources/query/sql/query16.sql  |  18 ++++
 query/src/test/resources/query/sql/query17.sql  |  18 ++++
 query/src/test/resources/query/sql/query18.sql  |  18 ++++
 query/src/test/resources/query/sql/query19.sql  |  18 ++++
 query/src/test/resources/query/sql/query20.sql  |  18 ++++
 query/src/test/resources/query/sql/query21.sql  |  18 ++++
 query/src/test/resources/query/sql/query22.sql  |  18 ++++
 query/src/test/resources/query/sql/query23.sql  |  18 ++++
 query/src/test/resources/query/sql/query24.sql  |  18 ++++
 query/src/test/resources/query/sql/query25.sql  |  18 ++++
 query/src/test/resources/query/sql/query26.sql  |  18 ++++
 query/src/test/resources/query/sql/query27.sql  |  18 ++++
 query/src/test/resources/query/sql/query28.sql  |  18 ++++
 query/src/test/resources/query/sql/query29.sql  |  18 ++++
 query/src/test/resources/query/sql/query30.sql  |  18 ++++
 query/src/test/resources/query/sql/query31.sql  |  18 ++++
 query/src/test/resources/query/sql/query32.sql  |  18 ++++
 query/src/test/resources/query/sql/query33.sql  |  18 ++++
 query/src/test/resources/query/sql/query34.sql  |  18 ++++
 query/src/test/resources/query/sql/query35.sql  |  18 ++++
 query/src/test/resources/query/sql/query36.sql  |  18 ++++
 query/src/test/resources/query/sql/query37.sql  |  18 ++++
 query/src/test/resources/query/sql/query38.sql  |  18 ++++
 query/src/test/resources/query/sql/query39.sql  |  18 ++++
 query/src/test/resources/query/sql/query40.sql  |  18 ++++
 query/src/test/resources/query/sql/query41.sql  |  18 ++++
 query/src/test/resources/query/sql/query42.sql  |  18 ++++
 query/src/test/resources/query/sql/query43.sql  |  18 ++++
 query/src/test/resources/query/sql/query44.sql  |  18 ++++
 query/src/test/resources/query/sql/query45.sql  |  18 ++++
 query/src/test/resources/query/sql/query46.sql  |  20 +++-
 query/src/test/resources/query/sql/query47.sql  |  20 +++-
 query/src/test/resources/query/sql/query48.sql  |  20 +++-
 query/src/test/resources/query/sql/query49.sql  |  18 ++++
 query/src/test/resources/query/sql/query50.sql  |  18 ++++
 query/src/test/resources/query/sql/query51.sql  |  18 ++++
 query/src/test/resources/query/sql/query52.sql  |  18 ++++
 query/src/test/resources/query/sql/query53.sql  |  20 +++-
 query/src/test/resources/query/sql/query54.sql  |  18 ++++
 query/src/test/resources/query/sql/query55.sql  |  20 +++-
 query/src/test/resources/query/sql/query56.sql  |  20 +++-
 query/src/test/resources/query/sql/query57.sql  |  20 +++-
 query/src/test/resources/query/sql/query58.sql  |  20 +++-
 query/src/test/resources/query/sql/query59.sql  |  20 +++-
 query/src/test/resources/query/sql/query60.sql  |  20 +++-
 query/src/test/resources/query/sql/query61.sql  |  20 +++-
 query/src/test/resources/query/sql/query62.sql  |  20 +++-
 query/src/test/resources/query/sql/query63.sql  |  20 +++-
 query/src/test/resources/query/sql/query64.sql  |  20 +++-
 query/src/test/resources/query/sql/query65.sql  |  20 +++-
 query/src/test/resources/query/sql/query66.sql  |  20 +++-
 query/src/test/resources/query/sql/query67.sql  |  20 +++-
 query/src/test/resources/query/sql/query68.sql  |  20 +++-
 query/src/test/resources/query/sql/query69.sql  |  20 +++-
 query/src/test/resources/query/sql/query70.sql  |  18 ++++
 query/src/test/resources/query/sql/query71.sql  |  20 +++-
 query/src/test/resources/query/sql/query72.sql  |  20 +++-
 query/src/test/resources/query/sql/query73.sql  |  20 +++-
 query/src/test/resources/query/sql/query74.sql  |  20 +++-
 query/src/test/resources/query/sql/query75.sql  |  18 ++++
 query/src/test/resources/query/sql/query76.sql  |  18 ++++
 query/src/test/resources/query/sql/query77.sql  |  20 +++-
 query/src/test/resources/query/sql/query78.sql  |  18 ++++
 .../resources/query/sql_all_types/query00.sql   |  18 ++++
 .../resources/query/sql_all_types/query01.sql   |  18 ++++
 .../resources/query/sql_all_types/query02.sql   |  18 ++++
 .../resources/query/sql_all_types/query03.sql   |  18 ++++
 .../resources/query/sql_all_types/query04.sql   |  18 ++++
 .../resources/query/sql_all_types/query05.sql   |  18 ++++
 .../resources/query/sql_all_types/query06.sql   |  18 ++++
 .../resources/query/sql_all_types/query07.sql   |  18 ++++
 .../resources/query/sql_all_types/query08.sql   |  18 ++++
 .../resources/query/sql_all_types/query09.sql   |  18 ++++
 .../resources/query/sql_casewhen/query01.sql    |  20 +++-
 .../resources/query/sql_casewhen/query02.sql    |  20 +++-
 .../resources/query/sql_casewhen/query03.sql    |  20 +++-
 .../query/sql_casewhen/query55.sql.disable      |  20 +++-
 .../resources/query/sql_casewhen/query56.sql    |  20 +++-
 .../resources/query/sql_derived/query01.sql     |  18 ++++
 .../resources/query/sql_derived/query02.sql     |  18 ++++
 .../resources/query/sql_derived/query03.sql     |  18 ++++
 .../resources/query/sql_derived/query04.sql     |  18 ++++
 .../resources/query/sql_derived/query05.sql     |  18 ++++
 .../resources/query/sql_derived/query06.sql     |  18 ++++
 .../resources/query/sql_derived/query07.sql     |  18 ++++
 .../query/sql_derived/query08.sql.disabled      |  18 ++++
 .../resources/query/sql_derived/query09.sql     |  18 ++++
 .../resources/query/sql_derived/query10.sql     |  18 ++++
 .../resources/query/sql_distinct/query00.sql    |  18 ++++
 .../resources/query/sql_distinct/query01.sql    |  18 ++++
 .../resources/query/sql_distinct/query02.sql    |  18 ++++
 .../resources/query/sql_distinct/query03.sql    |  18 ++++
 .../resources/query/sql_distinct/query04.sql    |  18 ++++
 .../resources/query/sql_distinct/query05.sql    |  18 ++++
 .../resources/query/sql_distinct/query06.sql    |  18 ++++
 .../resources/query/sql_distinct/query07.sql    |  18 ++++
 .../resources/query/sql_dynamic/query01.dat     |  20 +++-
 .../resources/query/sql_dynamic/query01.sql     |  18 ++++
 .../resources/query/sql_dynamic/query02.dat     |  20 +++-
 .../resources/query/sql_dynamic/query02.sql     |  18 ++++
 .../resources/query/sql_fast_common/query00.sql |  20 +++-
 .../test/resources/query/sql_hive/query01.sql   |  18 ++++
 .../test/resources/query/sql_hive/query10.sql   |  18 ++++
 .../src/test/resources/query/sql_ii/query01.sql |  20 +++-
 .../src/test/resources/query/sql_ii/query02.sql |  20 +++-
 .../src/test/resources/query/sql_ii/query03.sql |  20 +++-
 .../src/test/resources/query/sql_ii/query04.sql |  20 +++-
 .../src/test/resources/query/sql_ii/query05.sql |  20 +++-
 .../resources/query/sql_ii/query06.sql.disabled |  20 +++-
 .../resources/query/sql_ii/query07.sql.disabled |  20 +++-
 .../src/test/resources/query/sql_ii/query08.sql |  20 +++-
 .../src/test/resources/query/sql_ii/query09.sql |  20 +++-
 .../query/sql_invalid/query29_invalid_SQL.sql   |  18 ++++
 .../query/sql_invalid/query30_invalid_SQL.sql   |  18 ++++
 .../query/sql_invalid/query31_invalid_SQL.sql   |  18 ++++
 .../query/sql_invalid/query32_invalid_SQL.sql   |  18 ++++
 .../query/sql_invalid/query33_invalid_SQL.sql   |  18 ++++
 .../query/sql_invalid/query34_invalid_SQL.sql   |  18 ++++
 ...ery_count_distinct_on_dimension.sql.disabled |  20 +++-
 .../test/resources/query/sql_lookup/query01.sql |  18 ++++
 .../test/resources/query/sql_lookup/query02.sql |  20 +++-
 .../test/resources/query/sql_lookup/query03.sql |  20 +++-
 .../test/resources/query/sql_lookup/query04.sql |  20 +++-
 .../query/sql_optimize/enable-limit01.sql       |  20 +++-
 .../resources/query/sql_orderby/query01.sql     |  18 ++++
 .../resources/query/sql_orderby/query02.sql     |  18 ++++
 .../resources/query/sql_orderby/query03.sql     |  20 +++-
 .../resources/query/sql_subquery/query00.sql    |  20 +++-
 .../resources/query/sql_subquery/query01.sql    |  20 +++-
 .../query/sql_subquery/query02.sql.disable      |  20 +++-
 .../resources/query/sql_subquery/query03.sql    |  20 +++-
 .../resources/query/sql_subquery/query04.sql    |  20 +++-
 .../resources/query/sql_subquery/query05.sql    |  20 +++-
 .../resources/query/sql_subquery/query06.sql    |  18 ++++
 .../resources/query/sql_subquery/query07.sql    |  20 +++-
 .../resources/query/sql_tableau/query00.sql     |  18 ++++
 .../resources/query/sql_tableau/query01.sql     |  18 ++++
 .../resources/query/sql_tableau/query02.sql     |  18 ++++
 .../resources/query/sql_tableau/query03.sql     |  18 ++++
 .../resources/query/sql_tableau/query04.sql     |  18 ++++
 .../resources/query/sql_tableau/query05.sql     |  18 ++++
 .../resources/query/sql_tableau/query06.sql     |  18 ++++
 .../resources/query/sql_tableau/query07.sql     |  18 ++++
 .../query/sql_tableau/query08.sql.disabled      |  18 ++++
 .../query/sql_tableau/query09.sql.disabled      |  18 ++++
 .../resources/query/sql_tableau/query10.sql     |  18 ++++
 .../resources/query/sql_tableau/query11.sql     |  18 ++++
 .../resources/query/sql_tableau/query12.sql     |  18 ++++
 .../resources/query/sql_tableau/query13.sql     |  18 ++++
 .../resources/query/sql_tableau/query14.sql     |  18 ++++
 .../resources/query/sql_tableau/query15.sql     |  18 ++++
 .../resources/query/sql_tableau/query16.sql     |  18 ++++
 .../resources/query/sql_tableau/query17.sql     |  18 ++++
 .../resources/query/sql_tableau/query18.sql     |  18 ++++
 .../resources/query/sql_tableau/query19.sql     |  18 ++++
 .../resources/query/sql_tableau/query20.sql     |  18 ++++
 .../resources/query/sql_tableau/query21.sql     |  18 ++++
 .../query/sql_tableau/query22.sql.disabled      |  20 +++-
 .../resources/query/sql_tableau/query23.sql     |  20 +++-
 .../resources/query/sql_tableau/query24.sql     |  20 +++-
 .../resources/query/sql_tableau/query25.sql     |  20 +++-
 .../resources/query/sql_tableau/query27.sql     |  18 ++++
 .../resources/query/sql_tableau/query67.sql     |  20 +++-
 .../resources/query/sql_verifyCount/query04.sql |  18 ++++
 .../query/sql_verifyCount/query04.sql.expected  |  20 +++-
 .../resources/query/sql_verifyCount/query05.sql |  18 ++++
 .../query/sql_verifyCount/query05.sql.expected  |  20 +++-
 .../resources/query/sql_verifyCount/query06.sql |  18 ++++
 .../query/sql_verifyCount/query06.sql.expected  |  20 +++-
 .../resources/query/sql_verifyCount/query07.sql |  18 ++++
 .../query/sql_verifyCount/query07.sql.expected  |  20 +++-
 .../resources/query/tableau_probing/query01.sql |  18 ++++
 .../resources/query/tableau_probing/query02.sql |  18 ++++
 .../resources/query/tableau_probing/query03.sql |  18 ++++
 .../resources/query/tableau_probing/query04.sql |  18 ++++
 .../resources/query/tableau_probing/query05.sql |  18 ++++
 .../resources/query/tableau_probing/query06.sql |  18 ++++
 .../resources/query/tableau_probing/query07.sql |  18 ++++
 webapp/app/css/AdminLTE-fonts.css               |  24 ++---
 webapp/app/css/AdminLTE.css                     |  39 ++-----
 webapp/template/nginx_default.conf              |  95 -----------------
 webapp/validate-commit-msg.js                   | 106 -------------------
 205 files changed, 3665 insertions(+), 325 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/examples/sample_cube/create_sample_tables.sql
----------------------------------------------------------------------
diff --git a/examples/sample_cube/create_sample_tables.sql b/examples/sample_cube/create_sample_tables.sql
index 8cd8738..d4ebb6a 100644
--- a/examples/sample_cube/create_sample_tables.sql
+++ b/examples/sample_cube/create_sample_tables.sql
@@ -1,18 +1,20 @@
---Licensed to the Apache Software Foundation (ASF) under one
---or more contributor license agreements.  See the NOTICE file
---distributed with this work for additional information
---regarding copyright ownership.  The ASF licenses this file
---to you under the Apache License, Version 2.0 (the
---"License"); you may not use this file except in compliance
---with the License.  You may obtain a copy of the License at
--- 
---   http://www.apache.org/licenses/LICENSE-2.0
--- 
---Unless required by applicable law or agreed to in writing, software
---distributed under the License is distributed on an "AS IS" BASIS,
---WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
---See the License for the specific language governing permissions and
---limitations under the License.
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
 
 DROP TABLE IF EXISTS DEFAULT.KYLIN_CAL_DT;
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5b09e15..e294fc8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -674,6 +674,9 @@
                                 <!-- Temp -->
                                 <exclude>webapp/template/nginx_default.conf</exclude>
                                 <exclude>webapp/validate-commit-msg.js</exclude>
+                                <!-- json configuration file-->
+                                <exclude>webapp/.bowerrc</exclude>
+                                <exclude>webapp/.jshintrc</exclude>
                             </excludes>
                         </configuration>
                         <executions>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/.gitignore
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/.gitignore b/query/src/test/resources/query/.gitignore
deleted file mode 100644
index cb98934..0000000
--- a/query/src/test/resources/query/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/sample.sql

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/h2/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/h2/query07.sql b/query/src/test/resources/query/h2/query07.sql
index 5841f5f..e1403c4 100644
--- a/query/src/test/resources/query/h2/query07.sql
+++ b/query/src/test/resources/query/h2/query07.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select count(*) from ( select test_kylin_fact.lstg_format_name from test_kylin_fact 
  where test_kylin_fact.lstg_format_name='FP-GTC' 
  group by test_kylin_fact.lstg_format_name ) t 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/h2/query09.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/h2/query09.sql b/query/src/test/resources/query/h2/query09.sql
index afd186b..9605c8f 100644
--- a/query/src/test/resources/query/h2/query09.sql
+++ b/query/src/test/resources/query/h2/query09.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select count(*) from (select test_cal_dt.week_beg_dt 
  from test_kylin_fact 
  inner JOIN edw.test_cal_dt as test_cal_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/h2/query10.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/h2/query10.sql b/query/src/test/resources/query/h2/query10.sql
index 1c642d6..32f319c 100644
--- a/query/src/test/resources/query/h2/query10.sql
+++ b/query/src/test/resources/query/h2/query10.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.week_beg_dt 
  from test_kylin_fact 
  inner JOIN edw.test_cal_dt as test_cal_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/.gitignore
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/.gitignore b/query/src/test/resources/query/sql/.gitignore
index 0daace0..d05e0f8 100644
--- a/query/src/test/resources/query/sql/.gitignore
+++ b/query/src/test/resources/query/sql/.gitignore
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 /sample.txt
 /0000.sql

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query00.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query00.sql b/query/src/test/resources/query/sql/query00.sql
index 40c247d..ad07bd0 100644
--- a/query/src/test/resources/query/sql/query00.sql
+++ b/query/src/test/resources/query/sql/query00.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 
  where lstg_format_name='FP-GTC' 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query01.sql b/query/src/test/resources/query/sql/query01.sql
index 52a2fcf..4b57536 100644
--- a/query/src/test/resources/query/sql/query01.sql
+++ b/query/src/test/resources/query/sql/query01.sql
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select LSTG_FORMAT_NAME, sum(price) as GMV, count(1) as TRANS_CNT from test_kylin_fact 
  group by LSTG_FORMAT_NAME 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query02.sql b/query/src/test/resources/query/sql/query02.sql
index c2baad0..286cb04 100644
--- a/query/src/test/resources/query/sql/query02.sql
+++ b/query/src/test/resources/query/sql/query02.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select sum(price) as GMV, count(1) as TRANS_CNT from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query03.sql b/query/src/test/resources/query/sql/query03.sql
index 0db8288..f357cf4 100644
--- a/query/src/test/resources/query/sql/query03.sql
+++ b/query/src/test/resources/query/sql/query03.sql
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name, sum(price) as GMV, count(*) as TRANS_CNT from test_kylin_fact 
  group by test_kylin_fact.lstg_format_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query04.sql b/query/src/test/resources/query/sql/query04.sql
index d7accd9..b515487 100644
--- a/query/src/test/resources/query/sql/query04.sql
+++ b/query/src/test/resources/query/sql/query04.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT from test_kylin_fact 
  group by test_kylin_fact.lstg_format_name having sum(price)>5000 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query05.sql b/query/src/test/resources/query/sql/query05.sql
index 711fc5e..283dcd6 100644
--- a/query/src/test/resources/query/sql/query05.sql
+++ b/query/src/test/resources/query/sql/query05.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT from test_kylin_fact 
  where test_kylin_fact.lstg_format_name is null 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query06.sql b/query/src/test/resources/query/sql/query06.sql
index 486cd23..76cfb24 100644
--- a/query/src/test/resources/query/sql/query06.sql
+++ b/query/src/test/resources/query/sql/query06.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT from test_kylin_fact 
  where test_kylin_fact.lstg_format_name is not null 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query07.sql b/query/src/test/resources/query/sql/query07.sql
index e399a0a..17b90e5 100644
--- a/query/src/test/resources/query/sql/query07.sql
+++ b/query/src/test/resources/query/sql/query07.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT from test_kylin_fact 
  where test_kylin_fact.lstg_format_name='FP-GTC' 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query08.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query08.sql b/query/src/test/resources/query/sql/query08.sql
index bc4fd53..9be452d 100644
--- a/query/src/test/resources/query/sql/query08.sql
+++ b/query/src/test/resources/query/sql/query08.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT from test_kylin_fact 
  where test_kylin_fact.lstg_format_name='FP-GTC' 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query09.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query09.sql b/query/src/test/resources/query/sql/query09.sql
index e83e5d1..c30b19a 100644
--- a/query/src/test/resources/query/sql/query09.sql
+++ b/query/src/test/resources/query/sql/query09.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.week_beg_dt, count(*) as TRANS_CNT 
  from test_kylin_fact 
  inner JOIN edw.test_cal_dt as test_cal_dt  

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query10.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query10.sql b/query/src/test/resources/query/sql/query10.sql
index b3ec288..cc3f303 100644
--- a/query/src/test/resources/query/sql/query10.sql
+++ b/query/src/test/resources/query/sql/query10.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query11.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query11.sql b/query/src/test/resources/query/sql/query11.sql
index 548e58d..864e3ea 100644
--- a/query/src/test/resources/query/sql/query11.sql
+++ b/query/src/test/resources/query/sql/query11.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query12.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query12.sql b/query/src/test/resources/query/sql/query12.sql
index 38bafef..8f07802 100644
--- a/query/src/test/resources/query/sql/query12.sql
+++ b/query/src/test/resources/query/sql/query12.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query13.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query13.sql b/query/src/test/resources/query/sql/query13.sql
index ce50679..254af37 100644
--- a/query/src/test/resources/query/sql/query13.sql
+++ b/query/src/test/resources/query/sql/query13.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT from test_kylin_fact 
  inner JOIN edw.test_cal_dt as test_cal_dt  

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query14.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query14.sql b/query/src/test/resources/query/sql/query14.sql
index 4e6f713..0738290 100644
--- a/query/src/test/resources/query/sql/query14.sql
+++ b/query/src/test/resources/query/sql/query14.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query15.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query15.sql b/query/src/test/resources/query/sql/query15.sql
index 50233cc..39119fe 100644
--- a/query/src/test/resources/query/sql/query15.sql
+++ b/query/src/test/resources/query/sql/query15.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query16.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query16.sql b/query/src/test/resources/query/sql/query16.sql
index e124252..c25b763 100644
--- a/query/src/test/resources/query/sql/query16.sql
+++ b/query/src/test/resources/query/sql/query16.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query17.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query17.sql b/query/src/test/resources/query/sql/query17.sql
index 4cf5436..68f626f 100644
--- a/query/src/test/resources/query/sql/query17.sql
+++ b/query/src/test/resources/query/sql/query17.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query18.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query18.sql b/query/src/test/resources/query/sql/query18.sql
index b570757..436924a 100644
--- a/query/src/test/resources/query/sql/query18.sql
+++ b/query/src/test/resources/query/sql/query18.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query19.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query19.sql b/query/src/test/resources/query/sql/query19.sql
index 4cf5436..68f626f 100644
--- a/query/src/test/resources/query/sql/query19.sql
+++ b/query/src/test/resources/query/sql/query19.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query20.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query20.sql b/query/src/test/resources/query/sql/query20.sql
index ac276bb..61532f1 100644
--- a/query/src/test/resources/query/sql/query20.sql
+++ b/query/src/test/resources/query/sql/query20.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query21.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query21.sql b/query/src/test/resources/query/sql/query21.sql
index b2e54ba..8b7870f 100644
--- a/query/src/test/resources/query/sql/query21.sql
+++ b/query/src/test/resources/query/sql/query21.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query22.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query22.sql b/query/src/test/resources/query/sql/query22.sql
index 024f9e9..fe8120e 100644
--- a/query/src/test/resources/query/sql/query22.sql
+++ b/query/src/test/resources/query/sql/query22.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query23.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query23.sql b/query/src/test/resources/query/sql/query23.sql
index 25e93d9..6cd09ee 100644
--- a/query/src/test/resources/query/sql/query23.sql
+++ b/query/src/test/resources/query/sql/query23.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query24.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query24.sql b/query/src/test/resources/query/sql/query24.sql
index 5681557..3e730b6 100644
--- a/query/src/test/resources/query/sql/query24.sql
+++ b/query/src/test/resources/query/sql/query24.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query25.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query25.sql b/query/src/test/resources/query/sql/query25.sql
index 0c07a8e..b36fe35 100644
--- a/query/src/test/resources/query/sql/query25.sql
+++ b/query/src/test/resources/query/sql/query25.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query26.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query26.sql b/query/src/test/resources/query/sql/query26.sql
index 3889e77..00bdd99 100644
--- a/query/src/test/resources/query/sql/query26.sql
+++ b/query/src/test/resources/query/sql/query26.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query27.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query27.sql b/query/src/test/resources/query/sql/query27.sql
index 1c0a505..0778a22 100644
--- a/query/src/test/resources/query/sql/query27.sql
+++ b/query/src/test/resources/query/sql/query27.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query28.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query28.sql b/query/src/test/resources/query/sql/query28.sql
index 4b04d35..1720ef0 100644
--- a/query/src/test/resources/query/sql/query28.sql
+++ b/query/src/test/resources/query/sql/query28.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query29.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query29.sql b/query/src/test/resources/query/sql/query29.sql
index c799014..98a7a14 100644
--- a/query/src/test/resources/query/sql/query29.sql
+++ b/query/src/test/resources/query/sql/query29.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query30.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query30.sql b/query/src/test/resources/query/sql/query30.sql
index 57b7f57..92220d6 100644
--- a/query/src/test/resources/query/sql/query30.sql
+++ b/query/src/test/resources/query/sql/query30.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select sum(price) as GMV, count(1) as TRANS_CNT from test_kylin_fact limit 50 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query31.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query31.sql b/query/src/test/resources/query/sql/query31.sql
index d33f4ba..aea1248 100644
--- a/query/src/test/resources/query/sql/query31.sql
+++ b/query/src/test/resources/query/sql/query31.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query32.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query32.sql b/query/src/test/resources/query/sql/query32.sql
index 12fab37..a99892f 100644
--- a/query/src/test/resources/query/sql/query32.sql
+++ b/query/src/test/resources/query/sql/query32.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query33.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query33.sql b/query/src/test/resources/query/sql/query33.sql
index 4414533..29e56c4 100644
--- a/query/src/test/resources/query/sql/query33.sql
+++ b/query/src/test/resources/query/sql/query33.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_kylin_fact.seller_id 
  ,test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query34.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query34.sql b/query/src/test/resources/query/sql/query34.sql
index 0db088d..54934b0 100644
--- a/query/src/test/resources/query/sql/query34.sql
+++ b/query/src/test/resources/query/sql/query34.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query35.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query35.sql b/query/src/test/resources/query/sql/query35.sql
index 3f2beee..ddbf1f8 100644
--- a/query/src/test/resources/query/sql/query35.sql
+++ b/query/src/test/resources/query/sql/query35.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query36.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query36.sql b/query/src/test/resources/query/sql/query36.sql
index 709f00b..d208ac2 100644
--- a/query/src/test/resources/query/sql/query36.sql
+++ b/query/src/test/resources/query/sql/query36.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_category_groupings.meta_categ_name 
  ,sum(test_kylin_fact.price) as GMV_SUM 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query37.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query37.sql b/query/src/test/resources/query/sql/query37.sql
index dfc1845..4de4a29 100644
--- a/query/src/test/resources/query/sql/query37.sql
+++ b/query/src/test/resources/query/sql/query37.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query38.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query38.sql b/query/src/test/resources/query/sql/query38.sql
index 191e12e..7bb77eb 100644
--- a/query/src/test/resources/query/sql/query38.sql
+++ b/query/src/test/resources/query/sql/query38.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 
  where lstg_format_name not in ('FP-GTC', 'ABIN') 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query39.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query39.sql b/query/src/test/resources/query/sql/query39.sql
index aa37afa..5ac5bf6 100644
--- a/query/src/test/resources/query/sql/query39.sql
+++ b/query/src/test/resources/query/sql/query39.sql
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select sum(price) as GMV 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query40.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query40.sql b/query/src/test/resources/query/sql/query40.sql
index 277e297..cc68d3b 100644
--- a/query/src/test/resources/query/sql/query40.sql
+++ b/query/src/test/resources/query/sql/query40.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select cal_dt, lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 
  where cal_dt between date '2013-05-06' and date '2013-07-31' 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query41.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query41.sql b/query/src/test/resources/query/sql/query41.sql
index 1a13939..d6b602a 100644
--- a/query/src/test/resources/query/sql/query41.sql
+++ b/query/src/test/resources/query/sql/query41.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_category_groupings.meta_categ_name 
  ,test_category_groupings.categ_lvl2_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query42.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query42.sql b/query/src/test/resources/query/sql/query42.sql
index be9ceda..3691c8d 100644
--- a/query/src/test/resources/query/sql/query42.sql
+++ b/query/src/test/resources/query/sql/query42.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.cal_dt, count(*) as TRANS_CNT 
  from test_kylin_fact 
  inner JOIN edw.test_cal_dt as test_cal_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query43.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query43.sql b/query/src/test/resources/query/sql/query43.sql
index 5249854..865e2c7 100644
--- a/query/src/test/resources/query/sql/query43.sql
+++ b/query/src/test/resources/query/sql/query43.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.cal_dt, count(*) as CNT 
  from test_kylin_fact 
  inner JOIN edw.test_cal_dt as test_cal_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query44.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query44.sql b/query/src/test/resources/query/sql/query44.sql
index b369ec3..49a4b02 100644
--- a/query/src/test/resources/query/sql/query44.sql
+++ b/query/src/test/resources/query/sql/query44.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_category_groupings.meta_categ_name 
  ,sum(test_kylin_fact.price) as GMV 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query45.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query45.sql b/query/src/test/resources/query/sql/query45.sql
index 5a40e25..ee617e5 100644
--- a/query/src/test/resources/query/sql/query45.sql
+++ b/query/src/test/resources/query/sql/query45.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select count(*) as CNT from edw.test_cal_dt 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query46.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query46.sql b/query/src/test/resources/query/sql/query46.sql
index 6dba282..b6fba2d 100644
--- a/query/src/test/resources/query/sql/query46.sql
+++ b/query/src/test/resources/query/sql/query46.sql
@@ -1 +1,19 @@
-select count(*) as CNT  from test_category_groupings
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select count(*) as CNT  from test_category_groupings

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query47.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query47.sql b/query/src/test/resources/query/sql/query47.sql
index 7e0f882..f1d78ce 100644
--- a/query/src/test/resources/query/sql/query47.sql
+++ b/query/src/test/resources/query/sql/query47.sql
@@ -1 +1,19 @@
-select count(*) as CNT  from edw.test_seller_type_dim
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select count(*) as CNT  from edw.test_seller_type_dim

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query48.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query48.sql b/query/src/test/resources/query/sql/query48.sql
index 72e8f73..d67f70c 100644
--- a/query/src/test/resources/query/sql/query48.sql
+++ b/query/src/test/resources/query/sql/query48.sql
@@ -1 +1,19 @@
-select count(*) as CNT from edw.test_sites
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select count(*) as CNT from edw.test_sites


[32/39] incubator-kylin git commit: KYLIN-722 format local js

Posted by li...@apache.org.
KYLIN-722 format local js


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

Branch: refs/heads/staging
Commit: ba9592c8b041def201fe8b816c9cc0203e2f09fc
Parents: ccc0981
Author: jiazhong <ji...@ebay.com>
Authored: Fri Apr 24 13:25:07 2015 +0800
Committer: jiazhong <ji...@ebay.com>
Committed: Fri Apr 24 13:31:45 2015 +0800

----------------------------------------------------------------------
 webapp/app/js/app.js                            |    4 +-
 webapp/app/js/config.js                         |  232 ++--
 webapp/app/js/controllers/access.js             |  184 ++--
 webapp/app/js/controllers/admin.js              |  372 +++----
 webapp/app/js/controllers/auth.js               |   48 +-
 webapp/app/js/controllers/cube.js               |  147 ++-
 webapp/app/js/controllers/cubeAdvanceSetting.js |   34 +-
 webapp/app/js/controllers/cubeDimensions.js     |  611 +++++-----
 webapp/app/js/controllers/cubeEdit.js           | 1042 +++++++++---------
 webapp/app/js/controllers/cubeFilter.js         |    4 +-
 webapp/app/js/controllers/cubeModel.js          |  260 ++---
 webapp/app/js/controllers/cubeRefresh.js        |    4 +-
 webapp/app/js/controllers/cubes.js              |  787 ++++++-------
 webapp/app/js/controllers/index.js              |   44 +-
 webapp/app/js/controllers/job.js                |  349 +++---
 webapp/app/js/controllers/page.js               |  462 ++++----
 webapp/app/js/controllers/projectMeta.js        |  131 ++-
 webapp/app/js/controllers/projects.js           |  192 ++--
 webapp/app/js/controllers/query.js              |  877 ++++++++-------
 webapp/app/js/controllers/sourceMeta.js         |  268 ++---
 webapp/app/js/directives/directives.js          |  334 +++---
 webapp/app/js/factories/graph.js                |   96 +-
 webapp/app/js/filters/filter.js                 |  252 ++---
 webapp/app/js/listeners.js                      |  128 +--
 webapp/app/js/model/cubeConfig.js               |  148 +--
 webapp/app/js/model/cubeDescModel.js            |  147 +--
 webapp/app/js/model/cubeListModel.js            |   80 +-
 webapp/app/js/model/cubesManager.js             |    2 +-
 webapp/app/js/model/jobConfig.js                |   32 +-
 webapp/app/js/model/jobListModel.js             |   64 +-
 webapp/app/js/model/metaModel.js                |  168 +--
 webapp/app/js/model/projectConfig.js            |   14 +-
 webapp/app/js/model/projectModel.js             |  140 +--
 webapp/app/js/model/tableConfig.js              |   14 +-
 webapp/app/js/model/tableModel.js               |  170 +--
 webapp/app/js/services/access.js                |   14 +-
 webapp/app/js/services/admin.js                 |   14 +-
 webapp/app/js/services/auth.js                  |   12 +-
 webapp/app/js/services/cache.js                 |    8 +-
 webapp/app/js/services/cubeDesc.js              |    8 +-
 webapp/app/js/services/cubes.js                 |   32 +-
 webapp/app/js/services/graph.js                 |   44 +-
 webapp/app/js/services/jobs.js                  |   16 +-
 webapp/app/js/services/kylinProperties.js       |  156 +--
 webapp/app/js/services/message.js               |   60 +-
 webapp/app/js/services/model.js                 |    8 +-
 webapp/app/js/services/ngLoading.js             |   54 +-
 webapp/app/js/services/projects.js              |   14 +-
 webapp/app/js/services/query.js                 |   18 +-
 webapp/app/js/services/tables.js                |   18 +-
 webapp/app/js/services/tree.js                  |  547 +++++----
 webapp/app/js/services/users.js                 |   70 +-
 webapp/app/js/utils/utils.js                    |   82 +-
 webapp/app/less/app.less                        |    5 +-
 54 files changed, 4546 insertions(+), 4475 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/app.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/app.js b/webapp/app/js/app.js
index ba24cb1..59d679e 100644
--- a/webapp/app/js/app.js
+++ b/webapp/app/js/app.js
@@ -14,7 +14,7 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 //Kylin Application Module
-KylinApp = angular.module('kylin', ['ngRoute', 'ngResource', 'ngGrid', 'ui.bootstrap', 'ui.ace', 'base64', 'angularLocalStorage', 'localytics.directives', 'treeControl', 'nvd3ChartDirectives','ngLoadingRequest','oitozero.ngSweetAlert','ngCookies','angular-underscore', 'ngAnimate', 'ui.sortable']);
+KylinApp = angular.module('kylin', ['ngRoute', 'ngResource', 'ngGrid', 'ui.bootstrap', 'ui.ace', 'base64', 'angularLocalStorage', 'localytics.directives', 'treeControl', 'nvd3ChartDirectives', 'ngLoadingRequest', 'oitozero.ngSweetAlert', 'ngCookies', 'angular-underscore', 'ngAnimate', 'ui.sortable']);

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/config.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/config.js b/webapp/app/js/config.js
index fa61fef..cf3ea6d 100644
--- a/webapp/app/js/config.js
+++ b/webapp/app/js/config.js
@@ -14,144 +14,144 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 // # dh.config
 //
-// This module loads the configuration and routes files, as well as bootstraps the application. At 
+// This module loads the configuration and routes files, as well as bootstraps the application. At
 // runtime it adds uri based on application location.
 
 // Config variable.
 var Config = {
-    name:'kylin',
-    service:{
-        base:'/kylin/',
-        url:'/kylin/api/'
-    },
-    documents:[],
-    reference_links:{
-        hadoop: {name:"hadoop", link: null},
-        diagnostic: {name:"diagnostic", "link": null}
-    },
-    contact_mail:''
+  name: 'kylin',
+  service: {
+    base: '/kylin/',
+    url: '/kylin/api/'
+  },
+  documents: [],
+  reference_links: {
+    hadoop: {name: "hadoop", link: null},
+    diagnostic: {name: "diagnostic", "link": null}
+  },
+  contact_mail: ''
 };
 
 // Angular module to load routes.
 KylinApp.config(function ($routeProvider, $httpProvider, $locationProvider, $logProvider) {
 
-    // Set debug to true by default.
-    if (angular.isUndefined(Config.debug) || Config.debug !== false) {
-        Config.debug = true;
-    }
+  // Set debug to true by default.
+  if (angular.isUndefined(Config.debug) || Config.debug !== false) {
+    Config.debug = true;
+  }
+
+  // Set development to true by default.
+  if (angular.isUndefined(Config.development) || Config.development !== false) {
+    Config.development = true;
+  }
+
+  // Disable logging if debug is off.
+  if (Config.debug === false) {
+    $logProvider.debugEnabled(false);
+  }
+
+  // Loop over routes and add to router.
+  angular.forEach(Config.routes, function (route) {
+    $routeProvider.when(route.url, route.params);
+  });
+
+  // Set to use HTML5 mode, which removes the #! from modern browsers.
+  $locationProvider.html5Mode(true);
+
+  //configure $http to view a login whenever a 401 unauthorized response arrives
+  $httpProvider.responseInterceptors.push(function ($rootScope, $q) {
+    return function (promise) {
+      return promise.then(
+        //success -> don't intercept
+        function (response) {
+          return response;
+        },
+        //error -> if 401 save the request and broadcast an event
+        function (response) {
+          if (response.status === 401 && !(response.config.url.indexOf("user/authentication") !== -1 && response.config.method === 'POST')) {
+            var deferred = $q.defer(),
+              req = {
+                config: response.config,
+                deferred: deferred
+              };
+            $rootScope.requests401.push(req);
+            $rootScope.$broadcast('event:loginRequired');
+            return deferred.promise;
+          }
+
+          if (response.status === 403) {
+            $rootScope.$broadcast('event:forbidden', response.data.exception);
+          }
+
+          return $q.reject(response);
+        }
+      );
+    };
+  });
+  httpHeaders = $httpProvider.defaults.headers;
+})
+  .run(function ($location) {
 
-    // Set development to true by default.
-    if (angular.isUndefined(Config.development) || Config.development !== false) {
-        Config.development = true;
+    if (angular.isUndefined(Config.uri)) {
+      Config.uri = {};
     }
 
-    // Disable logging if debug is off.
-    if (Config.debug === false) {
-        $logProvider.debugEnabled(false);
+    // Add uri details at runtime based on environment.
+    var uri = {
+      host: $location.protocol() + '://' + $location.host() + '/'
+    };
+    // Setup values for development or production.
+    if (Config.development) {
+      uri.api = $location.protocol() + '://' + $location.host() + '/devapi/';
+    } else {
+      uri.api = $location.protocol() + '://' + $location.host() + '/api/';
     }
 
-    // Loop over routes and add to router.
-    angular.forEach(Config.routes, function (route) {
-        $routeProvider.when(route.url, route.params);
-    });
-
-    // Set to use HTML5 mode, which removes the #! from modern browsers.
-    $locationProvider.html5Mode(true);
-
-    //configure $http to view a login whenever a 401 unauthorized response arrives
-    $httpProvider.responseInterceptors.push(function ($rootScope, $q) {
-        return function (promise) {
-            return promise.then(
-                //success -> don't intercept
-                function (response) {
-                    return response;
-                },
-                //error -> if 401 save the request and broadcast an event
-                function (response) {
-                    if (response.status === 401 && !(response.config.url.indexOf("user/authentication") !== -1 && response.config.method === 'POST')) {
-                        var deferred = $q.defer(),
-                            req = {
-                                config: response.config,
-                                deferred: deferred
-                            };
-                        $rootScope.requests401.push(req);
-                        $rootScope.$broadcast('event:loginRequired');
-                        return deferred.promise;
-                    }
-
-                    if (response.status === 403) {
-                        $rootScope.$broadcast('event:forbidden', response.data.exception);
-                    }
-
-                    return $q.reject(response);
-                }
-            );
-        };
-    });
-    httpHeaders = $httpProvider.defaults.headers;
-})
-    .run(function ($location) {
-
-        if (angular.isUndefined(Config.uri)) {
-            Config.uri = {};
-        }
-
-        // Add uri details at runtime based on environment.
-        var uri = {
-            host: $location.protocol() + '://' + $location.host() + '/'
-        };
-        // Setup values for development or production.
-        if (Config.development) {
-            uri.api = $location.protocol() + '://' + $location.host() + '/devapi/';
-        } else {
-            uri.api = $location.protocol() + '://' + $location.host() + '/api/';
-        }
-
-        // Extend uri config with any declared uri values.
-        Config.uri = angular.extend(uri, Config.uri);
-    });
+    // Extend uri config with any declared uri values.
+    Config.uri = angular.extend(uri, Config.uri);
+  });
 
 // This runs when all code has loaded, and loads the config and route json manifests, before bootstrapping angular.
 window.onload = function () {
 
-    // Files to load initially.
-    var files = [
-        {property: 'routes', file: 'routes.json'}
-    ];
-    var loaded = 0;
-
-    // Request object
-    var Request = function (item, file) {
-        var loader = new XMLHttpRequest();
-        // onload event for when the file is loaded
-        loader.onload = function () {
-
-            loaded++;
-
-            if(item === 'routes') {
-                Config[item] = JSON.parse(this.responseText);
-            }
-            // We've loaded all dependencies, lets bootstrap the application.
-            if (loaded === files.length) {
-                // Declare error if we are missing a name.
-                if (angular.isUndefined(Config.name)) {
-                    console.error('Config.name is undefined, please update this property.');
-                }
-                // Bootstrap the application.
-                angular.bootstrap(document, [Config.name]);
-            }
-        };
-
-        loader.open('get', file, true);
-        loader.send();
+  // Files to load initially.
+  var files = [
+    {property: 'routes', file: 'routes.json'}
+  ];
+  var loaded = 0;
+
+  // Request object
+  var Request = function (item, file) {
+    var loader = new XMLHttpRequest();
+    // onload event for when the file is loaded
+    loader.onload = function () {
+
+      loaded++;
+
+      if (item === 'routes') {
+        Config[item] = JSON.parse(this.responseText);
+      }
+      // We've loaded all dependencies, lets bootstrap the application.
+      if (loaded === files.length) {
+        // Declare error if we are missing a name.
+        if (angular.isUndefined(Config.name)) {
+          console.error('Config.name is undefined, please update this property.');
+        }
+        // Bootstrap the application.
+        angular.bootstrap(document, [Config.name]);
+      }
     };
 
-    for (var index in files) {
-        var load = new Request(files[index].property, files[index].file);
-    }
+    loader.open('get', file, true);
+    loader.send();
+  };
+
+  for (var index in files) {
+    var load = new Request(files[index].property, files[index].file);
+  }
 
 };

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/access.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/access.js b/webapp/app/js/controllers/access.js
index 7b9c987..4cfd833 100644
--- a/webapp/app/js/controllers/access.js
+++ b/webapp/app/js/controllers/access.js
@@ -14,115 +14,115 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
-KylinApp.controller('AccessCtrl', function ($scope,AccessService, MessageService, AuthenticationService,SweetAlert) {
+KylinApp.controller('AccessCtrl', function ($scope, AccessService, MessageService, AuthenticationService, SweetAlert) {
 
-    $scope.accessTooltip = "<div style='text-align: left'>" +
-        "<label>What does access mean to cube?</label>" +
-        "<ul><li>CUBE QUERY: Access to query cube</li>" +
-        "<li>CUBE OPERATION: Access to rebuild, resume and cancel jobs. Also include access of CUBE QUERY.</li>" +
-        "<li>CUBE MANAGEMENT: Access to edit/delete cube. Also include access of CUBE OPERATION.</li>" +
-        "<li>CUBE ADMIN: Full access to cube and jobs, including access management.</li></ul></div>";
+  $scope.accessTooltip = "<div style='text-align: left'>" +
+  "<label>What does access mean to cube?</label>" +
+  "<ul><li>CUBE QUERY: Access to query cube</li>" +
+  "<li>CUBE OPERATION: Access to rebuild, resume and cancel jobs. Also include access of CUBE QUERY.</li>" +
+  "<li>CUBE MANAGEMENT: Access to edit/delete cube. Also include access of CUBE OPERATION.</li>" +
+  "<li>CUBE ADMIN: Full access to cube and jobs, including access management.</li></ul></div>";
 
-    $scope.authorities = null;
+  $scope.authorities = null;
 
-    AuthenticationService.authorities({}, function (authorities) {
-        $scope.authorities = authorities.stringList;
-    });
+  AuthenticationService.authorities({}, function (authorities) {
+    $scope.authorities = authorities.stringList;
+  });
 
-    $scope.resetNewAcess = function () {
-        $scope.newAccess = null;
-    }
+  $scope.resetNewAcess = function () {
+    $scope.newAccess = null;
+  }
 
-    $scope.renewAccess = function (entity) {
-        $scope.newAccess = {
-            uuid: entity.uuid,
-            sid: null,
-            principal: true,
-            permission: 'READ'
-        };
-    }
+  $scope.renewAccess = function (entity) {
+    $scope.newAccess = {
+      uuid: entity.uuid,
+      sid: null,
+      principal: true,
+      permission: 'READ'
+    };
+  }
 
-    $scope.grant = function (type, entity, grantRequst) {
-        var uuid = grantRequst.uuid;
-        delete grantRequst.uuid;
-        AccessService.grant({type: type, uuid: uuid}, grantRequst, function (accessEntities) {
-            entity.accessEntities = accessEntities;
-            $scope.resetNewAcess();
+  $scope.grant = function (type, entity, grantRequst) {
+    var uuid = grantRequst.uuid;
+    delete grantRequst.uuid;
+    AccessService.grant({type: type, uuid: uuid}, grantRequst, function (accessEntities) {
+      entity.accessEntities = accessEntities;
+      $scope.resetNewAcess();
 //            MessageService.sendMsg('Access granted!', 'success', {});
-            SweetAlert.swal('Success!', 'Access granted!', 'success');
-        }, function (e) {
-            if (e.status == 404) {
+      SweetAlert.swal('Success!', 'Access granted!', 'success');
+    }, function (e) {
+      if (e.status == 404) {
 //                MessageService.sendMsg('User not found!', 'error', {});
-                SweetAlert.swal('Oops...', 'User not found!!', 'error');
-            }
-            else{
-                if(e.data&& e.data.exception){
-                    var message =e.data.exception;
-                    var msg = !!(message) ? message : 'Failed to take action.';
-                    SweetAlert.swal('Oops...', msg, 'error');
-                }else{
-                    SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                }
+        SweetAlert.swal('Oops...', 'User not found!!', 'error');
+      }
+      else {
+        if (e.data && e.data.exception) {
+          var message = e.data.exception;
+          var msg = !!(message) ? message : 'Failed to take action.';
+          SweetAlert.swal('Oops...', msg, 'error');
+        } else {
+          SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+        }
 
-            }
-        });
-    }
+      }
+    });
+  }
 
-    $scope.update = function (type, entity, access, permission) {
-        var updateRequst = {
-            accessEntryId: access.id,
-            permission: permission
-        };
-        AccessService.update({type: type, uuid: entity.uuid}, updateRequst, function (accessEntities) {
-            entity.accessEntities = accessEntities;
+  $scope.update = function (type, entity, access, permission) {
+    var updateRequst = {
+      accessEntryId: access.id,
+      permission: permission
+    };
+    AccessService.update({type: type, uuid: entity.uuid}, updateRequst, function (accessEntities) {
+      entity.accessEntities = accessEntities;
 //            MessageService.sendMsg('Access granted!', 'success', {});
-            SweetAlert.swal('', 'Access granted!', 'success');
-        },function(e){
-            if(e.data&& e.data.exception){
-                var message =e.data.exception;
-                var msg = !!(message) ? message : 'Failed to take action.';
-                SweetAlert.swal('Oops...', msg, 'error');
-            }else{
-                SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-            }
-        });
+      SweetAlert.swal('', 'Access granted!', 'success');
+    }, function (e) {
+      if (e.data && e.data.exception) {
+        var message = e.data.exception;
+        var msg = !!(message) ? message : 'Failed to take action.';
+        SweetAlert.swal('Oops...', msg, 'error');
+      } else {
+        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+      }
+    });
 
-    }
+  }
 
-    $scope.revoke = function (type, access, entity) {
-        SweetAlert.swal({
-            title: '',
-            text: 'Are you sure to revoke the access?',
-            type: '',
-            showCancelButton: true,
-            confirmButtonColor: '#DD6B55',
-            confirmButtonText: "Yes",
-            closeOnConfirm: true
-        }, function() {
-            var revokeRequst = {
-                type: type,
-                uuid: entity.uuid,
-                accessEntryId: access.id
-            };
-            AccessService.revoke(revokeRequst, function (accessEntities) {
-                entity.accessEntities = accessEntities.accessEntryResponseList;
-                SweetAlert.swal('Success!', 'The access has been revoked.', 'success');
-            },function(e){
-                if(e.data&& e.data.exception){
-                    var message =e.data.exception;
-                    var msg = !!(message) ? message : 'Failed to take action.';
-                    SweetAlert.swal('Oops...', msg, 'error');
-                }else{
-                    SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                }
-            });
+  $scope.revoke = function (type, access, entity) {
+    SweetAlert.swal({
+      title: '',
+      text: 'Are you sure to revoke the access?',
+      type: '',
+      showCancelButton: true,
+      confirmButtonColor: '#DD6B55',
+      confirmButtonText: "Yes",
+      closeOnConfirm: true
+    }, function () {
+      var revokeRequst = {
+        type: type,
+        uuid: entity.uuid,
+        accessEntryId: access.id
+      };
+      AccessService.revoke(revokeRequst, function (accessEntities) {
+        entity.accessEntities = accessEntities.accessEntryResponseList;
+        SweetAlert.swal('Success!', 'The access has been revoked.', 'success');
+      }, function (e) {
+        if (e.data && e.data.exception) {
+          var message = e.data.exception;
+          var msg = !!(message) ? message : 'Failed to take action.';
+          SweetAlert.swal('Oops...', msg, 'error');
+        } else {
+          SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+        }
+      });
 
-        });
+    });
 
-    }
+  }
 });
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/admin.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/admin.js b/webapp/app/js/controllers/admin.js
index a15411a..e5d2a67 100644
--- a/webapp/app/js/controllers/admin.js
+++ b/webapp/app/js/controllers/admin.js
@@ -14,202 +14,204 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
-KylinApp.controller('AdminCtrl', function ($scope,AdminService, CacheService, TableService,loadingRequest, MessageService, $modal,SweetAlert) {
-    $scope.configStr = "";
-    $scope.envStr = "";
+KylinApp.controller('AdminCtrl', function ($scope, AdminService, CacheService, TableService, loadingRequest, MessageService, $modal, SweetAlert) {
+  $scope.configStr = "";
+  $scope.envStr = "";
 
-    $scope.getEnv = function(){
-        AdminService.env({}, function(env){
-            $scope.envStr = env.env;
-            MessageService.sendMsg('Server environment get successfully', 'success', {});
+  $scope.getEnv = function () {
+    AdminService.env({}, function (env) {
+      $scope.envStr = env.env;
+      MessageService.sendMsg('Server environment get successfully', 'success', {});
 //            SweetAlert.swal('Success!', 'Server environment get successfully', 'success');
-        },function(e){
-            if(e.data&& e.data.exception){
-                var message =e.data.exception;
-                var msg = !!(message) ? message : 'Failed to take action.';
-                SweetAlert.swal('Oops...', msg, 'error');
-            }else{
-                SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-            }
+    }, function (e) {
+      if (e.data && e.data.exception) {
+        var message = e.data.exception;
+        var msg = !!(message) ? message : 'Failed to take action.';
+        SweetAlert.swal('Oops...', msg, 'error');
+      } else {
+        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+      }
+    });
+  }
+
+  $scope.getConfig = function () {
+    AdminService.config({}, function (config) {
+      $scope.configStr = config.config;
+      MessageService.sendMsg('Server config get successfully', 'success', {});
+    }, function (e) {
+      if (e.data && e.data.exception) {
+        var message = e.data.exception;
+        var msg = !!(message) ? message : 'Failed to take action.';
+        SweetAlert.swal('Oops...', msg, 'error');
+      } else {
+        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+      }
+    });
+  }
+
+  $scope.reloadMeta = function () {
+    SweetAlert.swal({
+      title: '',
+      text: 'Are you sure to reload metadata and clean cache?',
+      type: '',
+      showCancelButton: true,
+      confirmButtonColor: '#DD6B55',
+      confirmButtonText: "Yes",
+      closeOnConfirm: true
+    }, function (isConfirm) {
+      if (isConfirm) {
+        CacheService.clean({}, function () {
+          SweetAlert.swal('Success!', 'Cache reload successfully', 'success');
+        }, function (e) {
+          if (e.data && e.data.exception) {
+            var message = e.data.exception;
+            var msg = !!(message) ? message : 'Failed to take action.';
+            SweetAlert.swal('Oops...', msg, 'error');
+          } else {
+            SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+          }
         });
-    }
-
-    $scope.getConfig = function(){
-        AdminService.config({}, function(config){
-            $scope.configStr = config.config;
-            MessageService.sendMsg('Server config get successfully', 'success', {});
-        },function(e){
-            if(e.data&& e.data.exception){
-                var message =e.data.exception;
-                var msg = !!(message) ? message : 'Failed to take action.';
-                SweetAlert.swal('Oops...', msg, 'error');
-            }else{
-                SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-            }
-        });
-    }
-
-    $scope.reloadMeta = function(){
-        SweetAlert.swal({
-            title: '',
-            text: 'Are you sure to reload metadata and clean cache?',
-            type: '',
-            showCancelButton: true,
-            confirmButtonColor: '#DD6B55',
-            confirmButtonText: "Yes",
-            closeOnConfirm: true
-        }, function(isConfirm) {
-            if(isConfirm){
-                CacheService.clean({}, function () {
-                    SweetAlert.swal('Success!', 'Cache reload successfully', 'success');
-                },function(e){
-                    if(e.data&& e.data.exception){
-                        var message =e.data.exception;
-                        var msg = !!(message) ? message : 'Failed to take action.';
-                        SweetAlert.swal('Oops...', msg, 'error');
-                    }else{
-                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                    }
-                });
-            }
-
-        });
-    }
-
-    $scope.calCardinality = function (tableName) {
-        $modal.open({
-            templateUrl: 'calCardinality.html',
-            controller: CardinalityGenCtrl,
-            resolve: {
-                tableName: function () {
-                    return tableName;
-                },
-                scope: function () {
-                    return $scope;
-                }
-            }
-        });
-    }
-
-    $scope.cleanStorage = function(){
-        SweetAlert.swal({
-            title: '',
-            text: 'Are you sure to clean up unused HDFS and HBase space?',
-            type: '',
-            showCancelButton: true,
-            confirmButtonColor: '#DD6B55',
-            confirmButtonText: "Yes",
-            closeOnConfirm: true
-        }, function(isConfirm) {
-            if(isConfirm){
-            AdminService.cleanStorage({}, function () {
-                SweetAlert.swal('Success!', 'Storage cleaned successfully!', 'success');
-            },function(e){
-                if(e.data&& e.data.exception){
-                    var message =e.data.exception;
-                    var msg = !!(message) ? message : 'Failed to take action.';
-                    SweetAlert.swal('Oops...', msg, 'error');
-                }else{
-                    SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                }
-            });
-            }
-        });
-    }
-
-    $scope.disableCache = function(){
-        SweetAlert.swal({
-            title: '',
-            text: 'Are you sure to disable query cache?',
-            type: '',
-            showCancelButton: true,
-            confirmButtonColor: '#DD6B55',
-            confirmButtonText: "Yes",
-            closeOnConfirm: true
-        }, function(isConfirm) {
-            if(isConfirm){
-            AdminService.updateConfig({}, {key: 'kylin.query.cache.enabled',value:false}, function () {
-                SweetAlert.swal('Success!', 'Cache disabled successfully!', 'success');
-            },function(e){
-                if(e.data&& e.data.exception){
-                    var message =e.data.exception;
-                    var msg = !!(message) ? message : 'Failed to take action.';
-                    SweetAlert.swal('Oops...', msg, 'error');
-                }else{
-                    SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                }
-            });
-            }
-
+      }
+
+    });
+  }
+
+  $scope.calCardinality = function (tableName) {
+    $modal.open({
+      templateUrl: 'calCardinality.html',
+      controller: CardinalityGenCtrl,
+      resolve: {
+        tableName: function () {
+          return tableName;
+        },
+        scope: function () {
+          return $scope;
+        }
+      }
+    });
+  }
+
+  $scope.cleanStorage = function () {
+    SweetAlert.swal({
+      title: '',
+      text: 'Are you sure to clean up unused HDFS and HBase space?',
+      type: '',
+      showCancelButton: true,
+      confirmButtonColor: '#DD6B55',
+      confirmButtonText: "Yes",
+      closeOnConfirm: true
+    }, function (isConfirm) {
+      if (isConfirm) {
+        AdminService.cleanStorage({}, function () {
+          SweetAlert.swal('Success!', 'Storage cleaned successfully!', 'success');
+        }, function (e) {
+          if (e.data && e.data.exception) {
+            var message = e.data.exception;
+            var msg = !!(message) ? message : 'Failed to take action.';
+            SweetAlert.swal('Oops...', msg, 'error');
+          } else {
+            SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+          }
         });
-
-    }
-
-    $scope.toSetConfig = function(){
-        $modal.open({
-            templateUrl: 'updateConfig.html',
-            controller: updateConfigCtrl,
-            resolve: {
-            }
+      }
+    });
+  }
+
+  $scope.disableCache = function () {
+    SweetAlert.swal({
+      title: '',
+      text: 'Are you sure to disable query cache?',
+      type: '',
+      showCancelButton: true,
+      confirmButtonColor: '#DD6B55',
+      confirmButtonText: "Yes",
+      closeOnConfirm: true
+    }, function (isConfirm) {
+      if (isConfirm) {
+        AdminService.updateConfig({}, {key: 'kylin.query.cache.enabled', value: false}, function () {
+          SweetAlert.swal('Success!', 'Cache disabled successfully!', 'success');
+        }, function (e) {
+          if (e.data && e.data.exception) {
+            var message = e.data.exception;
+            var msg = !!(message) ? message : 'Failed to take action.';
+            SweetAlert.swal('Oops...', msg, 'error');
+          } else {
+            SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+          }
         });
+      }
+
+    });
+
+  }
+
+  $scope.toSetConfig = function () {
+    $modal.open({
+      templateUrl: 'updateConfig.html',
+      controller: updateConfigCtrl,
+      resolve: {}
+    });
+  }
+
+  var CardinalityGenCtrl = function ($scope, $modalInstance, tableName, MessageService) {
+    $scope.tableName = tableName;
+    $scope.delimiter = 0;
+    $scope.format = 0;
+    $scope.cancel = function () {
+      $modalInstance.dismiss('cancel');
+    };
+    $scope.calculate = function () {
+      $modalInstance.dismiss();
+      loadingRequest.show();
+      TableService.genCardinality({tableName: $scope.tableName}, {
+        delimiter: $scope.delimiter,
+        format: $scope.format
+      }, function (result) {
+        loadingRequest.hide();
+        SweetAlert.swal('Success!', 'Cardinality job was calculated successfully. . Click Refresh button ...', 'success');
+      }, function (e) {
+        loadingRequest.hide();
+        if (e.data && e.data.exception) {
+          var message = e.data.exception;
+          var msg = !!(message) ? message : 'Failed to take action.';
+          SweetAlert.swal('Oops...', msg, 'error');
+        } else {
+          SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+        }
+      });
     }
+  };
 
-    var CardinalityGenCtrl = function ($scope, $modalInstance, tableName, MessageService) {
-        $scope.tableName = tableName;
-        $scope.delimiter = 0;
-        $scope.format = 0;
-        $scope.cancel = function () {
-            $modalInstance.dismiss('cancel');
-        };
-        $scope.calculate = function () {
-            $modalInstance.dismiss();
-            loadingRequest.show();
-            TableService.genCardinality({tableName: $scope.tableName}, {delimiter: $scope.delimiter, format: $scope.format}, function (result) {
-                loadingRequest.hide();
-                SweetAlert.swal('Success!', 'Cardinality job was calculated successfully. . Click Refresh button ...', 'success');
-            },function(e){
-                loadingRequest.hide();
-                if(e.data&& e.data.exception){
-                    var message =e.data.exception;
-                    var msg = !!(message) ? message : 'Failed to take action.';
-                    SweetAlert.swal('Oops...', msg, 'error');
-                }else{
-                    SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                }
-            });
-        }
+  var updateConfigCtrl = function ($scope, $modalInstance, AdminService, MessageService) {
+    $scope.state = {
+      key: null,
+      value: null
     };
-
-    var updateConfigCtrl = function ($scope, $modalInstance, AdminService, MessageService) {
-        $scope.state = {
-            key:null,
-            value:null
-        };
-        $scope.cancel = function () {
-            $modalInstance.dismiss('cancel');
-        };
-        $scope.update = function () {
-
-
-                AdminService.updateConfig({}, {key: $scope.state.key, value: $scope.state.value}, function (result) {
-                    SweetAlert.swal('Success!', 'Config updated successfully!', 'success');
-                    $modalInstance.dismiss();
-                },function(e){
-                    if(e.data&& e.data.exception){
-                        var message =e.data.exception;
-                        var msg = !!(message) ? message : 'Failed to take action.';
-                        SweetAlert.swal('Oops...', msg, 'error');
-                    }else{
-                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                    }
-                });
-                }
+    $scope.cancel = function () {
+      $modalInstance.dismiss('cancel');
     };
+    $scope.update = function () {
+
+
+      AdminService.updateConfig({}, {key: $scope.state.key, value: $scope.state.value}, function (result) {
+        SweetAlert.swal('Success!', 'Config updated successfully!', 'success');
+        $modalInstance.dismiss();
+      }, function (e) {
+        if (e.data && e.data.exception) {
+          var message = e.data.exception;
+          var msg = !!(message) ? message : 'Failed to take action.';
+          SweetAlert.swal('Oops...', msg, 'error');
+        } else {
+          SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+        }
+      });
+    }
+  };
 
-    $scope.getEnv();
-    $scope.getConfig();
+  $scope.getEnv();
+  $scope.getConfig();
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/auth.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/auth.js b/webapp/app/js/controllers/auth.js
index f7fbfea..2e5dc75 100644
--- a/webapp/app/js/controllers/auth.js
+++ b/webapp/app/js/controllers/auth.js
@@ -14,34 +14,34 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
 KylinApp.controller('LoginCtrl', function ($scope, $rootScope, $location, $base64, AuthenticationService, UserService) {
-    $scope.username = null;
-    $scope.password = null;
-    $scope.loading = false;
+  $scope.username = null;
+  $scope.password = null;
+  $scope.loading = false;
 
-    $scope.login = function () {
-        // set the basic authentication header that will be parsed in the next request and used to authenticate
-        httpHeaders.common['Authorization'] = 'Basic ' + $base64.encode($scope.username + ':' + $scope.password);
-        $scope.loading = true;
-        //verify project
-        if($scope.projectModel.projects.length&&!$scope.projectModel.selectedProject){
-            $scope.loading = false;
-            $scope.error = "Unable to login, please select a project";
-            return;
-        }
+  $scope.login = function () {
+    // set the basic authentication header that will be parsed in the next request and used to authenticate
+    httpHeaders.common['Authorization'] = 'Basic ' + $base64.encode($scope.username + ':' + $scope.password);
+    $scope.loading = true;
+    //verify project
+    if ($scope.projectModel.projects.length && !$scope.projectModel.selectedProject) {
+      $scope.loading = false;
+      $scope.error = "Unable to login, please select a project";
+      return;
+    }
 
-        AuthenticationService.login({}, {}, function (data) {
-            $scope.loading = false;
-            $rootScope.$broadcast('event:loginConfirmed');
-            UserService.setCurUser(data);
-            $location.path(UserService.getHomePage());
-        }, function (error) {
-            $scope.loading = false;
-            $scope.error = "Unable to login, please check your username/password.";
-        });
-    };
+    AuthenticationService.login({}, {}, function (data) {
+      $scope.loading = false;
+      $rootScope.$broadcast('event:loginConfirmed');
+      UserService.setCurUser(data);
+      $location.path(UserService.getHomePage());
+    }, function (error) {
+      $scope.loading = false;
+      $scope.error = "Unable to login, please check your username/password.";
+    });
+  };
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/cube.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cube.js b/webapp/app/js/controllers/cube.js
index 607706d..5e1d3b5 100755
--- a/webapp/app/js/controllers/cube.js
+++ b/webapp/app/js/controllers/cube.js
@@ -14,92 +14,91 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
-KylinApp.controller('CubeCtrl', function ($scope, AccessService, MessageService, CubeService, TableService, CubeGraphService, UserService,SweetAlert) {
-    $scope.newAccess = null;
-    $scope.state = {jsonEdit: false};
+KylinApp.controller('CubeCtrl', function ($scope, AccessService, MessageService, CubeService, TableService, CubeGraphService, UserService, SweetAlert) {
+  $scope.newAccess = null;
+  $scope.state = {jsonEdit: false};
 
-    $scope.buildGraph = function (cube) {
-        CubeGraphService.buildTree(cube);
-    };
+  $scope.buildGraph = function (cube) {
+    CubeGraphService.buildTree(cube);
+  };
 
-    $scope.getCubeSql = function (cube) {
-        CubeService.getSql({cubeId: cube.name, propValue: "null"}, function (sql) {
-            cube.sql = sql.sql;
-        },function(e){
-            if(e.data&& e.data.exception){
-                var message =e.data.exception;
-                var msg = !!(message) ? message : 'Failed to take action.';
-                SweetAlert.swal('Oops...', msg, 'error');
-            }else{
-                SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-            }
-        });
-    };
+  $scope.getCubeSql = function (cube) {
+    CubeService.getSql({cubeId: cube.name, propValue: "null"}, function (sql) {
+      cube.sql = sql.sql;
+    }, function (e) {
+      if (e.data && e.data.exception) {
+        var message = e.data.exception;
+        var msg = !!(message) ? message : 'Failed to take action.';
+        SweetAlert.swal('Oops...', msg, 'error');
+      } else {
+        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+      }
+    });
+  };
 
-    $scope.getNotifyListString = function (cube) {
-        if (cube.detail.notify_list) {
-            cube.notifyListString = cube.detail.notify_list.join(",");
-        }
-        else {
-            cube.notifyListString = "";
-        }
-    };
+  $scope.getNotifyListString = function (cube) {
+    if (cube.detail.notify_list) {
+      cube.notifyListString = cube.detail.notify_list.join(",");
+    }
+    else {
+      cube.notifyListString = "";
+    }
+  };
 
-    $scope.cleanStatus = function(cube){
+  $scope.cleanStatus = function (cube) {
 
-        if (!cube)
-        {
-            return;
-        }
-        var newCube = jQuery.extend(true, {}, cube);
-        delete newCube.project;
+    if (!cube) {
+      return;
+    }
+    var newCube = jQuery.extend(true, {}, cube);
+    delete newCube.project;
 
-        angular.forEach(newCube.dimensions, function(dimension, index){
-            delete dimension.status;
-        });
+    angular.forEach(newCube.dimensions, function (dimension, index) {
+      delete dimension.status;
+    });
 
-        return newCube;
-    };
+    return newCube;
+  };
 
-    $scope.updateNotifyList = function (cube) {
-        cube.detail.notify_list = cube.notifyListString.split(",");
-        CubeService.updateNotifyList({cubeId: cube.name}, cube.detail.notify_list, function () {
-            SweetAlert.swal('Success!', 'Notify List updated successfully!', 'success');
-        },function(e){
-            if(e.data&& e.data.exception){
-                var message =e.data.exception;
-                var msg = !!(message) ? message : 'Failed to take action.';
-                SweetAlert.swal('Oops...', msg, 'error');
-            }else{
-                SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-            }
-        });
-    };
+  $scope.updateNotifyList = function (cube) {
+    cube.detail.notify_list = cube.notifyListString.split(",");
+    CubeService.updateNotifyList({cubeId: cube.name}, cube.detail.notify_list, function () {
+      SweetAlert.swal('Success!', 'Notify List updated successfully!', 'success');
+    }, function (e) {
+      if (e.data && e.data.exception) {
+        var message = e.data.exception;
+        var msg = !!(message) ? message : 'Failed to take action.';
+        SweetAlert.swal('Oops...', msg, 'error');
+      } else {
+        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+      }
+    });
+  };
 
-    $scope.getHbaseInfo = function (cube) {
-        if (!cube.hbase) {
-            CubeService.getHbaseInfo({cubeId: cube.name, propValue: null, action: null}, function (hbase) {
-                cube.hbase = hbase;
+  $scope.getHbaseInfo = function (cube) {
+    if (!cube.hbase) {
+      CubeService.getHbaseInfo({cubeId: cube.name, propValue: null, action: null}, function (hbase) {
+        cube.hbase = hbase;
 
-                // Calculate cube total size based on each htable.
-                var totalSize = 0;
-                hbase.forEach(function(t) {
-                    totalSize += t.tableSize;
-                });
-                cube.totalSize = totalSize;
-            },function(e){
-                if(e.data&& e.data.exception){
-                    var message =e.data.exception;
-                    var msg = !!(message) ? message : 'Failed to take action.';
-                    SweetAlert.swal('Oops...', msg, 'error');
-                }else{
-                    SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                }
-            });
+        // Calculate cube total size based on each htable.
+        var totalSize = 0;
+        hbase.forEach(function (t) {
+          totalSize += t.tableSize;
+        });
+        cube.totalSize = totalSize;
+      }, function (e) {
+        if (e.data && e.data.exception) {
+          var message = e.data.exception;
+          var msg = !!(message) ? message : 'Failed to take action.';
+          SweetAlert.swal('Oops...', msg, 'error');
+        } else {
+          SweetAlert.swal('Oops...', "Failed to take action.", 'error');
         }
-    };
+      });
+    }
+  };
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/cubeAdvanceSetting.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeAdvanceSetting.js b/webapp/app/js/controllers/cubeAdvanceSetting.js
index f1bd991..7e3d346 100644
--- a/webapp/app/js/controllers/cubeAdvanceSetting.js
+++ b/webapp/app/js/controllers/cubeAdvanceSetting.js
@@ -14,29 +14,29 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
-KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfig,ModelService,MetaModel) {
+KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal, cubeConfig, ModelService, MetaModel) {
 
-    //convert some undefined or null value
-    angular.forEach($scope.cubeMetaFrame.rowkey.rowkey_columns,function(rowkey){
-            if(!rowkey.dictionary){
-                rowkey.dictionary = "false";
-            }
-        }
-    );
-    //edit model
-    if($scope.state.mode==="edit") {
-        $scope.metaModel = MetaModel;
+  //convert some undefined or null value
+  angular.forEach($scope.cubeMetaFrame.rowkey.rowkey_columns, function (rowkey) {
+      if (!rowkey.dictionary) {
+        rowkey.dictionary = "false";
+      }
     }
+  );
+  //edit model
+  if ($scope.state.mode === "edit") {
+    $scope.metaModel = MetaModel;
+  }
 
 
-    $scope.dictionaryUpdated = function(rowkey_column){
-        if(rowkey_column.dictionary==="true"){
-            rowkey_column.length=0;
-        }
-
+  $scope.dictionaryUpdated = function (rowkey_column) {
+    if (rowkey_column.dictionary === "true") {
+      rowkey_column.length = 0;
     }
+
+  }
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/cubeDimensions.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeDimensions.js b/webapp/app/js/controllers/cubeDimensions.js
index f323d1f..77f8523 100644
--- a/webapp/app/js/controllers/cubeDimensions.js
+++ b/webapp/app/js/controllers/cubeDimensions.js
@@ -14,389 +14,388 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
-KylinApp.controller('CubeDimensionsCtrl', function ($scope, $modal,MetaModel) {
+KylinApp.controller('CubeDimensionsCtrl', function ($scope, $modal, MetaModel) {
 
-    // Available columns list derived from cube data model.
-    $scope.availableColumns = {};
+  // Available columns list derived from cube data model.
+  $scope.availableColumns = {};
 
-    // Columns selected and disabled status bound to UI, group by table.
-    $scope.selectedColumns = {};
+  // Columns selected and disabled status bound to UI, group by table.
+  $scope.selectedColumns = {};
 
-    // Available tables cache: 1st is the fact table, next are lookup tables.
-    $scope.availableTables = [];
+  // Available tables cache: 1st is the fact table, next are lookup tables.
+  $scope.availableTables = [];
 
 
-    /**
-     * Helper func to get columns that dimensions based on, three cases:
-     * 1. normal dimension: column array.
-     * 2. hierarchy dimension: column array, the array index is the hierarchy level.
-     * 3. derived dimension: derived columns array.
-     * TODO new cube schema change
-     */
-    var dimCols = function (dim) {
-        var referredCols = [];
+  /**
+   * Helper func to get columns that dimensions based on, three cases:
+   * 1. normal dimension: column array.
+   * 2. hierarchy dimension: column array, the array index is the hierarchy level.
+   * 3. derived dimension: derived columns array.
+   * TODO new cube schema change
+   */
+  var dimCols = function (dim) {
+    var referredCols = [];
 
-        // Case 3.
-        if (dim.derived && dim.derived.length) {
-            referredCols = referredCols.concat(dim.derived);
-        }
-
-        // Case 2.
-        if (dim.hierarchy && dim.column.length) {
-            referredCols = referredCols.concat(dim.column);
-        }
-
-        // Case 1.
-        if (!dim.derived && !dim.hierarchy) {
-            referredCols.push(dim.column);
-        }
+    // Case 3.
+    if (dim.derived && dim.derived.length) {
+      referredCols = referredCols.concat(dim.derived);
+    }
 
-        return referredCols;
-    };
+    // Case 2.
+    if (dim.hierarchy && dim.column.length) {
+      referredCols = referredCols.concat(dim.column);
+    }
 
-    // Dump available columns plus column table name, whether is from lookup table.
-    $scope.initColumns = function () {
-        var factTable = $scope.metaModel.model.fact_table;
+    // Case 1.
+    if (!dim.derived && !dim.hierarchy) {
+      referredCols.push(dim.column);
+    }
 
-        // At first dump the columns of fact table.
-        var cols = $scope.getColumnsByTable(factTable);
+    return referredCols;
+  };
 
-        // Initialize selected available.
-        var factAvailable = {};
-        var factSelectAvailable = {};
+  // Dump available columns plus column table name, whether is from lookup table.
+  $scope.initColumns = function () {
+    var factTable = $scope.metaModel.model.fact_table;
 
-        for (var i = 0; i < cols.length; i++) {
-            cols[i].table = factTable;
-            cols[i].isLookup = false;
+    // At first dump the columns of fact table.
+    var cols = $scope.getColumnsByTable(factTable);
 
-            factAvailable[cols[i].name] = cols[i];
+    // Initialize selected available.
+    var factAvailable = {};
+    var factSelectAvailable = {};
 
-            // Default not selected and not disabled.
-            factSelectAvailable[cols[i].name] = {selected: false, disabled: false};
-        }
+    for (var i = 0; i < cols.length; i++) {
+      cols[i].table = factTable;
+      cols[i].isLookup = false;
 
-        $scope.availableColumns[factTable] = factAvailable;
-        $scope.selectedColumns[factTable] = factSelectAvailable;
-        $scope.availableTables.push(factTable);
+      factAvailable[cols[i].name] = cols[i];
 
-        // Then dump each lookup tables.
-        var lookups = $scope.metaModel.model.lookups;
+      // Default not selected and not disabled.
+      factSelectAvailable[cols[i].name] = {selected: false, disabled: false};
+    }
 
-        for (var j = 0; j < lookups.length; j++) {
-            var cols2 = $scope.getColumnsByTable(lookups[j].table);
+    $scope.availableColumns[factTable] = factAvailable;
+    $scope.selectedColumns[factTable] = factSelectAvailable;
+    $scope.availableTables.push(factTable);
 
-            // Initialize selected available.
-            var lookupAvailable = {};
-            var lookupSelectAvailable = {};
+    // Then dump each lookup tables.
+    var lookups = $scope.metaModel.model.lookups;
 
-            for (var k = 0; k < cols2.length; k++) {
-                cols2[k].table = lookups[j].table;
-                cols2[k].isLookup = true;
+    for (var j = 0; j < lookups.length; j++) {
+      var cols2 = $scope.getColumnsByTable(lookups[j].table);
 
-                lookupAvailable[cols2[k].name] = cols2[k];
+      // Initialize selected available.
+      var lookupAvailable = {};
+      var lookupSelectAvailable = {};
 
-                // Default not selected and not disabled.
-                lookupSelectAvailable[cols2[k].name] = {selected: false, disabled: false};
-            }
+      for (var k = 0; k < cols2.length; k++) {
+        cols2[k].table = lookups[j].table;
+        cols2[k].isLookup = true;
 
-            $scope.availableColumns[lookups[j].table] = lookupAvailable;
-            $scope.selectedColumns[lookups[j].table] = lookupSelectAvailable;
-            $scope.availableTables.push(lookups[j].table);
-        }
-    };
+        lookupAvailable[cols2[k].name] = cols2[k];
 
-    // Check column status: selected or disabled based on current cube dimensions.
-    $scope.initColumnStatus = function () {
-        angular.forEach($scope.cubeMetaFrame.dimensions, function (dim) {
-            var cols = dimCols(dim);
+        // Default not selected and not disabled.
+        lookupSelectAvailable[cols2[k].name] = {selected: false, disabled: false};
+      }
 
-            angular.forEach(cols, function (colName) {
-                $scope.selectedColumns[dim.table][colName] = {selected: true, disabled: true};
-            });
-        });
-    };
-
-    // Initialize data for columns widget in auto-gen when add/edit cube.
-    if ($scope.state.mode == 'edit') {
-        $scope.initColumns();
+      $scope.availableColumns[lookups[j].table] = lookupAvailable;
+      $scope.selectedColumns[lookups[j].table] = lookupSelectAvailable;
+      $scope.availableTables.push(lookups[j].table);
     }
+  };
+
+  // Check column status: selected or disabled based on current cube dimensions.
+  $scope.initColumnStatus = function () {
+    angular.forEach($scope.cubeMetaFrame.dimensions, function (dim) {
+      var cols = dimCols(dim);
+
+      angular.forEach(cols, function (colName) {
+        $scope.selectedColumns[dim.table][colName] = {selected: true, disabled: true};
+      });
+    });
+  };
+
+  // Initialize data for columns widget in auto-gen when add/edit cube.
+  if ($scope.state.mode == 'edit') {
+    $scope.initColumns();
+  }
+
+  // Initialize params for add/edit dimension.
+  $scope.dimState = {
+    editing: false,
+    editingIndex: -1,
+    filter: ''
+  };
+
+  // Init the dimension, dimension name default as the column key. TODO new cube schema change.
+  var Dimension = function (table, selectedCols, dimType) {
+    var origin = {name: '', table: table, hierarchy: false, derived: null, column: null};
+
+    switch (dimType) {
+      case 'normal':
+        // Default name as 1st column name.
+        if (table && selectedCols.length) {
+          origin.name = table + '.' + selectedCols[0];
+        }
 
-    // Initialize params for add/edit dimension.
-    $scope.dimState = {
-        editing: false,
-        editingIndex: -1,
-        filter: ''
-    };
-
-    // Init the dimension, dimension name default as the column key. TODO new cube schema change.
-    var Dimension = function (table, selectedCols, dimType) {
-        var origin = {name: '', table: table,hierarchy:false,derived:null,column:null};
-
-        switch (dimType) {
-            case 'normal':
-                // Default name as 1st column name.
-                if (table && selectedCols.length) {
-                    origin.name = table + '.' + selectedCols[0];
-                }
+        origin.column = selectedCols;
+        break;
 
-                origin.column = selectedCols;
-                break;
+      case 'derived':
+        if (table && selectedCols.length) {
+          origin.name = table + '_derived';
+        }
 
-            case 'derived':
-                if (table && selectedCols.length) {
-                    origin.name = table + '_derived';
-                }
+        origin.derived = selectedCols;
+        break;
 
-                origin.derived = selectedCols;
-                break;
+      case 'hierarchy':
+        if (table && selectedCols.length) {
+          origin.name = table + '_hierarchy';
+        }
 
-            case 'hierarchy':
-                if (table && selectedCols.length) {
-                    origin.name = table + '_hierarchy';
-                }
+        origin.hierarchy = true;
+        origin.column = selectedCols;
+        break;
+    }
 
-                origin.hierarchy = true;
-                origin.column = selectedCols;
-                break;
-        }
+    return origin;
+  };
 
-        return origin;
-    };
+  // Since old schema may be both derived and hierarchy. TODO new cube schema change.
+  $scope.getDimType = function (dim) {
+    var types = [];
 
-    // Since old schema may be both derived and hierarchy. TODO new cube schema change.
-    $scope.getDimType = function (dim) {
-        var types = [];
+    if (dim.derived && dim.derived.length) {
+      types.push('derived');
+    }
 
-        if (dim.derived && dim.derived.length) {
-            types.push('derived');
-        }
+    if (dim.hierarchy && dim.column.length) {
+      types.push('hierarchy');
+    }
 
-        if (dim.hierarchy && dim.column.length) {
-            types.push('hierarchy');
-        }
+    if (!types.length) {
+      types.push('normal');
+    }
 
-        if (!types.length) {
-            types.push('normal');
+    return types;
+  };
+
+  var dimList = $scope.cubeMetaFrame.dimensions;
+
+  // Open add/edit dimension modal.
+  $scope.openDimModal = function (dimType) {
+    var modalInstance = $modal.open({
+      templateUrl: 'addEditDimension.html',
+      controller: cubeDimModalCtrl,
+      backdrop: 'static',
+      scope: $scope,
+      resolve: {
+        dimType: function () {
+          // For old schema compatibility, convert into array here. TODO new cube schema change.
+          return angular.isArray(dimType) ? dimType : [dimType];
         }
-
-        return types;
+      }
+    });
+
+    modalInstance.result.then(function () {
+      if (!$scope.dimState.editing) {
+        $scope.doneAddDim();
+      } else {
+        $scope.doneEditDim();
+      }
+
+    }, function () {
+      $scope.cancelDim();
+    });
+  };
+
+  // Controller for cube dimension add/edit modal.
+  var cubeDimModalCtrl = function ($scope, $modalInstance, dimType) {
+    $scope.dimType = dimType;
+
+    $scope.ok = function () {
+      $modalInstance.close();
     };
 
-    var dimList = $scope.cubeMetaFrame.dimensions;
-
-    // Open add/edit dimension modal.
-    $scope.openDimModal = function (dimType) {
-        var modalInstance = $modal.open({
-            templateUrl: 'addEditDimension.html',
-            controller: cubeDimModalCtrl,
-            backdrop: 'static',
-            scope: $scope,
-            resolve: {
-                dimType: function () {
-                    // For old schema compatibility, convert into array here. TODO new cube schema change.
-                    return angular.isArray(dimType) ? dimType : [dimType];
-                }
-            }
-        });
-
-        modalInstance.result.then(function () {
-            if (!$scope.dimState.editing) {
-                $scope.doneAddDim();
-            } else {
-                $scope.doneEditDim();
-            }
-
-        }, function () {
-            $scope.cancelDim();
-        });
+    $scope.cancel = function () {
+      $modalInstance.dismiss('cancel');
     };
+  };
 
-    // Controller for cube dimension add/edit modal.
-    var cubeDimModalCtrl = function ($scope, $modalInstance, dimType) {
-        $scope.dimType = dimType;
+  $scope.addDim = function (dimType) {
+    $scope.newDimension = Dimension('', [], dimType);
 
-        $scope.ok = function () {
-            $modalInstance.close();
-        };
+    $scope.openDimModal(dimType);
+  };
 
-        $scope.cancel = function () {
-            $modalInstance.dismiss('cancel');
-        };
-    };
+  $scope.editDim = function (dim) {
+    $scope.dimState.editingIndex = dimList.indexOf(dim);
+    $scope.dimState.editing = true;
 
-    $scope.addDim = function (dimType) {
-        $scope.newDimension = Dimension('', [], dimType);
+    // Make a copy of model will be editing.
+    $scope.newDimension = angular.copy(dim);
 
-        $scope.openDimModal(dimType);
-    };
+    $scope.openDimModal($scope.getDimType(dim));
+  };
 
-    $scope.editDim = function (dim) {
-        $scope.dimState.editingIndex = dimList.indexOf(dim);
-        $scope.dimState.editing = true;
+  $scope.doneAddDim = function () {
+    // Push new dimension which bound user input data.
+    dimList.push(angular.copy($scope.newDimension));
 
-        // Make a copy of model will be editing.
-        $scope.newDimension = angular.copy(dim);
+    $scope.resetParams();
+  };
 
-        $scope.openDimModal($scope.getDimType(dim));
-    };
+  $scope.doneEditDim = function () {
+    // Copy edited model to destination model.
+    angular.copy($scope.newDimension, dimList[$scope.dimState.editingIndex]);
 
-    $scope.doneAddDim = function () {
-        // Push new dimension which bound user input data.
-        dimList.push(angular.copy($scope.newDimension));
+    $scope.resetParams();
+  };
 
-        $scope.resetParams();
-    };
+  $scope.cancelDim = function () {
+    $scope.resetParams();
+  };
 
-    $scope.doneEditDim = function () {
-        // Copy edited model to destination model.
-        angular.copy($scope.newDimension, dimList[$scope.dimState.editingIndex]);
+  $scope.removeDim = function (dim) {
+    dimList.splice(dimList.indexOf(dim), 1);
+  };
 
-        $scope.resetParams();
-    };
+  $scope.resetParams = function () {
+    $scope.dimState.editing = false;
+    $scope.dimState.editingIndex = -1;
 
-    $scope.cancelDim = function () {
-        $scope.resetParams();
-    };
+    $scope.newDimension = {};
+  };
 
-    $scope.removeDim = function (dim) {
-        dimList.splice(dimList.indexOf(dim), 1);
-    };
+  // Open auto-gen dimension modal.
+  $scope.openAutoGenModal = function (dimType) {
+    // Init columns status.
+    $scope.initColumnStatus();
 
-    $scope.resetParams = function () {
-        $scope.dimState.editing = false;
-        $scope.dimState.editingIndex = -1;
+    var modalInstance = $modal.open({
+      templateUrl: 'autoGenDimension.html',
+      controller: cubeAutoGenDimModalCtrl,
+      backdrop: 'static',
+      scope: $scope
+    });
 
-        $scope.newDimension = {};
-    };
+    modalInstance.result.then(function () {
+      $scope.autoGenDims();
+    }, function () {
+      $scope.resetGenDims();
+    });
+  };
 
-    // Open auto-gen dimension modal.
-    $scope.openAutoGenModal = function (dimType) {
-        // Init columns status.
-        $scope.initColumnStatus();
-
-        var modalInstance = $modal.open({
-            templateUrl: 'autoGenDimension.html',
-            controller: cubeAutoGenDimModalCtrl,
-            backdrop: 'static',
-            scope: $scope
-        });
-
-        modalInstance.result.then(function () {
-            $scope.autoGenDims();
-        }, function () {
-            $scope.resetGenDims();
-        });
+  // Controller for cube dimension auto-gen modal.
+  var cubeAutoGenDimModalCtrl = function ($scope, $modalInstance) {
+    $scope.ok = function () {
+      $modalInstance.close();
     };
 
-    // Controller for cube dimension auto-gen modal.
-    var cubeAutoGenDimModalCtrl = function ($scope, $modalInstance) {
-        $scope.ok = function () {
-            $modalInstance.close();
-        };
-
-        $scope.cancel = function () {
-            $modalInstance.dismiss('cancel');
-        };
+    $scope.cancel = function () {
+      $modalInstance.dismiss('cancel');
     };
+  };
 
-    // Helper func to get the selected status in auto gen.
-    $scope.getSelectedCols = function () {
-        var selectedCols = {};
+  // Helper func to get the selected status in auto gen.
+  $scope.getSelectedCols = function () {
+    var selectedCols = {};
 
-        angular.forEach($scope.selectedColumns, function (value, table) {
-            angular.forEach(value, function (status, colName) {
-                if (status.selected && !status.disabled) {
-                    if (!selectedCols[table]) {
-                        selectedCols[table] = [];
-                    }
+    angular.forEach($scope.selectedColumns, function (value, table) {
+      angular.forEach(value, function (status, colName) {
+        if (status.selected && !status.disabled) {
+          if (!selectedCols[table]) {
+            selectedCols[table] = [];
+          }
 
-                    selectedCols[table].push(colName);
-                }
-            });
-        });
-
-        return selectedCols;
-    };
-
-    // Auto generate dimensions.
-    $scope.autoGenDims = function () {
-        var selectedCols = $scope.getSelectedCols();
-
-        angular.forEach(selectedCols, function (cols, table) {
-            if ($scope.metaModel.model.fact_table == table) {
-                // Fact table: for each selected column, create one normal dimension.
-                for (var i = 0; i < cols.length; i++) {
-                    dimList.push(Dimension(table, [cols[i]], 'normal'));
-                }
-            } else {
-                // Per lookup table, create one derived dimension for all its selected columns;
-                if (cols.length) {
-                    dimList.push(Dimension(table, cols, 'derived'));
-                }
-            }
-        });
-    };
-
-    // Just reset the selected status of columns.
-    $scope.resetGenDims = function () {
-        var selectedCols = $scope.getSelectedCols();
+          selectedCols[table].push(colName);
+        }
+      });
+    });
 
-        angular.forEach(selectedCols, function (cols, table) {
-            for (var i = 0; i < cols.length; i++) {
-                $scope.selectedColumns[table][cols[i]].selected = false;
-            }
-        });
-    };
+    return selectedCols;
+  };
 
-    // Check whether there is column conflicts.
-    $scope.dimConflicts = [];
+  // Auto generate dimensions.
+  $scope.autoGenDims = function () {
+    var selectedCols = $scope.getSelectedCols();
 
-    $scope.$watch('cubeMetaFrame.dimensions', function (newVal, oldVal) {
-        if (!newVal || !newVal.length) {
-            return;
+    angular.forEach(selectedCols, function (cols, table) {
+      if ($scope.metaModel.model.fact_table == table) {
+        // Fact table: for each selected column, create one normal dimension.
+        for (var i = 0; i < cols.length; i++) {
+          dimList.push(Dimension(table, [cols[i]], 'normal'));
         }
+      } else {
+        // Per lookup table, create one derived dimension for all its selected columns;
+        if (cols.length) {
+          dimList.push(Dimension(table, cols, 'derived'));
+        }
+      }
+    });
+  };
+
+  // Just reset the selected status of columns.
+  $scope.resetGenDims = function () {
+    var selectedCols = $scope.getSelectedCols();
+
+    angular.forEach(selectedCols, function (cols, table) {
+      for (var i = 0; i < cols.length; i++) {
+        $scope.selectedColumns[table][cols[i]].selected = false;
+      }
+    });
+  };
+
+  // Check whether there is column conflicts.
+  $scope.dimConflicts = [];
+
+  $scope.$watch('cubeMetaFrame.dimensions', function (newVal, oldVal) {
+    if (!newVal || !newVal.length) {
+      return;
+    }
 
-        var referredCols = {};
-
-        angular.forEach(newVal, function (curDim) {
-            var table = curDim.table;
-            var cols = dimCols(curDim);
+    var referredCols = {};
 
-            for (var i = 0; i < cols.length; i++) {
-                var key = table + '.' + cols[i];
+    angular.forEach(newVal, function (curDim) {
+      var table = curDim.table;
+      var cols = dimCols(curDim);
 
-                if (!referredCols[key]) {
-                    referredCols[key] = [];
-                }
+      for (var i = 0; i < cols.length; i++) {
+        var key = table + '.' + cols[i];
 
-                referredCols[key].push({id: curDim.id, name: curDim.name});
-            }
-        });
+        if (!referredCols[key]) {
+          referredCols[key] = [];
+        }
 
-        var conflicts = [];
+        referredCols[key].push({id: curDim.id, name: curDim.name});
+      }
+    });
 
-        angular.forEach(referredCols, function (dims, key) {
-            if (dims.length > 1) {
-                // More than 1 dimensions has referred this column.
-                var colInfo = key.split('.');
-                conflicts.push({table: colInfo[0], column: colInfo[1], dims: dims});
-            }
-        });
+    var conflicts = [];
 
-        $scope.dimConflicts = conflicts;
-    }, true);
+    angular.forEach(referredCols, function (dims, key) {
+      if (dims.length > 1) {
+        // More than 1 dimensions has referred this column.
+        var colInfo = key.split('.');
+        conflicts.push({table: colInfo[0], column: colInfo[1], dims: dims});
+      }
+    });
 
+    $scope.dimConflicts = conflicts;
+  }, true);
 
 
-    if ($scope.state.mode == 'edit') {
-        $scope.$on('$destroy', function () {
-           // $scope.dimensionsAdapter();
-            // Emit dimensions edit event in order to re-generate row key.
-            $scope.$emit('DimensionsEdited');
-        });
-    }
+  if ($scope.state.mode == 'edit') {
+    $scope.$on('$destroy', function () {
+      // $scope.dimensionsAdapter();
+      // Emit dimensions edit event in order to re-generate row key.
+      $scope.$emit('DimensionsEdited');
+    });
+  }
 });


[07/39] incubator-kylin git commit: KYLIN-669 change pom for release

Posted by li...@apache.org.
KYLIN-669 change pom for release


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

Branch: refs/heads/staging
Commit: 4e1d09863026c78c4323771c4be5bc4ef2864a0b
Parents: f196ec1
Author: lukehan <lu...@apache.org>
Authored: Tue Apr 14 14:23:56 2015 +0800
Committer: lukehan <lu...@apache.org>
Committed: Tue Apr 14 14:23:56 2015 +0800

----------------------------------------------------------------------
 atopcalcite/pom.xml   | 2 +-
 common/pom.xml        | 2 +-
 cube/pom.xml          | 2 +-
 dictionary/pom.xml    | 2 +-
 invertedindex/pom.xml | 2 +-
 jdbc/pom.xml          | 2 +-
 job/pom.xml           | 2 +-
 metadata/pom.xml      | 2 +-
 query/pom.xml         | 2 +-
 server/pom.xml        | 2 +-
 storage/pom.xml       | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4e1d0986/atopcalcite/pom.xml
----------------------------------------------------------------------
diff --git a/atopcalcite/pom.xml b/atopcalcite/pom.xml
index 5365518..cf06b15 100644
--- a/atopcalcite/pom.xml
+++ b/atopcalcite/pom.xml
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.apache.kylin</groupId>
         <artifactId>kylin</artifactId>
-        <version>0.7.1-SNAPSHOT</version>
+        <version>0.7.1-incubating-SNAPSHOT</version>
     </parent>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4e1d0986/common/pom.xml
----------------------------------------------------------------------
diff --git a/common/pom.xml b/common/pom.xml
index 97fb50a..717d899 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.apache.kylin</groupId>
         <artifactId>kylin</artifactId>
-        <version>0.7.1-SNAPSHOT</version>
+        <version>0.7.1-incubating-SNAPSHOT</version>
     </parent>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4e1d0986/cube/pom.xml
----------------------------------------------------------------------
diff --git a/cube/pom.xml b/cube/pom.xml
index 7dae4e0..0fdd708 100644
--- a/cube/pom.xml
+++ b/cube/pom.xml
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.apache.kylin</groupId>
         <artifactId>kylin</artifactId>
-        <version>0.7.1-SNAPSHOT</version>
+        <version>0.7.1-incubating-SNAPSHOT</version>
     </parent>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4e1d0986/dictionary/pom.xml
----------------------------------------------------------------------
diff --git a/dictionary/pom.xml b/dictionary/pom.xml
index e6ae5d5..524a52f 100644
--- a/dictionary/pom.xml
+++ b/dictionary/pom.xml
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.apache.kylin</groupId>
         <artifactId>kylin</artifactId>
-        <version>0.7.1-SNAPSHOT</version>
+        <version>0.7.1-incubating-SNAPSHOT</version>
     </parent>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4e1d0986/invertedindex/pom.xml
----------------------------------------------------------------------
diff --git a/invertedindex/pom.xml b/invertedindex/pom.xml
index 2c258ea..6b3ffe0 100644
--- a/invertedindex/pom.xml
+++ b/invertedindex/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <artifactId>kylin</artifactId>
         <groupId>org.apache.kylin</groupId>
-        <version>0.7.1-SNAPSHOT</version>
+        <version>0.7.1-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>kylin-invertedindex</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4e1d0986/jdbc/pom.xml
----------------------------------------------------------------------
diff --git a/jdbc/pom.xml b/jdbc/pom.xml
index f0829da..24feef9 100644
--- a/jdbc/pom.xml
+++ b/jdbc/pom.xml
@@ -27,7 +27,7 @@
 	<parent>
 		<groupId>org.apache.kylin</groupId>
 		<artifactId>kylin</artifactId>
-		<version>0.7.1-SNAPSHOT</version>
+		<version>0.7.1-incubating-SNAPSHOT</version>
 	</parent>
 
 	<properties>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4e1d0986/job/pom.xml
----------------------------------------------------------------------
diff --git a/job/pom.xml b/job/pom.xml
index bfc73bb..57a80ec 100644
--- a/job/pom.xml
+++ b/job/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.kylin</groupId>
         <artifactId>kylin</artifactId>
-        <version>0.7.1-SNAPSHOT</version>
+        <version>0.7.1-incubating-SNAPSHOT</version>
     </parent>
 
     <artifactId>kylin-job</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4e1d0986/metadata/pom.xml
----------------------------------------------------------------------
diff --git a/metadata/pom.xml b/metadata/pom.xml
index 505e5fe..e10777a 100644
--- a/metadata/pom.xml
+++ b/metadata/pom.xml
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.apache.kylin</groupId>
         <artifactId>kylin</artifactId>
-        <version>0.7.1-SNAPSHOT</version>
+        <version>0.7.1-incubating-SNAPSHOT</version>
     </parent>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4e1d0986/query/pom.xml
----------------------------------------------------------------------
diff --git a/query/pom.xml b/query/pom.xml
index 5a45a3b..6cec58b 100644
--- a/query/pom.xml
+++ b/query/pom.xml
@@ -28,7 +28,7 @@
     <parent>
         <groupId>org.apache.kylin</groupId>
         <artifactId>kylin</artifactId>
-        <version>0.7.1-SNAPSHOT</version>
+        <version>0.7.1-incubating-SNAPSHOT</version>
     </parent>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4e1d0986/server/pom.xml
----------------------------------------------------------------------
diff --git a/server/pom.xml b/server/pom.xml
index 6866879..8fc03b3 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -28,7 +28,7 @@
     <parent>
         <groupId>org.apache.kylin</groupId>
         <artifactId>kylin</artifactId>
-        <version>0.7.1-SNAPSHOT</version>
+        <version>0.7.1-incubating-SNAPSHOT</version>
     </parent>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4e1d0986/storage/pom.xml
----------------------------------------------------------------------
diff --git a/storage/pom.xml b/storage/pom.xml
index 75de3a8..705df50 100644
--- a/storage/pom.xml
+++ b/storage/pom.xml
@@ -26,7 +26,7 @@
     <parent>
         <groupId>org.apache.kylin</groupId>
         <artifactId>kylin</artifactId>
-        <version>0.7.1-SNAPSHOT</version>
+        <version>0.7.1-incubating-SNAPSHOT</version>
     </parent>
 
     <dependencies>


[20/39] incubator-kylin git commit: update website

Posted by li...@apache.org.
update website


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

Branch: refs/heads/staging
Commit: d046f6a3c84c3a5553beeeb46838c191de793215
Parents: bb5e52c
Author: lukehan <lu...@apache.org>
Authored: Sun Apr 19 22:17:57 2015 +0800
Committer: lukehan <lu...@apache.org>
Committed: Thu Apr 23 23:05:17 2015 +0800

----------------------------------------------------------------------
 docs/website/blog/index.md | 43 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/d046f6a3/docs/website/blog/index.md
----------------------------------------------------------------------
diff --git a/docs/website/blog/index.md b/docs/website/blog/index.md
new file mode 100644
index 0000000..a272bd6
--- /dev/null
+++ b/docs/website/blog/index.md
@@ -0,0 +1,43 @@
+---
+layout: default
+title: Blog
+---
+
+
+<main id="main" >
+<section id="first" class="main">
+    <header style="padding:2em 0 4em 0;">
+      <div class="container" >
+        <h4 class="section-title"><span> Kylin Technical Blog </span></h4>
+         <!-- second-->
+          <div id="content-container" class="animated fadeIn">
+            <div >
+            <!--
+            <p class="aboutkylin" style="font-size:1.2em">Comming Soon...</p>
+            -->
+             <ul class="post-list">
+            {% for post in site.posts %}
+            <li>
+            <!--
+            <span align="left" class="content-header">{{ post.date | date: "%b %-d, %Y" }}</span>
+            -->
+            <p>{{post.url}}</p>
+        <h2 align="left">
+          <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
+        </h2>
+      </li>
+    {% endfor %}
+  </ul>
+
+  <p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
+          </div>
+        </div>
+      </div>
+      <!-- /container --> 
+      
+    </header>
+  </section>
+
+  
+    
+</main>


[13/39] incubator-kylin git commit: Merge pull request #456 from janzhongi/ori_staging

Posted by li...@apache.org.
Merge pull request #456 from janzhongi/ori_staging

KYLIN-695

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

Branch: refs/heads/staging
Commit: 9304cb24fbe968e82ebfbeeae4a3b1c4efad7a99
Parents: 37f44f8 d4d7cef
Author: Zhong,Jian <ji...@ebay.com>
Authored: Thu Apr 16 18:03:18 2015 +0800
Committer: Zhong,Jian <ji...@ebay.com>
Committed: Thu Apr 16 18:03:18 2015 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubes.js   | 4 ++++
 webapp/app/partials/cubes/cubes.html | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[10/39] incubator-kylin git commit: KYLIN-691

Posted by li...@apache.org.
KYLIN-691


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

Branch: refs/heads/staging
Commit: 325c275da54887f1df4c17bfa4ffc46ecec7370c
Parents: 52a8e5c
Author: jiazhong <ji...@ebay.com>
Authored: Wed Apr 15 22:18:01 2015 +0800
Committer: jiazhong <ji...@ebay.com>
Committed: Wed Apr 15 22:18:01 2015 +0800

----------------------------------------------------------------------
 script/download-tomcat.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/325c275d/script/download-tomcat.sh
----------------------------------------------------------------------
diff --git a/script/download-tomcat.sh b/script/download-tomcat.sh
index 77be1bf..5632455 100755
--- a/script/download-tomcat.sh
+++ b/script/download-tomcat.sh
@@ -8,13 +8,13 @@ rm -rf tomcat
 if [ ! -f "apache-tomcat-7.0.59.tar.gz" ]
 then
     echo "not binary file found"
-    wget http://mirror.sdunix.com/apache/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz || echo "download tomcat failed"
+    wget  http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz || echo "download tomcat failed"
 else
     if [ `md5sum apache-tomcat-7.0.59.tar.gz | awk '{print $1}'` != "ec570258976edf9a833cd88fd9220909" ]
     then
         echo "md5 check failed"
         rm apache-tomcat-7.0.59.tar.gz
-        wget http://mirror.sdunix.com/apache/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz || echo "download tomcat failed"
+        wget  http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz || echo "download tomcat failed"
     fi
 fi
 


[11/39] incubator-kylin git commit: Merge pull request #455 from janzhongi/ori_staging

Posted by li...@apache.org.
Merge pull request #455 from janzhongi/ori_staging

KYLIN-691

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

Branch: refs/heads/staging
Commit: 37f44f88047b125e03715aa3d2790f02b99145a5
Parents: 52a8e5c 325c275
Author: Zhong,Jian <ji...@ebay.com>
Authored: Wed Apr 15 22:20:14 2015 +0800
Committer: Zhong,Jian <ji...@ebay.com>
Committed: Wed Apr 15 22:20:14 2015 +0800

----------------------------------------------------------------------
 script/download-tomcat.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[38/39] incubator-kylin git commit: KYLIN-715 modify license format for .sql files

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query29.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query29.sql b/query/src/test/resources/query/sql/query29.sql
index 98a7a14..b2e9c9d 100644
--- a/query/src/test/resources/query/sql/query29.sql
+++ b/query/src/test/resources/query/sql/query29.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query30.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query30.sql b/query/src/test/resources/query/sql/query30.sql
index 92220d6..35e37a1 100644
--- a/query/src/test/resources/query/sql/query30.sql
+++ b/query/src/test/resources/query/sql/query30.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select sum(price) as GMV, count(1) as TRANS_CNT from test_kylin_fact limit 50 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query31.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query31.sql b/query/src/test/resources/query/sql/query31.sql
index aea1248..faa7863 100644
--- a/query/src/test/resources/query/sql/query31.sql
+++ b/query/src/test/resources/query/sql/query31.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query32.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query32.sql b/query/src/test/resources/query/sql/query32.sql
index a99892f..c389cbe 100644
--- a/query/src/test/resources/query/sql/query32.sql
+++ b/query/src/test/resources/query/sql/query32.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query33.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query33.sql b/query/src/test/resources/query/sql/query33.sql
index 29e56c4..ff56aee 100644
--- a/query/src/test/resources/query/sql/query33.sql
+++ b/query/src/test/resources/query/sql/query33.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_kylin_fact.seller_id 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query34.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query34.sql b/query/src/test/resources/query/sql/query34.sql
index 54934b0..821df2c 100644
--- a/query/src/test/resources/query/sql/query34.sql
+++ b/query/src/test/resources/query/sql/query34.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query35.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query35.sql b/query/src/test/resources/query/sql/query35.sql
index ddbf1f8..c744f73 100644
--- a/query/src/test/resources/query/sql/query35.sql
+++ b/query/src/test/resources/query/sql/query35.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query36.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query36.sql b/query/src/test/resources/query/sql/query36.sql
index d208ac2..74b8ede 100644
--- a/query/src/test/resources/query/sql/query36.sql
+++ b/query/src/test/resources/query/sql/query36.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query37.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query37.sql b/query/src/test/resources/query/sql/query37.sql
index 4de4a29..eebd515 100644
--- a/query/src/test/resources/query/sql/query37.sql
+++ b/query/src/test/resources/query/sql/query37.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query38.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query38.sql b/query/src/test/resources/query/sql/query38.sql
index 7bb77eb..8a832f3 100644
--- a/query/src/test/resources/query/sql/query38.sql
+++ b/query/src/test/resources/query/sql/query38.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query39.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query39.sql b/query/src/test/resources/query/sql/query39.sql
index 5ac5bf6..75155ec 100644
--- a/query/src/test/resources/query/sql/query39.sql
+++ b/query/src/test/resources/query/sql/query39.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select sum(price) as GMV 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query40.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query40.sql b/query/src/test/resources/query/sql/query40.sql
index cc68d3b..74484cc 100644
--- a/query/src/test/resources/query/sql/query40.sql
+++ b/query/src/test/resources/query/sql/query40.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select cal_dt, lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query41.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query41.sql b/query/src/test/resources/query/sql/query41.sql
index d6b602a..8b4d566 100644
--- a/query/src/test/resources/query/sql/query41.sql
+++ b/query/src/test/resources/query/sql/query41.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query42.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query42.sql b/query/src/test/resources/query/sql/query42.sql
index 3691c8d..fa31b0b 100644
--- a/query/src/test/resources/query/sql/query42.sql
+++ b/query/src/test/resources/query/sql/query42.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.cal_dt, count(*) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query43.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query43.sql b/query/src/test/resources/query/sql/query43.sql
index 865e2c7..36a2594 100644
--- a/query/src/test/resources/query/sql/query43.sql
+++ b/query/src/test/resources/query/sql/query43.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.cal_dt, count(*) as CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query44.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query44.sql b/query/src/test/resources/query/sql/query44.sql
index 49a4b02..b5227cc 100644
--- a/query/src/test/resources/query/sql/query44.sql
+++ b/query/src/test/resources/query/sql/query44.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query45.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query45.sql b/query/src/test/resources/query/sql/query45.sql
index ee617e5..ea964ae 100644
--- a/query/src/test/resources/query/sql/query45.sql
+++ b/query/src/test/resources/query/sql/query45.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select count(*) as CNT from edw.test_cal_dt 
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query46.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query46.sql b/query/src/test/resources/query/sql/query46.sql
index b6fba2d..3bfe9d9 100644
--- a/query/src/test/resources/query/sql/query46.sql
+++ b/query/src/test/resources/query/sql/query46.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select count(*) as CNT  from test_category_groupings

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query47.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query47.sql b/query/src/test/resources/query/sql/query47.sql
index f1d78ce..cbd2c6d 100644
--- a/query/src/test/resources/query/sql/query47.sql
+++ b/query/src/test/resources/query/sql/query47.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select count(*) as CNT  from edw.test_seller_type_dim

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query48.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query48.sql b/query/src/test/resources/query/sql/query48.sql
index d67f70c..54ddb31 100644
--- a/query/src/test/resources/query/sql/query48.sql
+++ b/query/src/test/resources/query/sql/query48.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select count(*) as CNT from edw.test_sites

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query49.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query49.sql b/query/src/test/resources/query/sql/query49.sql
index 3cd66cf..a28beb6 100644
--- a/query/src/test/resources/query/sql/query49.sql
+++ b/query/src/test/resources/query/sql/query49.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query50.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query50.sql b/query/src/test/resources/query/sql/query50.sql
index f6300a4..89e7b80 100644
--- a/query/src/test/resources/query/sql/query50.sql
+++ b/query/src/test/resources/query/sql/query50.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query51.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query51.sql b/query/src/test/resources/query/sql/query51.sql
index 2069abd..83b2bec 100644
--- a/query/src/test/resources/query/sql/query51.sql
+++ b/query/src/test/resources/query/sql/query51.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query52.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query52.sql b/query/src/test/resources/query/sql/query52.sql
index 8d9cff4..192f6b9 100644
--- a/query/src/test/resources/query/sql/query52.sql
+++ b/query/src/test/resources/query/sql/query52.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query53.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query53.sql b/query/src/test/resources/query/sql/query53.sql
index 088cc15..b835ec0 100644
--- a/query/src/test/resources/query/sql/query53.sql
+++ b/query/src/test/resources/query/sql/query53.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.cal_dt,test_kylin_fact.seller_id, sum(test_kylin_fact.price) as GMV
  , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query54.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query54.sql b/query/src/test/resources/query/sql/query54.sql
index 04c26cd..ddc2dac 100644
--- a/query/src/test/resources/query/sql/query54.sql
+++ b/query/src/test/resources/query/sql/query54.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query55.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query55.sql b/query/src/test/resources/query/sql/query55.sql
index 2b803f3..346a7d7 100644
--- a/query/src/test/resources/query/sql/query55.sql
+++ b/query/src/test/resources/query/sql/query55.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select count(*) as c from edw.test_cal_dt as test_cal_dt where extract(YEAR from test_cal_dt.cal_dt) = 2012

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query56.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query56.sql b/query/src/test/resources/query/sql/query56.sql
index dd42bdd..cd1130c 100644
--- a/query/src/test/resources/query/sql/query56.sql
+++ b/query/src/test/resources/query/sql/query56.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query57.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query57.sql b/query/src/test/resources/query/sql/query57.sql
index 5e730e3..de93ed8 100644
--- a/query/src/test/resources/query/sql/query57.sql
+++ b/query/src/test/resources/query/sql/query57.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query58.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query58.sql b/query/src/test/resources/query/sql/query58.sql
index 7d30866..945602d 100644
--- a/query/src/test/resources/query/sql/query58.sql
+++ b/query/src/test/resources/query/sql/query58.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select  sum(test_kylin_fact.price) as GMV
  , count(*) as TRANS_CNT

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query59.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query59.sql b/query/src/test/resources/query/sql/query59.sql
index 7870433..0731854 100644
--- a/query/src/test/resources/query/sql/query59.sql
+++ b/query/src/test/resources/query/sql/query59.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select sum(price) as GVM,lstg_format_name from test_kylin_fact group by lstg_format_name

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query60.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query60.sql b/query/src/test/resources/query/sql/query60.sql
index f1d4ac7..8507e63 100644
--- a/query/src/test/resources/query/sql/query60.sql
+++ b/query/src/test/resources/query/sql/query60.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.cal_dt, sum(test_kylin_fact.price) as sum_price, count(1) as cnt_1
 from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query61.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query61.sql b/query/src/test/resources/query/sql/query61.sql
index 19c3b95..652d3d2 100644
--- a/query/src/test/resources/query/sql/query61.sql
+++ b/query/src/test/resources/query/sql/query61.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select count(1) as cnt_1
 from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query62.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query62.sql b/query/src/test/resources/query/sql/query62.sql
index 1371674..7f195e1 100644
--- a/query/src/test/resources/query/sql/query62.sql
+++ b/query/src/test/resources/query/sql/query62.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV , min(cal_dt) as min_cal_dt
  , count(*) as TRANS_CNT from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query63.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query63.sql b/query/src/test/resources/query/sql/query63.sql
index 084822e..687cee7 100644
--- a/query/src/test/resources/query/sql/query63.sql
+++ b/query/src/test/resources/query/sql/query63.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select min(cal_dt) as min_cal_dt
  from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query64.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query64.sql b/query/src/test/resources/query/sql/query64.sql
index 77f5710..a7f877f 100644
--- a/query/src/test/resources/query/sql/query64.sql
+++ b/query/src/test/resources/query/sql/query64.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
  select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV , min(cal_dt) as min_cal_dt
  , count(*) as TRANS_CNT from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query65.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query65.sql b/query/src/test/resources/query/sql/query65.sql
index 98cb7ab..e20393b 100644
--- a/query/src/test/resources/query/sql/query65.sql
+++ b/query/src/test/resources/query/sql/query65.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select min(cal_dt) as min_cal_dt, max(cal_dt) as max_cal_dt from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query66.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query66.sql b/query/src/test/resources/query/sql/query66.sql
index 7889cbb..e8d51e6 100644
--- a/query/src/test/resources/query/sql/query66.sql
+++ b/query/src/test/resources/query/sql/query66.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.cal_dt, max(test_kylin_fact.cal_dt) as mmm from test_kylin_fact left join edw.test_cal_dt as test_cal_dt 
 	on test_kylin_fact.cal_dt=test_cal_dt.cal_dt group by test_kylin_fact.cal_dt order by 2 desc limit 7

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query67.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query67.sql b/query/src/test/resources/query/sql/query67.sql
index 1bc4424..e145d72 100644
--- a/query/src/test/resources/query/sql/query67.sql
+++ b/query/src/test/resources/query/sql/query67.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT (CASE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" WHEN 'Auction' THEN '111' ELSE '222' END) AS "LSTG_FORMAT_NAME__group_",
   SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok"

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query68.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query68.sql b/query/src/test/resources/query/sql/query68.sql
index fc5404f..30f9980 100644
--- a/query/src/test/resources/query/sql/query68.sql
+++ b/query/src/test/resources/query/sql/query68.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select cal_dt as bb , sum(price) as aa from test_kylin_fact fact
 inner join (

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query69.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query69.sql b/query/src/test/resources/query/sql/query69.sql
index 0a93d90..40377e3 100644
--- a/query/src/test/resources/query/sql/query69.sql
+++ b/query/src/test/resources/query/sql/query69.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, 
  sum(price) as GMV, 


[39/39] incubator-kylin git commit: KYLIN-715 modify license format for .sql files

Posted by li...@apache.org.
KYLIN-715 modify license format for .sql files


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

Branch: refs/heads/staging
Commit: 1219a08df92bc50bc078524deec288008d0d8cf2
Parents: df39c39
Author: qianhao.zhou <qi...@ebay.com>
Authored: Fri Apr 24 16:50:02 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Fri Apr 24 17:27:15 2015 +0800

----------------------------------------------------------------------
 examples/sample_cube/create_sample_tables.sql   | 34 +++++++++---------
 query/src/test/resources/query/h2/query07.sql   | 36 ++++++++++----------
 query/src/test/resources/query/h2/query09.sql   | 34 +++++++++---------
 query/src/test/resources/query/h2/query10.sql   | 34 +++++++++---------
 query/src/test/resources/query/sql/.gitignore   | 34 +++++++++---------
 query/src/test/resources/query/sql/query00.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query01.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query02.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query03.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query04.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query05.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query06.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query07.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query08.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query09.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query10.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query11.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query12.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query13.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query14.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query15.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query16.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query17.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query18.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query19.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query20.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query21.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query22.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query23.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query24.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query25.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query26.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query27.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query28.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query29.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query30.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query31.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query32.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query33.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query34.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query35.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query36.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query37.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query38.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query39.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query40.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query41.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query42.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query43.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query44.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query45.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query46.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query47.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query48.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query49.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query50.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query51.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query52.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query53.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query54.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query55.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query56.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query57.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query58.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query59.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query60.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query61.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query62.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query63.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query64.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query65.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query66.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query67.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query68.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query69.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query70.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query71.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query72.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query73.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query74.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query75.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query76.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query77.sql  | 34 +++++++++---------
 query/src/test/resources/query/sql/query78.sql  | 34 +++++++++---------
 .../resources/query/sql_all_types/query00.sql   | 34 +++++++++---------
 .../resources/query/sql_all_types/query01.sql   | 34 +++++++++---------
 .../resources/query/sql_all_types/query02.sql   | 34 +++++++++---------
 .../resources/query/sql_all_types/query03.sql   | 34 +++++++++---------
 .../resources/query/sql_all_types/query04.sql   | 34 +++++++++---------
 .../resources/query/sql_all_types/query05.sql   | 34 +++++++++---------
 .../resources/query/sql_all_types/query06.sql   | 34 +++++++++---------
 .../resources/query/sql_all_types/query07.sql   | 34 +++++++++---------
 .../resources/query/sql_all_types/query08.sql   | 34 +++++++++---------
 .../resources/query/sql_all_types/query09.sql   | 34 +++++++++---------
 .../resources/query/sql_casewhen/query01.sql    | 34 +++++++++---------
 .../resources/query/sql_casewhen/query02.sql    | 34 +++++++++---------
 .../resources/query/sql_casewhen/query03.sql    | 34 +++++++++---------
 .../query/sql_casewhen/query55.sql.disable      | 34 +++++++++---------
 .../resources/query/sql_casewhen/query56.sql    | 34 +++++++++---------
 .../resources/query/sql_derived/query01.sql     | 34 +++++++++---------
 .../resources/query/sql_derived/query02.sql     | 34 +++++++++---------
 .../resources/query/sql_derived/query03.sql     | 34 +++++++++---------
 .../resources/query/sql_derived/query04.sql     | 34 +++++++++---------
 .../resources/query/sql_derived/query05.sql     | 34 +++++++++---------
 .../resources/query/sql_derived/query06.sql     | 34 +++++++++---------
 .../resources/query/sql_derived/query07.sql     | 34 +++++++++---------
 .../query/sql_derived/query08.sql.disabled      | 34 +++++++++---------
 .../resources/query/sql_derived/query09.sql     | 34 +++++++++---------
 .../resources/query/sql_derived/query10.sql     | 34 +++++++++---------
 .../resources/query/sql_distinct/query00.sql    | 34 +++++++++---------
 .../resources/query/sql_distinct/query01.sql    | 34 +++++++++---------
 .../resources/query/sql_distinct/query02.sql    | 34 +++++++++---------
 .../resources/query/sql_distinct/query03.sql    | 34 +++++++++---------
 .../resources/query/sql_distinct/query04.sql    | 34 +++++++++---------
 .../resources/query/sql_distinct/query05.sql    | 34 +++++++++---------
 .../resources/query/sql_distinct/query06.sql    | 34 +++++++++---------
 .../resources/query/sql_distinct/query07.sql    | 34 +++++++++---------
 .../resources/query/sql_dynamic/query01.dat     | 34 +++++++++---------
 .../resources/query/sql_dynamic/query01.sql     | 34 +++++++++---------
 .../resources/query/sql_dynamic/query02.dat     | 34 +++++++++---------
 .../resources/query/sql_dynamic/query02.sql     | 34 +++++++++---------
 .../resources/query/sql_fast_common/query00.sql | 34 +++++++++---------
 .../test/resources/query/sql_hive/query01.sql   | 34 +++++++++---------
 .../test/resources/query/sql_hive/query10.sql   | 34 +++++++++---------
 .../src/test/resources/query/sql_ii/query01.sql | 34 +++++++++---------
 .../src/test/resources/query/sql_ii/query02.sql | 34 +++++++++---------
 .../src/test/resources/query/sql_ii/query03.sql | 34 +++++++++---------
 .../src/test/resources/query/sql_ii/query04.sql | 34 +++++++++---------
 .../src/test/resources/query/sql_ii/query05.sql | 34 +++++++++---------
 .../resources/query/sql_ii/query06.sql.disabled | 34 +++++++++---------
 .../resources/query/sql_ii/query07.sql.disabled | 34 +++++++++---------
 .../src/test/resources/query/sql_ii/query08.sql | 34 +++++++++---------
 .../src/test/resources/query/sql_ii/query09.sql | 34 +++++++++---------
 .../query/sql_invalid/query29_invalid_SQL.sql   | 34 +++++++++---------
 .../query/sql_invalid/query30_invalid_SQL.sql   | 34 +++++++++---------
 .../query/sql_invalid/query31_invalid_SQL.sql   | 34 +++++++++---------
 .../query/sql_invalid/query32_invalid_SQL.sql   | 34 +++++++++---------
 .../query/sql_invalid/query33_invalid_SQL.sql   | 34 +++++++++---------
 .../query/sql_invalid/query34_invalid_SQL.sql   | 34 +++++++++---------
 ...ery_count_distinct_on_dimension.sql.disabled | 34 +++++++++---------
 .../test/resources/query/sql_lookup/query01.sql | 34 +++++++++---------
 .../test/resources/query/sql_lookup/query02.sql | 34 +++++++++---------
 .../test/resources/query/sql_lookup/query03.sql | 34 +++++++++---------
 .../test/resources/query/sql_lookup/query04.sql | 34 +++++++++---------
 .../query/sql_optimize/enable-limit01.sql       | 34 +++++++++---------
 .../resources/query/sql_orderby/query01.sql     | 34 +++++++++---------
 .../resources/query/sql_orderby/query02.sql     | 34 +++++++++---------
 .../resources/query/sql_orderby/query03.sql     | 34 +++++++++---------
 .../resources/query/sql_subquery/query00.sql    | 34 +++++++++---------
 .../resources/query/sql_subquery/query01.sql    | 34 +++++++++---------
 .../query/sql_subquery/query02.sql.disable      | 34 +++++++++---------
 .../resources/query/sql_subquery/query03.sql    | 34 +++++++++---------
 .../resources/query/sql_subquery/query04.sql    | 34 +++++++++---------
 .../resources/query/sql_subquery/query05.sql    | 34 +++++++++---------
 .../resources/query/sql_subquery/query06.sql    | 34 +++++++++---------
 .../resources/query/sql_subquery/query07.sql    | 34 +++++++++---------
 .../resources/query/sql_tableau/query00.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query01.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query02.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query03.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query04.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query05.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query06.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query07.sql     | 34 +++++++++---------
 .../query/sql_tableau/query08.sql.disabled      | 34 +++++++++---------
 .../query/sql_tableau/query09.sql.disabled      | 34 +++++++++---------
 .../resources/query/sql_tableau/query10.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query11.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query12.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query13.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query14.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query15.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query16.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query17.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query18.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query19.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query20.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query21.sql     | 34 +++++++++---------
 .../query/sql_tableau/query22.sql.disabled      | 34 +++++++++---------
 .../resources/query/sql_tableau/query23.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query24.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query25.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query27.sql     | 34 +++++++++---------
 .../resources/query/sql_tableau/query67.sql     | 34 +++++++++---------
 .../resources/query/sql_verifyCount/query04.sql | 34 +++++++++---------
 .../query/sql_verifyCount/query04.sql.expected  | 34 +++++++++---------
 .../resources/query/sql_verifyCount/query05.sql | 34 +++++++++---------
 .../query/sql_verifyCount/query05.sql.expected  | 34 +++++++++---------
 .../resources/query/sql_verifyCount/query06.sql | 34 +++++++++---------
 .../query/sql_verifyCount/query06.sql.expected  | 34 +++++++++---------
 .../resources/query/sql_verifyCount/query07.sql | 34 +++++++++---------
 .../query/sql_verifyCount/query07.sql.expected  | 34 +++++++++---------
 .../resources/query/tableau_probing/query01.sql | 34 +++++++++---------
 .../resources/query/tableau_probing/query02.sql | 34 +++++++++---------
 .../resources/query/tableau_probing/query03.sql | 34 +++++++++---------
 .../resources/query/tableau_probing/query04.sql | 34 +++++++++---------
 .../resources/query/tableau_probing/query05.sql | 34 +++++++++---------
 .../resources/query/tableau_probing/query06.sql | 34 +++++++++---------
 .../resources/query/tableau_probing/query07.sql | 34 +++++++++---------
 webapp/.bowerrc                                 | 17 ---------
 webapp/.jshintrc                                | 17 ---------
 201 files changed, 3384 insertions(+), 3418 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/examples/sample_cube/create_sample_tables.sql
----------------------------------------------------------------------
diff --git a/examples/sample_cube/create_sample_tables.sql b/examples/sample_cube/create_sample_tables.sql
index d4ebb6a..943c0fa 100644
--- a/examples/sample_cube/create_sample_tables.sql
+++ b/examples/sample_cube/create_sample_tables.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 DROP TABLE IF EXISTS DEFAULT.KYLIN_CAL_DT;
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/h2/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/h2/query07.sql b/query/src/test/resources/query/h2/query07.sql
index e1403c4..9fd2b7f 100644
--- a/query/src/test/resources/query/h2/query07.sql
+++ b/query/src/test/resources/query/h2/query07.sql
@@ -1,21 +1,21 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
-select count(*) from ( select test_kylin_fact.lstg_format_name from test_kylin_fact 
+select count(*) from ( select test_kylin_fact.lstg_format_name from test_kylin_fact
  where test_kylin_fact.lstg_format_name='FP-GTC' 
  group by test_kylin_fact.lstg_format_name ) t 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/h2/query09.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/h2/query09.sql b/query/src/test/resources/query/h2/query09.sql
index 9605c8f..e6e5576 100644
--- a/query/src/test/resources/query/h2/query09.sql
+++ b/query/src/test/resources/query/h2/query09.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select count(*) from (select test_cal_dt.week_beg_dt 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/h2/query10.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/h2/query10.sql b/query/src/test/resources/query/h2/query10.sql
index 32f319c..9511363 100644
--- a/query/src/test/resources/query/h2/query10.sql
+++ b/query/src/test/resources/query/h2/query10.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.week_beg_dt 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/.gitignore
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/.gitignore b/query/src/test/resources/query/sql/.gitignore
index d05e0f8..a2e3507 100644
--- a/query/src/test/resources/query/sql/.gitignore
+++ b/query/src/test/resources/query/sql/.gitignore
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 /sample.txt
 /0000.sql

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query00.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query00.sql b/query/src/test/resources/query/sql/query00.sql
index ad07bd0..6e4d94b 100644
--- a/query/src/test/resources/query/sql/query00.sql
+++ b/query/src/test/resources/query/sql/query00.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query01.sql b/query/src/test/resources/query/sql/query01.sql
index 4b57536..5a53058 100644
--- a/query/src/test/resources/query/sql/query01.sql
+++ b/query/src/test/resources/query/sql/query01.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select LSTG_FORMAT_NAME, sum(price) as GMV, count(1) as TRANS_CNT from test_kylin_fact 
  group by LSTG_FORMAT_NAME 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query02.sql b/query/src/test/resources/query/sql/query02.sql
index 286cb04..8d27c93 100644
--- a/query/src/test/resources/query/sql/query02.sql
+++ b/query/src/test/resources/query/sql/query02.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select sum(price) as GMV, count(1) as TRANS_CNT from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query03.sql b/query/src/test/resources/query/sql/query03.sql
index f357cf4..a605594 100644
--- a/query/src/test/resources/query/sql/query03.sql
+++ b/query/src/test/resources/query/sql/query03.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name, sum(price) as GMV, count(*) as TRANS_CNT from test_kylin_fact 
  group by test_kylin_fact.lstg_format_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query04.sql b/query/src/test/resources/query/sql/query04.sql
index b515487..a3672f5 100644
--- a/query/src/test/resources/query/sql/query04.sql
+++ b/query/src/test/resources/query/sql/query04.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query05.sql b/query/src/test/resources/query/sql/query05.sql
index 283dcd6..512356a 100644
--- a/query/src/test/resources/query/sql/query05.sql
+++ b/query/src/test/resources/query/sql/query05.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query06.sql b/query/src/test/resources/query/sql/query06.sql
index 76cfb24..de99c4f 100644
--- a/query/src/test/resources/query/sql/query06.sql
+++ b/query/src/test/resources/query/sql/query06.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query07.sql b/query/src/test/resources/query/sql/query07.sql
index 17b90e5..0c27d98 100644
--- a/query/src/test/resources/query/sql/query07.sql
+++ b/query/src/test/resources/query/sql/query07.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query08.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query08.sql b/query/src/test/resources/query/sql/query08.sql
index 9be452d..2f64c7e 100644
--- a/query/src/test/resources/query/sql/query08.sql
+++ b/query/src/test/resources/query/sql/query08.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query09.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query09.sql b/query/src/test/resources/query/sql/query09.sql
index c30b19a..ca6d0e9 100644
--- a/query/src/test/resources/query/sql/query09.sql
+++ b/query/src/test/resources/query/sql/query09.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.week_beg_dt, count(*) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query10.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query10.sql b/query/src/test/resources/query/sql/query10.sql
index cc3f303..9bef4bf 100644
--- a/query/src/test/resources/query/sql/query10.sql
+++ b/query/src/test/resources/query/sql/query10.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query11.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query11.sql b/query/src/test/resources/query/sql/query11.sql
index 864e3ea..113be80 100644
--- a/query/src/test/resources/query/sql/query11.sql
+++ b/query/src/test/resources/query/sql/query11.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query12.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query12.sql b/query/src/test/resources/query/sql/query12.sql
index 8f07802..b776a55 100644
--- a/query/src/test/resources/query/sql/query12.sql
+++ b/query/src/test/resources/query/sql/query12.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query13.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query13.sql b/query/src/test/resources/query/sql/query13.sql
index 254af37..e489786 100644
--- a/query/src/test/resources/query/sql/query13.sql
+++ b/query/src/test/resources/query/sql/query13.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query14.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query14.sql b/query/src/test/resources/query/sql/query14.sql
index 0738290..bfbfa65 100644
--- a/query/src/test/resources/query/sql/query14.sql
+++ b/query/src/test/resources/query/sql/query14.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query15.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query15.sql b/query/src/test/resources/query/sql/query15.sql
index 39119fe..4dd33ec 100644
--- a/query/src/test/resources/query/sql/query15.sql
+++ b/query/src/test/resources/query/sql/query15.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query16.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query16.sql b/query/src/test/resources/query/sql/query16.sql
index c25b763..3d6fca9 100644
--- a/query/src/test/resources/query/sql/query16.sql
+++ b/query/src/test/resources/query/sql/query16.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query17.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query17.sql b/query/src/test/resources/query/sql/query17.sql
index 68f626f..18fac91 100644
--- a/query/src/test/resources/query/sql/query17.sql
+++ b/query/src/test/resources/query/sql/query17.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query18.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query18.sql b/query/src/test/resources/query/sql/query18.sql
index 436924a..d34230b 100644
--- a/query/src/test/resources/query/sql/query18.sql
+++ b/query/src/test/resources/query/sql/query18.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query19.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query19.sql b/query/src/test/resources/query/sql/query19.sql
index 68f626f..18fac91 100644
--- a/query/src/test/resources/query/sql/query19.sql
+++ b/query/src/test/resources/query/sql/query19.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query20.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query20.sql b/query/src/test/resources/query/sql/query20.sql
index 61532f1..e87565a 100644
--- a/query/src/test/resources/query/sql/query20.sql
+++ b/query/src/test/resources/query/sql/query20.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query21.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query21.sql b/query/src/test/resources/query/sql/query21.sql
index 8b7870f..5a7c446 100644
--- a/query/src/test/resources/query/sql/query21.sql
+++ b/query/src/test/resources/query/sql/query21.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query22.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query22.sql b/query/src/test/resources/query/sql/query22.sql
index fe8120e..8aa7f66 100644
--- a/query/src/test/resources/query/sql/query22.sql
+++ b/query/src/test/resources/query/sql/query22.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query23.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query23.sql b/query/src/test/resources/query/sql/query23.sql
index 6cd09ee..6d4e5cb 100644
--- a/query/src/test/resources/query/sql/query23.sql
+++ b/query/src/test/resources/query/sql/query23.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query24.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query24.sql b/query/src/test/resources/query/sql/query24.sql
index 3e730b6..22c376e 100644
--- a/query/src/test/resources/query/sql/query24.sql
+++ b/query/src/test/resources/query/sql/query24.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query25.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query25.sql b/query/src/test/resources/query/sql/query25.sql
index b36fe35..fe19065 100644
--- a/query/src/test/resources/query/sql/query25.sql
+++ b/query/src/test/resources/query/sql/query25.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query26.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query26.sql b/query/src/test/resources/query/sql/query26.sql
index 00bdd99..c908c6c 100644
--- a/query/src/test/resources/query/sql/query26.sql
+++ b/query/src/test/resources/query/sql/query26.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query27.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query27.sql b/query/src/test/resources/query/sql/query27.sql
index 0778a22..0c204ed 100644
--- a/query/src/test/resources/query/sql/query27.sql
+++ b/query/src/test/resources/query/sql/query27.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql/query28.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query28.sql b/query/src/test/resources/query/sql/query28.sql
index 1720ef0..58a0b8e 100644
--- a/query/src/test/resources/query/sql/query28.sql
+++ b/query/src/test/resources/query/sql/query28.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  sum(test_kylin_fact.price) as GMV 


[23/39] incubator-kylin git commit: KYLIN-715

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query16.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query16.sql b/query/src/test/resources/query/sql_tableau/query16.sql
index 75b66ff..544d738 100644
--- a/query/src/test/resources/query/sql_tableau/query16.sql
+++ b/query/src/test/resources/query/sql_tableau/query16.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT EXTRACT(YEAR FROM TEST_CAL_DT.WEEK_BEG_DT) AS yr_WEEK_BEG_DT_ok, QUARTER(TEST_CAL_DT.WEEK_BEG_DT) AS qr_WEEK_BEG_DT_ok 
  FROM TEST_KYLIN_FACT 
  inner JOIN EDW.TEST_CAL_DT AS TEST_CAL_DT ON (TEST_KYLIN_FACT.CAL_DT = TEST_CAL_DT.CAL_DT) 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query17.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query17.sql b/query/src/test/resources/query/sql_tableau/query17.sql
index e1fba40..fa71026 100644
--- a/query/src/test/resources/query/sql_tableau/query17.sql
+++ b/query/src/test/resources/query/sql_tableau/query17.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT EXTRACT(MONTH FROM "TEST_CAL_DT"."WEEK_BEG_DT") AS "mn_WEEK_BEG_DT_ok", (( EXTRACT(YEAR FROM "TEST_CAL_DT"."WEEK_BEG_DT") * 100) + EXTRACT(MONTH FROM "TEST_CAL_DT"."WEEK_BEG_DT")) AS "my_WEEK_BEG_DT_ok", QUARTER("TEST_CAL_DT"."WEEK_BEG_DT") AS "qr_WEEK_BEG_DT_ok", EXTRACT(YEAR FROM "TEST_CAL_DT"."WEEK_BEG_DT") AS "yr_WEEK_BEG_DT_ok" FROM "TEST_KYLIN_FACT" inner JOIN EDW.TEST_CAL_DT AS TEST_CAL_DT ON ("TEST_KYLIN_FACT"."CAL_DT" = "TEST_CAL_DT"."CAL_DT") GROUP BY EXTRACT(YEAR FROM "TEST_CAL_DT"."WEEK_BEG_DT"), QUARTER("TEST_CAL_DT"."WEEK_BEG_DT"), (( EXTRACT(YEAR FROM "TEST_CAL_DT"."WEEK_BEG_DT") * 100) + EXTRACT(MONTH FROM "TEST_CAL_DT"."WEEK_BEG_DT")), EXTRACT(MONTH FROM "TEST_CAL_DT"."WEEK_BEG_DT") 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query18.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query18.sql b/query/src/test/resources/query/sql_tableau/query18.sql
index c1041b4..d4f84d3 100644
--- a/query/src/test/resources/query/sql_tableau/query18.sql
+++ b/query/src/test/resources/query/sql_tableau/query18.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name, sum(price) as GMV, count(seller_id) as TRANS_CNT 
  from test_kylin_fact 
  group by test_kylin_fact.lstg_format_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query19.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query19.sql b/query/src/test/resources/query/sql_tableau/query19.sql
index 83311f1..75c8420 100644
--- a/query/src/test/resources/query/sql_tableau/query19.sql
+++ b/query/src/test/resources/query/sql_tableau/query19.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 
  
  

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query20.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query20.sql b/query/src/test/resources/query/sql_tableau/query20.sql
index baa4547..e57009d 100644
--- a/query/src/test/resources/query/sql_tableau/query20.sql
+++ b/query/src/test/resources/query/sql_tableau/query20.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 
  
  

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query21.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query21.sql b/query/src/test/resources/query/sql_tableau/query21.sql
index 6905df6..59c42fd 100644
--- a/query/src/test/resources/query/sql_tableau/query21.sql
+++ b/query/src/test/resources/query/sql_tableau/query21.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
  select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV
  , count(*) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query22.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query22.sql.disabled b/query/src/test/resources/query/sql_tableau/query22.sql.disabled
index df40a9c..31aec15 100644
--- a/query/src/test/resources/query/sql_tableau/query22.sql.disabled
+++ b/query/src/test/resources/query/sql_tableau/query22.sql.disabled
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select fact.cal_dt, sum(fact.price) from test_kylin_fact fact 
 left join test_cal_dt cal 
 	on fact.cal_dt=cal.cal_dt
@@ -7,4 +25,4 @@ inner join
 	on test_kylin_fact.cal_dt=test_cal_dt.cal_dt group by test_kylin_fact.cal_dt order by 2 desc limit 2
 ) cal_2 
 	on fact.cal_dt = cal_2.cal_dt 
-group by fact.cal_dt
\ No newline at end of file
+group by fact.cal_dt

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query23.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query23.sql b/query/src/test/resources/query/sql_tableau/query23.sql
index c53185a..f788d47 100644
--- a/query/src/test/resources/query/sql_tableau/query23.sql
+++ b/query/src/test/resources/query/sql_tableau/query23.sql
@@ -1,5 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 
 select fact.cal_dt, sum(fact.price) from test_kylin_fact fact 
 left join EDW.TEST_CAL_DT cal on fact.cal_dt=cal.cal_dt
 where cal.cal_dt  = date '2012-05-17' or cal.cal_dt  = date '2013-05-17'
-group by fact.cal_dt
\ No newline at end of file
+group by fact.cal_dt

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query24.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query24.sql b/query/src/test/resources/query/sql_tableau/query24.sql
index 5593281..dad1320 100644
--- a/query/src/test/resources/query/sql_tableau/query24.sql
+++ b/query/src/test/resources/query/sql_tableau/query24.sql
@@ -1,6 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.cal_dt, count(1) as cnt_1
 from test_kylin_fact 
 left join EDW.TEST_CAL_DT AS TEST_CAL_DT on test_kylin_fact.cal_dt=test_cal_dt.cal_dt 
 group by test_kylin_fact.cal_dt 
 order by 2 desc 
-limit 3
\ No newline at end of file
+limit 3

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query25.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query25.sql b/query/src/test/resources/query/sql_tableau/query25.sql
index 9703ec0..7a36eef 100644
--- a/query/src/test/resources/query/sql_tableau/query25.sql
+++ b/query/src/test/resources/query/sql_tableau/query25.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "TEST_KYLIN_FACT"."CAL_DT", SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" 
 	FROM "TEST_KYLIN_FACT"
     INNER JOIN "EDW"."TEST_CAL_DT" AS "TEST_CAL_DT" ON ("TEST_KYLIN_FACT"."CAL_DT" = "TEST_CAL_DT"."CAL_DT")
@@ -7,4 +25,4 @@ SELECT "TEST_KYLIN_FACT"."CAL_DT", SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_
        "TEST_KYLIN_FACT"."CAL_DT" AS "none_CAL_DT_ok"   FROM "TEST_KYLIN_FACT"
          INNER JOIN "EDW"."TEST_CAL_DT" AS "TEST_CAL_DT" ON ("TEST_KYLIN_FACT"."CAL_DT" = "TEST_CAL_DT"."CAL_DT")
      GROUP BY "TEST_KYLIN_FACT"."CAL_DT"   ORDER BY 2 DESC   LIMIT 10  ) "t0" ON ("TEST_KYLIN_FACT"."CAL_DT" = "t0"."none_CAL_DT_ok") 
-    GROUP BY "TEST_KYLIN_FACT"."CAL_DT"
\ No newline at end of file
+    GROUP BY "TEST_KYLIN_FACT"."CAL_DT"

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query27.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query27.sql b/query/src/test/resources/query/sql_tableau/query27.sql
index 47e92c8..3a8e95e 100644
--- a/query/src/test/resources/query/sql_tableau/query27.sql
+++ b/query/src/test/resources/query/sql_tableau/query27.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "TEST_KYLIN_FACT"."CAL_DT", SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" FROM "TEST_KYLIN_FACT" 
   INNER JOIN (
              SELECT COUNT(1) AS "XTableau_join_flag",     SUM("TEST_KYLIN_FACT"."PRICE") AS "X__alias__A",     "TEST_KYLIN_FACT"."CAL_DT" AS "none_CAL_DT_ok"   FROM "TEST_KYLIN_FACT" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_tableau/query67.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query67.sql b/query/src/test/resources/query/sql_tableau/query67.sql
index 4cfa60d..20ef551 100644
--- a/query/src/test/resources/query/sql_tableau/query67.sql
+++ b/query/src/test/resources/query/sql_tableau/query67.sql
@@ -1,5 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT (CASE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" WHEN 'Auction' THEN '111' ELSE '222' END) AS "LSTG_FORMAT_NAME__group_",
   SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok"
 FROM "TEST_KYLIN_FACT" "TEST_KYLIN_FACT"
 --group by (CASE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" WHEN 'Auction' THEN '111' ELSE '222' END)  ORDER BY 1 ASC
-GROUP BY "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME"  ORDER BY 1 ASC
\ No newline at end of file
+GROUP BY "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME"  ORDER BY 1 ASC

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_verifyCount/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query04.sql b/query/src/test/resources/query/sql_verifyCount/query04.sql
index 08a0354..605f35a 100644
--- a/query/src/test/resources/query/sql_verifyCount/query04.sql
+++ b/query/src/test/resources/query/sql_verifyCount/query04.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select * from test_kylin_fact limit 100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_verifyCount/query04.sql.expected
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query04.sql.expected b/query/src/test/resources/query/sql_verifyCount/query04.sql.expected
index 105d7d9..66ce20b 100644
--- a/query/src/test/resources/query/sql_verifyCount/query04.sql.expected
+++ b/query/src/test/resources/query/sql_verifyCount/query04.sql.expected
@@ -1 +1,19 @@
-100
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_verifyCount/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query05.sql b/query/src/test/resources/query/sql_verifyCount/query05.sql
index 37fe636..ad41dba 100644
--- a/query/src/test/resources/query/sql_verifyCount/query05.sql
+++ b/query/src/test/resources/query/sql_verifyCount/query05.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select price from test_kylin_fact limit 100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_verifyCount/query05.sql.expected
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query05.sql.expected b/query/src/test/resources/query/sql_verifyCount/query05.sql.expected
index 105d7d9..66ce20b 100644
--- a/query/src/test/resources/query/sql_verifyCount/query05.sql.expected
+++ b/query/src/test/resources/query/sql_verifyCount/query05.sql.expected
@@ -1 +1,19 @@
-100
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_verifyCount/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query06.sql b/query/src/test/resources/query/sql_verifyCount/query06.sql
index 1fc00c4..92f94ec 100644
--- a/query/src/test/resources/query/sql_verifyCount/query06.sql
+++ b/query/src/test/resources/query/sql_verifyCount/query06.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name from test_kylin_fact limit 100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_verifyCount/query06.sql.expected
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query06.sql.expected b/query/src/test/resources/query/sql_verifyCount/query06.sql.expected
index 105d7d9..66ce20b 100644
--- a/query/src/test/resources/query/sql_verifyCount/query06.sql.expected
+++ b/query/src/test/resources/query/sql_verifyCount/query06.sql.expected
@@ -1 +1,19 @@
-100
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_verifyCount/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query07.sql b/query/src/test/resources/query/sql_verifyCount/query07.sql
index 7309d3d..c95a7de 100644
--- a/query/src/test/resources/query/sql_verifyCount/query07.sql
+++ b/query/src/test/resources/query/sql_verifyCount/query07.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select price,lstg_format_name from test_kylin_fact limit 100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_verifyCount/query07.sql.expected
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query07.sql.expected b/query/src/test/resources/query/sql_verifyCount/query07.sql.expected
index 105d7d9..66ce20b 100644
--- a/query/src/test/resources/query/sql_verifyCount/query07.sql.expected
+++ b/query/src/test/resources/query/sql_verifyCount/query07.sql.expected
@@ -1 +1,19 @@
-100
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/tableau_probing/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query01.sql b/query/src/test/resources/query/tableau_probing/query01.sql
index f54fbd7..2db6d6e 100644
--- a/query/src/test/resources/query/tableau_probing/query01.sql
+++ b/query/src/test/resources/query/tableau_probing/query01.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 1 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/tableau_probing/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query02.sql b/query/src/test/resources/query/tableau_probing/query02.sql
index a9c6c3c..a17370b 100644
--- a/query/src/test/resources/query/tableau_probing/query02.sql
+++ b/query/src/test/resources/query/tableau_probing/query02.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 1 AS "COL" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/tableau_probing/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query03.sql b/query/src/test/resources/query/tableau_probing/query03.sql
index 1fc4bed..8d2efb7 100644
--- a/query/src/test/resources/query/tableau_probing/query03.sql
+++ b/query/src/test/resources/query/tableau_probing/query03.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "COL" FROM (SELECT 1 AS "COL") AS "SUBQUERY" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/tableau_probing/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query04.sql b/query/src/test/resources/query/tableau_probing/query04.sql
index e732d24..a43d456 100644
--- a/query/src/test/resources/query/tableau_probing/query04.sql
+++ b/query/src/test/resources/query/tableau_probing/query04.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT TOP 1 "COL" FROM (SELECT 1 AS "COL") AS "CHECKTOP" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/tableau_probing/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query05.sql b/query/src/test/resources/query/tableau_probing/query05.sql
index fc92170..7886d1f 100644
--- a/query/src/test/resources/query/tableau_probing/query05.sql
+++ b/query/src/test/resources/query/tableau_probing/query05.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "COL" FROM (SELECT 1 AS "COL") AS "CHECKTOP" LIMIT 1 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/tableau_probing/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query06.sql b/query/src/test/resources/query/tableau_probing/query06.sql
index 41d714e..dd0e538 100644
--- a/query/src/test/resources/query/tableau_probing/query06.sql
+++ b/query/src/test/resources/query/tableau_probing/query06.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "SUBCOL" AS "COL" FROM ( SELECT 1 AS "SUBCOL" ) "SUBQUERY" GROUP BY 1 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/tableau_probing/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query07.sql b/query/src/test/resources/query/tableau_probing/query07.sql
index 3c0856d..f0f782d 100644
--- a/query/src/test/resources/query/tableau_probing/query07.sql
+++ b/query/src/test/resources/query/tableau_probing/query07.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "SUBCOL" AS "COL" FROM ( SELECT 1 AS "SUBCOL" ) "SUBQUERY" GROUP BY 2 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/webapp/app/css/AdminLTE-fonts.css
----------------------------------------------------------------------
diff --git a/webapp/app/css/AdminLTE-fonts.css b/webapp/app/css/AdminLTE-fonts.css
index 08710ad..a8e0244 100644
--- a/webapp/app/css/AdminLTE-fonts.css
+++ b/webapp/app/css/AdminLTE-fonts.css
@@ -1,19 +1,9 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+/*!
+ *   AdminLTE v1.2
+ *   Author: AlmsaeedStudio.com
+ *   License: Open source - MIT
+ *           Please visit http://opensource.org/licenses/MIT for more information
+!*/
 
 /* latin */
 @font-face {
@@ -30,4 +20,4 @@
     font-weight: 700;
     src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(../fonts/toadOcfmlt9b38dHJxOBGKUt5Ot5NIMarvNW-hkYWvT3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
     unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/webapp/app/css/AdminLTE.css
----------------------------------------------------------------------
diff --git a/webapp/app/css/AdminLTE.css b/webapp/app/css/AdminLTE.css
index e358b85..ac467b8 100644
--- a/webapp/app/css/AdminLTE.css
+++ b/webapp/app/css/AdminLTE.css
@@ -1,20 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
 /*!
  *   AdminLTE v1.2
  *   Author: AlmsaeedStudio.com
@@ -734,7 +717,7 @@ body > .header .logo .icon {
     left: 0px;
   }
 }
-/* 
+/*
     Dropdown menus
 ----------------------------
 */
@@ -1112,7 +1095,7 @@ body > .header .logo .icon {
     left: auto;
   }
 }
-/* 
+/*
    All form elements including input, select, textarea etc.
 -----------------------------------------------------------------
 */
@@ -1162,7 +1145,7 @@ body > .header .logo .icon {
 .radio {
   padding-left: 0;
 }
-/* 
+/*
     Compenent: Progress bars
 --------------------------------
 */
@@ -2023,7 +2006,7 @@ Component: timeline
   -moz-border-radius: 50%;
   border-radius: 50%;
 }
-/* 
+/*
     Component: callout
 ------------------------
 */
@@ -2063,7 +2046,7 @@ Component: timeline
 .callout.callout-info h4 {
   color: #3A87AD;
 }
-/* 
+/*
     Component: alert
 ------------------------
 */
@@ -2375,7 +2358,7 @@ Component: timeline
   margin-top: 30px;
   text-align: center;
 }
-/* 
+/*
     Page: register and login
 */
 .form-box {
@@ -2440,7 +2423,7 @@ Component: timeline
     width: 90%;
   }
 }
-/* 
+/*
     Page: 404 and 500 error pages
 ------------------------------------
 */
@@ -2490,7 +2473,7 @@ Component: timeline
 .error-page:after {
   clear: both;
 }
-/* 
+/*
     Page: Invoice
 */
 .invoice {
@@ -2523,12 +2506,12 @@ Component: timeline
     white-space: normal!important;
   }
 }
-/* 
+/*
     Skins
     -----
 */
-/* 
-    Skin Blue 
+/*
+    Skin Blue
     ---------
 */
 /* skin-blue navbar */

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/webapp/template/nginx_default.conf
----------------------------------------------------------------------
diff --git a/webapp/template/nginx_default.conf b/webapp/template/nginx_default.conf
deleted file mode 100644
index 389c62c..0000000
--- a/webapp/template/nginx_default.conf
+++ /dev/null
@@ -1,95 +0,0 @@
-#
-# The default server
-#
-server {
-    listen  443;
-    server_name  localhost, ${KYLIN_SERVER_IP};
-    root /var/www/html/kylin;
-    #charset koi8-r;
-    ssl on;
-    ssl_certificate ${KYLIN_SSL_CERTIFICATE_LOCATION}
-    ssl_certificate_key  ${KYLIN_SSL_CERTIFICATE_KEY_LOCATION}
-
-	send_timeout 600;
-    proxy_connect_timeout 600;
-    proxy_send_timeout 600;
-    proxy_read_timeout 600;
-	
-    access_log  logs/host.access.log  main;
-
-    location / {
-       #root   /usr/share/nginx/html;
-        root /var/www/html/kylin;
-        include /var/www/html/kylin/.htaccess;
-        index  index.html index.htm;
-    }
-
-    error_page  404              /404.html;
-    location = /404.html {
-        root   /usr/share/nginx/html;
-    }
-
-   location ^~ /image/ {
-   }
-
-   location ^~ /images/ {
-   }
-
-   location ^~ /components/ {
-   }
-
-   location ^~ /fonts/ {
-   }
-
-   location ~ \.(js|css|less|json|html)$ {
-   }
-   
-   location ^~ /kylin/api/ {
-     proxy_pass http://127.0.0.1:8080/kylin/api/;
-   }
-
-
-   location ^~ /kylin/matricsadmin/ {
-     proxy_pass http://127.0.0.1:8081/kylin/matricsadmin/;
-   }
-
-   location ^~ /kylin/matrics/ {
-      proxy_pass http://127.0.0.1:8081/kylin/matrics/;
-   }
-
-    # redirect server error pages to the static page /50x.html
-    #
-    error_page   500 502 503 504  /50x.html;
-    location = /50x.html {
-        root   /usr/share/nginx/html;
-    }
-
-    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
-    #
-    #location ~ \.php$ {
-    #    proxy_pass   http://127.0.0.1;
-    #}
-
-    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
-    #
-    #location ~ \.php$ {
-    #    root           html;
-    #    fastcgi_pass   127.0.0.1:9000;
-    #    fastcgi_index  index.php;
-    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
-    #    include        fastcgi_params;
-    #}
-
-    # deny access to .htaccess files, if Apache's document root
-    # concurs with nginx's one
-    #
-    #location ~ /\.ht {
-    #    deny  all;
-    #}
-}
-
-server {
-    listen 80;
-    server_name  ${KYLIN_SERVER_IP};
-    rewrite ^(.*) https://${KYLIN_DOMAIN_NAME}$1 permanent;
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/webapp/validate-commit-msg.js
----------------------------------------------------------------------
diff --git a/webapp/validate-commit-msg.js b/webapp/validate-commit-msg.js
deleted file mode 100644
index 6be34ae..0000000
--- a/webapp/validate-commit-msg.js
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/local/bin/node
-
-/**
- * Git COMMIT-MSG hook for validating commit message
- * See https://docs.google.com/document/d/1rk04jEuGfk9kYzfqCuOlPTSJw3hEDZJTBN5E5f1SALo/edit
- *
- * Installation:
- * >> cd <angular-repo>
- * >> ln -s ../../validate-commit-msg.js .git/hooks/commit-msg
- */
-var fs = require('fs');
-var util = require('util');
-
-
-var MAX_LENGTH = 70;
-var PATTERN = /^(?:fixup!\s*)?(\w*)(\(([\w\$\.\-\*/]*)\))?\: (.*)$/;
-var IGNORED = /^WIP\:|v\d\.\d\.\d/;
-var TYPES = {
-  feature: true,
-  fix: true,
-  docs: true,
-  style: true,
-  refactor: true,
-  test: true,
-  chore: true,
-  revert: true,
-  merge: true
-};
-
-
-var error = function() {
-  // gitx does not display it
-  // http://gitx.lighthouseapp.com/projects/17830/tickets/294-feature-display-hook-error-message-when-hook-fails
-  // https://groups.google.com/group/gitx/browse_thread/thread/a03bcab60844b812
-  console.error('INVALID COMMIT MSG: ' + util.format.apply(null, arguments));
-};
-
-
-var validateMessage = function(message) {
-  var isValid = true;
-
-  if (IGNORED.test(message)) {
-    console.log('Commit message validation ignored.');
-    return true;
-  }
-
-  if (message.length > MAX_LENGTH) {
-    error('is longer than %d characters !', MAX_LENGTH);
-    isValid = false;
-  }
-
-  var match = PATTERN.exec(message);
-
-  if (!match) {
-    error('does not match "<type>(<scope>): <subject>" ! was: ' + message);
-    return false;
-  }
-
-  var type = match[1];
-  var scope = match[3];
-  var subject = match[4];
-
-  if (!TYPES.hasOwnProperty(type)) {
-    error('"%s" is not allowed type !', type);
-    return false;
-  }
-
-  // Some more ideas, do want anything like this ?
-  // - allow only specific scopes (eg. fix(docs) should not be allowed ?
-  // - auto correct the type to lower case ?
-  // - auto correct first letter of the subject to lower case ?
-  // - auto add empty line after subject ?
-  // - auto remove empty () ?
-  // - auto correct typos in type ?
-  // - store incorrect messages, so that we can learn
-
-  return isValid;
-};
-
-
-var firstLineFromBuffer = function(buffer) {
-  return buffer.toString().split('\n').shift();
-};
-
-
-
-// publish for testing
-exports.validateMessage = validateMessage;
-
-// hacky start if not run by jasmine :-D
-if (process.argv.join('').indexOf('jasmine-node') === -1) {
-  var commitMsgFile = process.argv[2];
-  var incorrectLogFile = commitMsgFile.replace('COMMIT_EDITMSG', 'logs/incorrect-commit-msgs');
-
-  fs.readFile(commitMsgFile, function(err, buffer) {
-    var msg = firstLineFromBuffer(buffer);
-
-    if (!validateMessage(msg)) {
-      fs.appendFile(incorrectLogFile, msg + '\n', function() {
-        process.exit(1);
-      });
-    } else {
-      process.exit(0);
-    }
-  });
-}


[02/39] incubator-kylin git commit: KYLIN-669 change pom for release

Posted by li...@apache.org.
KYLIN-669 change pom for release


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

Branch: refs/heads/staging
Commit: f196ec166c1b603b8397b84f316a268120032fc3
Parents: 1dc4d5e
Author: lukehan <lu...@apache.org>
Authored: Tue Apr 14 09:24:51 2015 +0800
Committer: lukehan <lu...@apache.org>
Committed: Tue Apr 14 09:24:51 2015 +0800

----------------------------------------------------------------------
 pom.xml | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/f196ec16/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 26006f9..224a162 100644
--- a/pom.xml
+++ b/pom.xml
@@ -413,12 +413,19 @@
     <repositories>
         <repository>
             <id>central</id>
+            <name>Central Repository</name>
             <url>http://repo.maven.apache.org/maven2</url>
+            <layout>default</layout>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
         </repository>
+
         <repository>
             <id>conjars</id>
             <url>http://conjars.org/repo/</url>
         </repository>
+        
         <repository>
             <releases>
                 <enabled>true</enabled>
@@ -562,18 +569,6 @@
         <module>invertedindex</module>
     </modules>
 
-    <repositories>
-        <repository>
-            <id>central</id>
-            <name>Central Repository</name>
-            <url>http://repo.maven.apache.org/maven2</url>
-            <layout>default</layout>
-            <snapshots>
-                <enabled>false</enabled>
-            </snapshots>
-        </repository>
-    </repositories>
-
     <profiles>
         <profile>
             <id>default</id>


[35/39] incubator-kylin git commit: KYLIN-715 modify license format for .sql files

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_subquery/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query07.sql b/query/src/test/resources/query/sql_subquery/query07.sql
index d8c6024..0553855 100644
--- a/query/src/test/resources/query/sql_subquery/query07.sql
+++ b/query/src/test/resources/query/sql_subquery/query07.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select cal_dt, sum(price) as sum_price
 from test_kylin_fact fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query00.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query00.sql b/query/src/test/resources/query/sql_tableau/query00.sql
index c7a90de..1092b97 100644
--- a/query/src/test/resources/query/sql_tableau/query00.sql
+++ b/query/src/test/resources/query/sql_tableau/query00.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query01.sql b/query/src/test/resources/query/sql_tableau/query01.sql
index b1ce79e..cd0ebdf 100644
--- a/query/src/test/resources/query/sql_tableau/query01.sql
+++ b/query/src/test/resources/query/sql_tableau/query01.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT SUM(1) AS "COL", 
  2 AS "COL2" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query02.sql b/query/src/test/resources/query/sql_tableau/query02.sql
index fd642c0..75c384d 100644
--- a/query/src/test/resources/query/sql_tableau/query02.sql
+++ b/query/src/test/resources/query/sql_tableau/query02.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT * 
  FROM ( 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query03.sql b/query/src/test/resources/query/sql_tableau/query03.sql
index 5dcd1c2..26171ce 100644
--- a/query/src/test/resources/query/sql_tableau/query03.sql
+++ b/query/src/test/resources/query/sql_tableau/query03.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query04.sql b/query/src/test/resources/query/sql_tableau/query04.sql
index 290b0b5..7c67108 100644
--- a/query/src/test/resources/query/sql_tableau/query04.sql
+++ b/query/src/test/resources/query/sql_tableau/query04.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "TableauSQL"."META_CATEG_NAME" AS "none_META_CATEG_NAME_nk" 
  FROM ( 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query05.sql b/query/src/test/resources/query/sql_tableau/query05.sql
index 7622bc1..b499554 100644
--- a/query/src/test/resources/query/sql_tableau/query05.sql
+++ b/query/src/test/resources/query/sql_tableau/query05.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT SUM("TableauSQL"."GMV") AS "sum_GMV_ok", 
  SUM("TableauSQL"."TRANS_CNT") AS "sum_TRANS_CNT_ok" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query06.sql b/query/src/test/resources/query/sql_tableau/query06.sql
index 7622bc1..b499554 100644
--- a/query/src/test/resources/query/sql_tableau/query06.sql
+++ b/query/src/test/resources/query/sql_tableau/query06.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT SUM("TableauSQL"."GMV") AS "sum_GMV_ok", 
  SUM("TableauSQL"."TRANS_CNT") AS "sum_TRANS_CNT_ok" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query07.sql b/query/src/test/resources/query/sql_tableau/query07.sql
index e9fb06b..5c137e3 100644
--- a/query/src/test/resources/query/sql_tableau/query07.sql
+++ b/query/src/test/resources/query/sql_tableau/query07.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT SUM("TableauSQL"."GMV") AS "sum_GMV_ok", SUM("TableauSQL"."TRANS_CNT") AS "sum_TRANS_CNT_ok" 
  FROM ( 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query08.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query08.sql.disabled b/query/src/test/resources/query/sql_tableau/query08.sql.disabled
index be9c0c5..c2fc675 100644
--- a/query/src/test/resources/query/sql_tableau/query08.sql.disabled
+++ b/query/src/test/resources/query/sql_tableau/query08.sql.disabled
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 -- LEAF_CATEG_ID is a join field on fact table, but no on cuboid. We really support this?
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query09.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query09.sql.disabled b/query/src/test/resources/query/sql_tableau/query09.sql.disabled
index 2113b2c..6b6ad41 100644
--- a/query/src/test/resources/query/sql_tableau/query09.sql.disabled
+++ b/query/src/test/resources/query/sql_tableau/query09.sql.disabled
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "TEST_CATEGORY_GROUPINGS"."ADULT_CATEG_YN" AS "ADULT_CATEG_YN",
   "TEST_CATEGORY_GROUPINGS"."BSNS_VRTCL_NAME" AS "BSNS_VRTCL_NAME",

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query10.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query10.sql b/query/src/test/resources/query/sql_tableau/query10.sql
index 3535185..cf43fa7 100644
--- a/query/src/test/resources/query/sql_tableau/query10.sql
+++ b/query/src/test/resources/query/sql_tableau/query10.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "TEST_CAL_DT"."WEEK_BEG_DT" AS "none_WEEK_BEG_DT_nk", 
  SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query11.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query11.sql b/query/src/test/resources/query/sql_tableau/query11.sql
index 621ef4a..7d908fd 100644
--- a/query/src/test/resources/query/sql_tableau/query11.sql
+++ b/query/src/test/resources/query/sql_tableau/query11.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT COUNT(1) AS cnt_ITEM_COUNT_ok, 
  TEST_CAL_DT.WEEK_BEG_DT AS none_WEEK_BEG_DT_nk 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query12.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query12.sql b/query/src/test/resources/query/sql_tableau/query12.sql
index 3535185..cf43fa7 100644
--- a/query/src/test/resources/query/sql_tableau/query12.sql
+++ b/query/src/test/resources/query/sql_tableau/query12.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "TEST_CAL_DT"."WEEK_BEG_DT" AS "none_WEEK_BEG_DT_nk", 
  SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query13.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query13.sql b/query/src/test/resources/query/sql_tableau/query13.sql
index 3fc1fbf..e1b00d9 100644
--- a/query/src/test/resources/query/sql_tableau/query13.sql
+++ b/query/src/test/resources/query/sql_tableau/query13.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT EXTRACT(YEAR FROM TEST_CAL_DT.WEEK_BEG_DT) AS yr_WEEK_BEG_DT_ok 
  FROM TEST_KYLIN_FACT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query14.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query14.sql b/query/src/test/resources/query/sql_tableau/query14.sql
index 0e4b6b7..50d8952 100644
--- a/query/src/test/resources/query/sql_tableau/query14.sql
+++ b/query/src/test/resources/query/sql_tableau/query14.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT QUARTER("TEST_CAL_DT"."WEEK_BEG_DT") AS "qr_WEEK_BEG_DT_ok", EXTRACT(YEAR FROM "TEST_CAL_DT"."WEEK_BEG_DT") AS "yr_WEEK_BEG_DT_ok" FROM "TEST_KYLIN_FACT" inner JOIN "EDW"."TEST_CAL_DT" AS "TEST_CAL_DT"  ON ("TEST_KYLIN_FACT"."CAL_DT" = "TEST_CAL_DT"."CAL_DT") GROUP BY QUARTER("TEST_CAL_DT"."WEEK_BEG_DT"), EXTRACT(YEAR FROM "TEST_CAL_DT"."WEEK_BEG_DT") 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query15.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query15.sql b/query/src/test/resources/query/sql_tableau/query15.sql
index 7dc052c..8f30460 100644
--- a/query/src/test/resources/query/sql_tableau/query15.sql
+++ b/query/src/test/resources/query/sql_tableau/query15.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT QUARTER(TEST_CAL_DT.WEEK_BEG_DT) AS qr_WEEK_BEG_DT_ok 
  FROM TEST_KYLIN_FACT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query16.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query16.sql b/query/src/test/resources/query/sql_tableau/query16.sql
index 544d738..aaa4ab2 100644
--- a/query/src/test/resources/query/sql_tableau/query16.sql
+++ b/query/src/test/resources/query/sql_tableau/query16.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT EXTRACT(YEAR FROM TEST_CAL_DT.WEEK_BEG_DT) AS yr_WEEK_BEG_DT_ok, QUARTER(TEST_CAL_DT.WEEK_BEG_DT) AS qr_WEEK_BEG_DT_ok 
  FROM TEST_KYLIN_FACT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query17.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query17.sql b/query/src/test/resources/query/sql_tableau/query17.sql
index fa71026..11f6df1 100644
--- a/query/src/test/resources/query/sql_tableau/query17.sql
+++ b/query/src/test/resources/query/sql_tableau/query17.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT EXTRACT(MONTH FROM "TEST_CAL_DT"."WEEK_BEG_DT") AS "mn_WEEK_BEG_DT_ok", (( EXTRACT(YEAR FROM "TEST_CAL_DT"."WEEK_BEG_DT") * 100) + EXTRACT(MONTH FROM "TEST_CAL_DT"."WEEK_BEG_DT")) AS "my_WEEK_BEG_DT_ok", QUARTER("TEST_CAL_DT"."WEEK_BEG_DT") AS "qr_WEEK_BEG_DT_ok", EXTRACT(YEAR FROM "TEST_CAL_DT"."WEEK_BEG_DT") AS "yr_WEEK_BEG_DT_ok" FROM "TEST_KYLIN_FACT" inner JOIN EDW.TEST_CAL_DT AS TEST_CAL_DT ON ("TEST_KYLIN_FACT"."CAL_DT" = "TEST_CAL_DT"."CAL_DT") GROUP BY EXTRACT(YEAR FROM "TEST_CAL_DT"."WEEK_BEG_DT"), QUARTER("TEST_CAL_DT"."WEEK_BEG_DT"), (( EXTRACT(YEAR FROM "TEST_CAL_DT"."WEEK_BEG_DT") * 100) + EXTRACT(MONTH FROM "TEST_CAL_DT"."WEEK_BEG_DT")), EXTRACT(MONTH FROM "TEST_CAL_DT"."WEEK_BEG_DT") 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query18.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query18.sql b/query/src/test/resources/query/sql_tableau/query18.sql
index d4f84d3..188ceb7 100644
--- a/query/src/test/resources/query/sql_tableau/query18.sql
+++ b/query/src/test/resources/query/sql_tableau/query18.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.lstg_format_name, sum(price) as GMV, count(seller_id) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query19.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query19.sql b/query/src/test/resources/query/sql_tableau/query19.sql
index 75c8420..5f6e086 100644
--- a/query/src/test/resources/query/sql_tableau/query19.sql
+++ b/query/src/test/resources/query/sql_tableau/query19.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 
  

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query20.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query20.sql b/query/src/test/resources/query/sql_tableau/query20.sql
index e57009d..c776128 100644
--- a/query/src/test/resources/query/sql_tableau/query20.sql
+++ b/query/src/test/resources/query/sql_tableau/query20.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 
  

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query21.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query21.sql b/query/src/test/resources/query/sql_tableau/query21.sql
index 59c42fd..3e3208b 100644
--- a/query/src/test/resources/query/sql_tableau/query21.sql
+++ b/query/src/test/resources/query/sql_tableau/query21.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
  select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV
  , count(*) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query22.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query22.sql.disabled b/query/src/test/resources/query/sql_tableau/query22.sql.disabled
index 31aec15..17ec731 100644
--- a/query/src/test/resources/query/sql_tableau/query22.sql.disabled
+++ b/query/src/test/resources/query/sql_tableau/query22.sql.disabled
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select fact.cal_dt, sum(fact.price) from test_kylin_fact fact 
 left join test_cal_dt cal 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query23.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query23.sql b/query/src/test/resources/query/sql_tableau/query23.sql
index f788d47..10430ab 100644
--- a/query/src/test/resources/query/sql_tableau/query23.sql
+++ b/query/src/test/resources/query/sql_tableau/query23.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 
 select fact.cal_dt, sum(fact.price) from test_kylin_fact fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query24.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query24.sql b/query/src/test/resources/query/sql_tableau/query24.sql
index dad1320..29a69aa 100644
--- a/query/src/test/resources/query/sql_tableau/query24.sql
+++ b/query/src/test/resources/query/sql_tableau/query24.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_kylin_fact.cal_dt, count(1) as cnt_1
 from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query25.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query25.sql b/query/src/test/resources/query/sql_tableau/query25.sql
index 7a36eef..cdc98b7 100644
--- a/query/src/test/resources/query/sql_tableau/query25.sql
+++ b/query/src/test/resources/query/sql_tableau/query25.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "TEST_KYLIN_FACT"."CAL_DT", SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" 
 	FROM "TEST_KYLIN_FACT"

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query27.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query27.sql b/query/src/test/resources/query/sql_tableau/query27.sql
index 3a8e95e..beeb168 100644
--- a/query/src/test/resources/query/sql_tableau/query27.sql
+++ b/query/src/test/resources/query/sql_tableau/query27.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "TEST_KYLIN_FACT"."CAL_DT", SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" FROM "TEST_KYLIN_FACT" 
   INNER JOIN (

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_tableau/query67.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_tableau/query67.sql b/query/src/test/resources/query/sql_tableau/query67.sql
index 20ef551..25cc110 100644
--- a/query/src/test/resources/query/sql_tableau/query67.sql
+++ b/query/src/test/resources/query/sql_tableau/query67.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT (CASE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" WHEN 'Auction' THEN '111' ELSE '222' END) AS "LSTG_FORMAT_NAME__group_",
   SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok"

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_verifyCount/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query04.sql b/query/src/test/resources/query/sql_verifyCount/query04.sql
index 605f35a..9d3e409 100644
--- a/query/src/test/resources/query/sql_verifyCount/query04.sql
+++ b/query/src/test/resources/query/sql_verifyCount/query04.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select * from test_kylin_fact limit 100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_verifyCount/query04.sql.expected
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query04.sql.expected b/query/src/test/resources/query/sql_verifyCount/query04.sql.expected
index 66ce20b..84a267e 100644
--- a/query/src/test/resources/query/sql_verifyCount/query04.sql.expected
+++ b/query/src/test/resources/query/sql_verifyCount/query04.sql.expected
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_verifyCount/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query05.sql b/query/src/test/resources/query/sql_verifyCount/query05.sql
index ad41dba..753a85a 100644
--- a/query/src/test/resources/query/sql_verifyCount/query05.sql
+++ b/query/src/test/resources/query/sql_verifyCount/query05.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select price from test_kylin_fact limit 100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_verifyCount/query05.sql.expected
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query05.sql.expected b/query/src/test/resources/query/sql_verifyCount/query05.sql.expected
index 66ce20b..84a267e 100644
--- a/query/src/test/resources/query/sql_verifyCount/query05.sql.expected
+++ b/query/src/test/resources/query/sql_verifyCount/query05.sql.expected
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_verifyCount/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query06.sql b/query/src/test/resources/query/sql_verifyCount/query06.sql
index 92f94ec..39578a4 100644
--- a/query/src/test/resources/query/sql_verifyCount/query06.sql
+++ b/query/src/test/resources/query/sql_verifyCount/query06.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name from test_kylin_fact limit 100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_verifyCount/query06.sql.expected
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query06.sql.expected b/query/src/test/resources/query/sql_verifyCount/query06.sql.expected
index 66ce20b..84a267e 100644
--- a/query/src/test/resources/query/sql_verifyCount/query06.sql.expected
+++ b/query/src/test/resources/query/sql_verifyCount/query06.sql.expected
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_verifyCount/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query07.sql b/query/src/test/resources/query/sql_verifyCount/query07.sql
index c95a7de..0afb493 100644
--- a/query/src/test/resources/query/sql_verifyCount/query07.sql
+++ b/query/src/test/resources/query/sql_verifyCount/query07.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select price,lstg_format_name from test_kylin_fact limit 100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_verifyCount/query07.sql.expected
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_verifyCount/query07.sql.expected b/query/src/test/resources/query/sql_verifyCount/query07.sql.expected
index 66ce20b..84a267e 100644
--- a/query/src/test/resources/query/sql_verifyCount/query07.sql.expected
+++ b/query/src/test/resources/query/sql_verifyCount/query07.sql.expected
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 100

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/tableau_probing/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query01.sql b/query/src/test/resources/query/tableau_probing/query01.sql
index 2db6d6e..11fce3e 100644
--- a/query/src/test/resources/query/tableau_probing/query01.sql
+++ b/query/src/test/resources/query/tableau_probing/query01.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 1 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/tableau_probing/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query02.sql b/query/src/test/resources/query/tableau_probing/query02.sql
index a17370b..f2f9f42 100644
--- a/query/src/test/resources/query/tableau_probing/query02.sql
+++ b/query/src/test/resources/query/tableau_probing/query02.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 1 AS "COL" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/tableau_probing/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query03.sql b/query/src/test/resources/query/tableau_probing/query03.sql
index 8d2efb7..19613c9b 100644
--- a/query/src/test/resources/query/tableau_probing/query03.sql
+++ b/query/src/test/resources/query/tableau_probing/query03.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "COL" FROM (SELECT 1 AS "COL") AS "SUBQUERY" 


[06/39] incubator-kylin git commit: KYLIN-682 update test case to cover this case.

Posted by li...@apache.org.
KYLIN-682 update test case to cover this case.

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

Branch: refs/heads/staging
Commit: 2f152607cbf43054d176313f85286be98468c122
Parents: c5a19f5
Author: Shao Feng, Shi <sh...@ebay.com>
Authored: Tue Apr 14 13:51:42 2015 +0800
Committer: Shao Feng, Shi <sh...@ebay.com>
Committed: Tue Apr 14 13:51:42 2015 +0800

----------------------------------------------------------------------
 .../localmeta/cube_desc/test_kylin_cube_with_slr_desc.json     | 6 +++---
 .../cube_desc/test_kylin_cube_with_slr_left_join_desc.json     | 6 +++---
 .../localmeta/cube_desc/test_kylin_cube_without_slr_desc.json  | 6 +++---
 .../cube_desc/test_kylin_cube_without_slr_left_join_desc.json  | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2f152607/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 9f36193..8d76496 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
@@ -61,7 +61,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {
@@ -73,7 +73,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {
@@ -85,7 +85,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2f152607/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json
index b572a17..b59193e 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_with_slr_left_join_desc.json
@@ -61,7 +61,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {
@@ -73,7 +73,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {
@@ -85,7 +85,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2f152607/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 1ab02ac..cc40bb7 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
@@ -54,7 +54,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {
@@ -66,7 +66,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {
@@ -78,7 +78,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2f152607/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 82b680f..d677568 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
@@ -54,7 +54,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {
@@ -66,7 +66,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {
@@ -78,7 +78,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {


[31/39] incubator-kylin git commit: KYLIN-722 format local js

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/cubeEdit.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeEdit.js b/webapp/app/js/controllers/cubeEdit.js
index 356a5b5..e93ad5c 100755
--- a/webapp/app/js/controllers/cubeEdit.js
+++ b/webapp/app/js/controllers/cubeEdit.js
@@ -14,578 +14,612 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
 
-KylinApp.controller('CubeEditCtrl', function ($scope, $q, $routeParams, $location, $templateCache, $interpolate, MessageService, TableService, CubeDescService, CubeService, loadingRequest, SweetAlert,$log,cubeConfig,CubeDescModel,ModelService,MetaModel,TableModel) {
-    $scope.cubeConfig = cubeConfig;
-    //add or edit ?
-    var absUrl = $location.absUrl();
-    $scope.cubeMode = absUrl.indexOf("/cubes/add")!=-1?'addNewCube':absUrl.indexOf("/cubes/edit")!=-1?'editExistCube':'default';
+KylinApp.controller('CubeEditCtrl', function ($scope, $q, $routeParams, $location, $templateCache, $interpolate, MessageService, TableService, CubeDescService, CubeService, loadingRequest, SweetAlert, $log, cubeConfig, CubeDescModel, ModelService, MetaModel, TableModel) {
+  $scope.cubeConfig = cubeConfig;
+  //add or edit ?
+  var absUrl = $location.absUrl();
+  $scope.cubeMode = absUrl.indexOf("/cubes/add") != -1 ? 'addNewCube' : absUrl.indexOf("/cubes/edit") != -1 ? 'editExistCube' : 'default';
 
 
-    $scope.getColumnsByTable = function (tableName) {
-        var temp = [];
-        angular.forEach(TableModel.selectProjectTables, function (table) {
-            if (table.name == tableName) {
-                temp = table.columns;
-            }
-        });
-        return temp;
-    };
-
-    $scope.getPartitonColumns = function(tableName){
-        var columns = _.filter($scope.getColumnsByTable(tableName),function(column){
-            return column.datatype==="date"||column.datatype==="string";
-        });
-        return columns;
-    };
-
-    $scope.getColumnType = function (_column,table){
-        var columns = $scope.getColumnsByTable(table);
-        var type;
-        angular.forEach(columns,function(column){
-            if(_column === column.name){
-                type = column.datatype;
-                return;
-            }
-        });
-        return type;
-    };
-
-    var ColFamily = function () {
-        var index = 1;
-        return function () {
-            var newColFamily =
-            {
-                "name": "f" + index,
-                "columns": [
-                    {
-                        "qualifier": "m",
-                        "measure_refs": []
-                    }
-                ]
-            };
-            index += 1;
-
-            return  newColFamily;
-        }
-    };
-
+  $scope.getColumnsByTable = function (tableName) {
+    var temp = [];
+    angular.forEach(TableModel.selectProjectTables, function (table) {
+      if (table.name == tableName) {
+        temp = table.columns;
+      }
+    });
+    return temp;
+  };
 
-    // ~ Define data
-    $scope.state = {
-        "cubeSchema": ""
-    };
+  $scope.getPartitonColumns = function (tableName) {
+    var columns = _.filter($scope.getColumnsByTable(tableName), function (column) {
+      return column.datatype === "date" || column.datatype === "string";
+    });
+    return columns;
+  };
+
+  $scope.getColumnType = function (_column, table) {
+    var columns = $scope.getColumnsByTable(table);
+    var type;
+    angular.forEach(columns, function (column) {
+      if (_column === column.name) {
+        type = column.datatype;
+        return;
+      }
+    });
+    return type;
+  };
+
+  var ColFamily = function () {
+    var index = 1;
+    return function () {
+      var newColFamily =
+      {
+        "name": "f" + index,
+        "columns": [
+          {
+            "qualifier": "m",
+            "measure_refs": []
+          }
+        ]
+      };
+      index += 1;
 
-    // ~ init
-    if ($scope.isEdit = !!$routeParams.cubeName) {
-        CubeDescService.get({cube_name: $routeParams.cubeName}, function (detail) {
-            if (detail.length > 0) {
-                $scope.cubeMetaFrame = detail[0];
-                ModelService.get({model_name: $scope.cubeMetaFrame.model_name}, function (model) {
-                    if (model) {
-                        MetaModel.setMetaModel(model);
-                        $scope.metaModel = MetaModel;
-
-                        //use
-                        //convert GMT mills ,to make sure partition date show GMT Date
-                        //should run only one time
-                        if(model.partition_desc&&model.partition_desc.partition_date_start)
-                        {
-                            MetaModel.converDateToGMT();
-                        }
-                    }
-                });
-                $scope.state.cubeSchema = angular.toJson($scope.cubeMetaFrame, true);
+      return newColFamily;
+    }
+  };
+
+
+  // ~ Define data
+  $scope.state = {
+    "cubeSchema": ""
+  };
+
+  // ~ init
+  if ($scope.isEdit = !!$routeParams.cubeName) {
+    CubeDescService.get({cube_name: $routeParams.cubeName}, function (detail) {
+      if (detail.length > 0) {
+        $scope.cubeMetaFrame = detail[0];
+        ModelService.get({model_name: $scope.cubeMetaFrame.model_name}, function (model) {
+          if (model) {
+            MetaModel.setMetaModel(model);
+            $scope.metaModel = MetaModel;
+
+            //use
+            //convert GMT mills ,to make sure partition date show GMT Date
+            //should run only one time
+            if (model.partition_desc && model.partition_desc.partition_date_start) {
+              MetaModel.converDateToGMT();
             }
+          }
         });
-
-    } else {
-        $scope.cubeMetaFrame = CubeDescModel.createNew();
-        MetaModel.initModel();
-        $scope.metaModel = MetaModel;
-        $scope.cubeMetaFrame.project = $scope.projectModel.selectedProject;
         $scope.state.cubeSchema = angular.toJson($scope.cubeMetaFrame, true);
-    }
-
-    // ~ public methods
-    $scope.aceChanged = function () {
-    };
+      }
+    });
 
-    $scope.aceLoaded = function(){
-    };
+  } else {
+    $scope.cubeMetaFrame = CubeDescModel.createNew();
+    MetaModel.initModel();
+    $scope.metaModel = MetaModel;
+    $scope.cubeMetaFrame.project = $scope.projectModel.selectedProject;
+    $scope.state.cubeSchema = angular.toJson($scope.cubeMetaFrame, true);
+  }
 
-    $scope.prepareCube = function () {
-        // generate column family
-        generateColumnFamily();
+  // ~ public methods
+  $scope.aceChanged = function () {
+  };
 
+  $scope.aceLoaded = function () {
+  };
 
-        if ($scope.metaModel.model.partition_desc.partition_date_column&&($scope.metaModel.model.partition_desc.partition_date_start|$scope.metaModel.model.partition_desc.partition_date_start==0)) {
-            var dateStart = new Date($scope.metaModel.model.partition_desc.partition_date_start);
-            dateStart = (dateStart.getFullYear() + "-" + (dateStart.getMonth() + 1) + "-" + dateStart.getDate());
-            //switch selected time to utc timestamp
-            $scope.metaModel.model.partition_desc.partition_date_start = new Date(moment.utc(dateStart, "YYYY-MM-DD").format()).getTime();
+  $scope.prepareCube = function () {
+    // generate column family
+    generateColumnFamily();
 
 
-            if($scope.metaModel.model.partition_desc.partition_date_column.indexOf(".")==-1){
-            $scope.metaModel.model.partition_desc.partition_date_column=$scope.metaModel.model.fact_table+"."+$scope.metaModel.model.partition_desc.partition_date_column;
-            }
+    if ($scope.metaModel.model.partition_desc.partition_date_column && ($scope.metaModel.model.partition_desc.partition_date_start | $scope.metaModel.model.partition_desc.partition_date_start == 0)) {
+      var dateStart = new Date($scope.metaModel.model.partition_desc.partition_date_start);
+      dateStart = (dateStart.getFullYear() + "-" + (dateStart.getMonth() + 1) + "-" + dateStart.getDate());
+      //switch selected time to utc timestamp
+      $scope.metaModel.model.partition_desc.partition_date_start = new Date(moment.utc(dateStart, "YYYY-MM-DD").format()).getTime();
 
-        }
-        //use cubedesc name as model name
-        if($scope.metaModel.model.name===""||angular.isUndefined($scope.metaModel.model.name)){
-            $scope.metaModel.model.name = $scope.cubeMetaFrame.name;
-        }
 
-        //set model ref for cubeDesc
-        if($scope.cubeMetaFrame.model_name===""||angular.isUndefined($scope.cubeMetaFrame.model_name)){
-            $scope.cubeMetaFrame.model_name = $scope.cubeMetaFrame.name;
-        }
+      if ($scope.metaModel.model.partition_desc.partition_date_column.indexOf(".") == -1) {
+        $scope.metaModel.model.partition_desc.partition_date_column = $scope.metaModel.model.fact_table + "." + $scope.metaModel.model.partition_desc.partition_date_column;
+      }
 
-        $scope.state.project = $scope.cubeMetaFrame.project;
-//        delete $scope.cubeMetaFrame.project;
-
-        $scope.state.cubeSchema = angular.toJson($scope.cubeMetaFrame, true);
-        $scope.state.modelSchema = angular.toJson($scope.metaModel.model, true);
-    };
+    }
+    //use cubedesc name as model name
+    if ($scope.metaModel.model.name === "" || angular.isUndefined($scope.metaModel.model.name)) {
+      $scope.metaModel.model.name = $scope.cubeMetaFrame.name;
+    }
 
-    $scope.cubeResultTmpl = function (notification) {
-        // Get the static notification template.
-        var tmpl = notification.type == 'success' ? 'cubeResultSuccess.html' : 'cubeResultError.html';
-        return $interpolate($templateCache.get(tmpl))(notification);
-    };
+    //set model ref for cubeDesc
+    if ($scope.cubeMetaFrame.model_name === "" || angular.isUndefined($scope.cubeMetaFrame.model_name)) {
+      $scope.cubeMetaFrame.model_name = $scope.cubeMetaFrame.name;
+    }
 
-    $scope.saveCube = function (design_form) {
+    $scope.state.project = $scope.cubeMetaFrame.project;
+//        delete $scope.cubeMetaFrame.project;
 
-        try {
-            angular.fromJson($scope.state.cubeSchema);
-        } catch (e) {
-            SweetAlert.swal('Oops...', 'Invalid cube json format..', 'error');
-            return;
-        }
+    $scope.state.cubeSchema = angular.toJson($scope.cubeMetaFrame, true);
+    $scope.state.modelSchema = angular.toJson($scope.metaModel.model, true);
+  };
 
-        SweetAlert.swal({
-            title: '',
-            text: 'Are you sure to save the cube ?',
-            type: '',
-            showCancelButton: true,
-            confirmButtonColor: '#DD6B55',
-            confirmButtonText: "Yes",
-            closeOnConfirm: true
-        }, function(isConfirm) {
-            if(isConfirm){
-                loadingRequest.show();
-
-                if ($scope.isEdit) {
-                    CubeService.update({}, {cubeDescData: $scope.state.cubeSchema,modelDescData:$scope.state.modelSchema, cubeName: $routeParams.cubeName, project: $scope.state.project}, function (request) {
-                        if (request.successful) {
-                            $scope.state.cubeSchema = request.cubeDescData;
-                            MessageService.sendMsg($scope.cubeResultTmpl({'text':'Updated the cube successfully.',type:'success'}), 'success', {}, true, 'top_center');
-
-                            if (design_form) {
-                                design_form.$invalid = true;
-                            }
-                        } else {
-                            $scope.saveCubeRollBack();
-                            $scope.cubeMetaFrame.project = $scope.state.project;
-                                var message =request.message;
-                                var msg = !!(message) ? message : 'Failed to take action.';
-                                MessageService.sendMsg($scope.cubeResultTmpl({'text':msg,'schema':$scope.state.cubeSchema}), 'error', {}, true, 'top_center');
-                        }
-                        //end loading
-                        loadingRequest.hide();
-                    }, function (e) {
-                        $scope.saveCubeRollBack();
-
-                        if(e.data&& e.data.exception){
-                            var message =e.data.exception;
-                            var msg = !!(message) ? message : 'Failed to take action.';
-                            MessageService.sendMsg($scope.cubeResultTmpl({'text':msg,'schema':$scope.state.cubeSchema}), 'error', {}, true, 'top_center');
-                        } else {
-                            MessageService.sendMsg($scope.cubeResultTmpl({'text':'Failed to take action.','schema':$scope.state.cubeSchema}), 'error', {}, true, 'top_center');
-                        }
-                        loadingRequest.hide();
-                    });
-                } else {
-                    CubeService.save({}, {cubeDescData: $scope.state.cubeSchema,modelDescData:$scope.state.modelSchema, project: $scope.state.project}, function (request) {
-                        if(request.successful) {
-                            $scope.state.cubeSchema = request.cubeDescData;
-
-                            MessageService.sendMsg($scope.cubeResultTmpl({'text':'Created the cube successfully.',type:'success'}), 'success', {}, true, 'top_center');
-                        } else {
-                            $scope.saveCubeRollBack();
-                            $scope.cubeMetaFrame.project = $scope.state.project;
-                            var message =request.message;
-                            var msg = !!(message) ? message : 'Failed to take action.';
-                            MessageService.sendMsg($scope.cubeResultTmpl({'text':msg,'schema':$scope.state.cubeSchema}), 'error', {}, true, 'top_center');
-                        }
-
-                        //end loading
-                        loadingRequest.hide();
-                    }, function (e) {
-                        $scope.saveCubeRollBack();
-
-                        if (e.data && e.data.exception) {
-                            var message =e.data.exception;
-                            var msg = !!(message) ? message : 'Failed to take action.';
-                            MessageService.sendMsg($scope.cubeResultTmpl({'text':msg,'schema':$scope.state.cubeSchema}), 'error', {}, true, 'top_center');
-                        } else {
-                            MessageService.sendMsg($scope.cubeResultTmpl({'text':"Failed to take action.",'schema':$scope.state.cubeSchema}), 'error', {}, true, 'top_center');
-                        }
-                        //end loading
-                        loadingRequest.hide();
-
-                    });
-                }
-            }
-            else{
-                $scope.saveCubeRollBack();
-            }
-        });
-    };
+  $scope.cubeResultTmpl = function (notification) {
+    // Get the static notification template.
+    var tmpl = notification.type == 'success' ? 'cubeResultSuccess.html' : 'cubeResultError.html';
+    return $interpolate($templateCache.get(tmpl))(notification);
+  };
 
-//    reverse the date
-    $scope.saveCubeRollBack = function (){
-        if($scope.metaModel.model&&($scope.metaModel.model.partition_desc.partition_date_start||$scope.metaModel.model.partition_desc.partition_date_start==0))
-        {
-            $scope.metaModel.model.partition_desc.partition_date_start+=new Date().getTimezoneOffset()*60000;
-        }
-    }
+  $scope.saveCube = function (design_form) {
 
-    $scope.updateMandatory = function(rowkey_column){
-        if(!rowkey_column.mandatory){
-            angular.forEach($scope.cubeMetaFrame.rowkey.aggregation_groups, function (group, index) {
-                   var index = group.indexOf(rowkey_column.column);
-                   if(index>-1){
-                       group.splice(index,1);
-                   }
-            });
-        }
+    try {
+      angular.fromJson($scope.state.cubeSchema);
+    } catch (e) {
+      SweetAlert.swal('Oops...', 'Invalid cube json format..', 'error');
+      return;
     }
 
-    function reGenerateRowKey(){
-        $log.log("reGen rowkey & agg group");
-        var tmpRowKeyColumns = [];
-        var tmpAggregationItems = [];//put all aggregation item
-        var hierarchyItemArray = [];//put all hierarchy items
-        angular.forEach($scope.cubeMetaFrame.dimensions, function (dimension, index) {
-
-           //derived column
-            if(dimension.derived&&dimension.derived.length){
-                var lookup = _.find($scope.metaModel.model.lookups,function(lookup){return lookup.table==dimension.table});
-                angular.forEach(lookup.join.foreign_key, function (fk, index) {
-                    for (var i = 0; i < tmpRowKeyColumns.length; i++) {
-                        if(tmpRowKeyColumns[i].column == fk)
-                            break;
-                    }
-                    // push to array if no duplicate value
-                    if(i == tmpRowKeyColumns.length) {
-                        tmpRowKeyColumns.push({
-                            "column": fk,
-                            "length": 0,
-                            "dictionary": "true",
-                            "mandatory": false
-                        });
-
-                        tmpAggregationItems.push(fk);
-                    }
-                })
-
+    SweetAlert.swal({
+      title: '',
+      text: 'Are you sure to save the cube ?',
+      type: '',
+      showCancelButton: true,
+      confirmButtonColor: '#DD6B55',
+      confirmButtonText: "Yes",
+      closeOnConfirm: true
+    }, function (isConfirm) {
+      if (isConfirm) {
+        loadingRequest.show();
+
+        if ($scope.isEdit) {
+          CubeService.update({}, {
+            cubeDescData: $scope.state.cubeSchema,
+            modelDescData: $scope.state.modelSchema,
+            cubeName: $routeParams.cubeName,
+            project: $scope.state.project
+          }, function (request) {
+            if (request.successful) {
+              $scope.state.cubeSchema = request.cubeDescData;
+              MessageService.sendMsg($scope.cubeResultTmpl({
+                'text': 'Updated the cube successfully.',
+                type: 'success'
+              }), 'success', {}, true, 'top_center');
+
+              if (design_form) {
+                design_form.$invalid = true;
+              }
+            } else {
+              $scope.saveCubeRollBack();
+              $scope.cubeMetaFrame.project = $scope.state.project;
+              var message = request.message;
+              var msg = !!(message) ? message : 'Failed to take action.';
+              MessageService.sendMsg($scope.cubeResultTmpl({
+                'text': msg,
+                'schema': $scope.state.cubeSchema
+              }), 'error', {}, true, 'top_center');
             }
-            //normal column
-            else if (dimension.column&&!dimension.hierarchy&&dimension.column.length==1) {
-                for (var i = 0; i < tmpRowKeyColumns.length; i++) {
-                    if(tmpRowKeyColumns[i].column == dimension.column[0])
-                        break;
-                }
-                if(i == tmpRowKeyColumns.length) {
-                    tmpRowKeyColumns.push({
-                        "column": dimension.column[0],
-                        "length": 0,
-                        "dictionary": "true",
-                        "mandatory": false
-                    });
-                    tmpAggregationItems.push(dimension.column[0]);
-                }
+            //end loading
+            loadingRequest.hide();
+          }, function (e) {
+            $scope.saveCubeRollBack();
+
+            if (e.data && e.data.exception) {
+              var message = e.data.exception;
+              var msg = !!(message) ? message : 'Failed to take action.';
+              MessageService.sendMsg($scope.cubeResultTmpl({
+                'text': msg,
+                'schema': $scope.state.cubeSchema
+              }), 'error', {}, true, 'top_center');
+            } else {
+              MessageService.sendMsg($scope.cubeResultTmpl({
+                'text': 'Failed to take action.',
+                'schema': $scope.state.cubeSchema
+              }), 'error', {}, true, 'top_center');
             }
-            // hierarchy
-            if(dimension.hierarchy && dimension.column.length){
-                var hierarchyUnit = [];
-                angular.forEach(dimension.column, function (hier_column, index) {
-                    for (var i = 0; i < tmpRowKeyColumns.length; i++) {
-                        if(tmpRowKeyColumns[i].column == hier_column)
-                            break;
-                    }
-                    if(i == tmpRowKeyColumns.length) {
-                        tmpRowKeyColumns.push({
-                            "column": hier_column,
-                            "length": 0,
-                            "dictionary": "true",
-                            "mandatory": false
-                        });
-                        tmpAggregationItems.push(hier_column);
-                    }
-                    if(hierarchyUnit.indexOf(hier_column)==-1){
-                      hierarchyUnit.push(hier_column);
-                    }
-                });
-              if(hierarchyUnit.length){
-                hierarchyItemArray.push(hierarchyUnit);
-              }
+            loadingRequest.hide();
+          });
+        } else {
+          CubeService.save({}, {
+            cubeDescData: $scope.state.cubeSchema,
+            modelDescData: $scope.state.modelSchema,
+            project: $scope.state.project
+          }, function (request) {
+            if (request.successful) {
+              $scope.state.cubeSchema = request.cubeDescData;
+
+              MessageService.sendMsg($scope.cubeResultTmpl({
+                'text': 'Created the cube successfully.',
+                type: 'success'
+              }), 'success', {}, true, 'top_center');
+            } else {
+              $scope.saveCubeRollBack();
+              $scope.cubeMetaFrame.project = $scope.state.project;
+              var message = request.message;
+              var msg = !!(message) ? message : 'Failed to take action.';
+              MessageService.sendMsg($scope.cubeResultTmpl({
+                'text': msg,
+                'schema': $scope.state.cubeSchema
+              }), 'error', {}, true, 'top_center');
             }
 
-        });
+            //end loading
+            loadingRequest.hide();
+          }, function (e) {
+            $scope.saveCubeRollBack();
+
+            if (e.data && e.data.exception) {
+              var message = e.data.exception;
+              var msg = !!(message) ? message : 'Failed to take action.';
+              MessageService.sendMsg($scope.cubeResultTmpl({
+                'text': msg,
+                'schema': $scope.state.cubeSchema
+              }), 'error', {}, true, 'top_center');
+            } else {
+              MessageService.sendMsg($scope.cubeResultTmpl({
+                'text': "Failed to take action.",
+                'schema': $scope.state.cubeSchema
+              }), 'error', {}, true, 'top_center');
+            }
+            //end loading
+            loadingRequest.hide();
 
+          });
+        }
+      }
+      else {
+        $scope.saveCubeRollBack();
+      }
+    });
+  };
 
-        //rm mandatory column from aggregation item
-        angular.forEach($scope.cubeMetaFrame.rowkey.rowkey_columns,function(value,index){
-                if(value.mandatory){
-                    tmpAggregationItems = _.filter(tmpAggregationItems,function(item){
-                           return item!=value.column;
-                    });
-                }
+//    reverse the date
+  $scope.saveCubeRollBack = function () {
+    if ($scope.metaModel.model && ($scope.metaModel.model.partition_desc.partition_date_start || $scope.metaModel.model.partition_desc.partition_date_start == 0)) {
+      $scope.metaModel.model.partition_desc.partition_date_start += new Date().getTimezoneOffset() * 60000;
+    }
+  }
+
+  $scope.updateMandatory = function (rowkey_column) {
+    if (!rowkey_column.mandatory) {
+      angular.forEach($scope.cubeMetaFrame.rowkey.aggregation_groups, function (group, index) {
+        var index = group.indexOf(rowkey_column.column);
+        if (index > -1) {
+          group.splice(index, 1);
+        }
+      });
+    }
+  }
+
+  function reGenerateRowKey() {
+    $log.log("reGen rowkey & agg group");
+    var tmpRowKeyColumns = [];
+    var tmpAggregationItems = [];//put all aggregation item
+    var hierarchyItemArray = [];//put all hierarchy items
+    angular.forEach($scope.cubeMetaFrame.dimensions, function (dimension, index) {
+
+      //derived column
+      if (dimension.derived && dimension.derived.length) {
+        var lookup = _.find($scope.metaModel.model.lookups, function (lookup) {
+          return lookup.table == dimension.table
         });
+        angular.forEach(lookup.join.foreign_key, function (fk, index) {
+          for (var i = 0; i < tmpRowKeyColumns.length; i++) {
+            if (tmpRowKeyColumns[i].column == fk)
+              break;
+          }
+          // push to array if no duplicate value
+          if (i == tmpRowKeyColumns.length) {
+            tmpRowKeyColumns.push({
+              "column": fk,
+              "length": 0,
+              "dictionary": "true",
+              "mandatory": false
+            });
 
-        var rowkeyColumns = $scope.cubeMetaFrame.rowkey.rowkey_columns;
-        var newRowKeyColumns = sortSharedData(rowkeyColumns,tmpRowKeyColumns);
-        var increasedColumns = increasedColumn(rowkeyColumns,tmpRowKeyColumns);
-        newRowKeyColumns = newRowKeyColumns.concat(increasedColumns);
-
-        //! here get the latest rowkey_columns
-        $scope.cubeMetaFrame.rowkey.rowkey_columns = newRowKeyColumns;
-
-        if($scope.cubeMode==="editExistCube") {
-            var aggregationGroups = $scope.cubeMetaFrame.rowkey.aggregation_groups;
-            // rm unused item from group,will only rm when [edit] dimension
-            angular.forEach(aggregationGroups, function (group, index) {
-                if (group) {
-                    for (var j = 0; j < group.length; j++) {
-                        var elemStillExist = false;
-                        for (var k = 0; k < tmpAggregationItems.length; k++) {
-                            if (group[j] == tmpAggregationItems[k]) {
-                                elemStillExist = true;
-                                break;
-                            }
-                        }
-                        if (!elemStillExist) {
-                            group.splice(j, 1);
-                            j--;
-                        }
-                    }
-                    if (!group.length) {
-                        aggregationGroups.splice(index, 1);
-                        index--;
-                    }
-                }
-                else {
-                    aggregationGroups.splice(index, 1);
-                    index--;
-                }
+            tmpAggregationItems.push(fk);
+          }
+        })
+
+      }
+      //normal column
+      else if (dimension.column && !dimension.hierarchy && dimension.column.length == 1) {
+        for (var i = 0; i < tmpRowKeyColumns.length; i++) {
+          if (tmpRowKeyColumns[i].column == dimension.column[0])
+            break;
+        }
+        if (i == tmpRowKeyColumns.length) {
+          tmpRowKeyColumns.push({
+            "column": dimension.column[0],
+            "length": 0,
+            "dictionary": "true",
+            "mandatory": false
+          });
+          tmpAggregationItems.push(dimension.column[0]);
+        }
+      }
+      // hierarchy
+      if (dimension.hierarchy && dimension.column.length) {
+        var hierarchyUnit = [];
+        angular.forEach(dimension.column, function (hier_column, index) {
+          for (var i = 0; i < tmpRowKeyColumns.length; i++) {
+            if (tmpRowKeyColumns[i].column == hier_column)
+              break;
+          }
+          if (i == tmpRowKeyColumns.length) {
+            tmpRowKeyColumns.push({
+              "column": hier_column,
+              "length": 0,
+              "dictionary": "true",
+              "mandatory": false
             });
+            tmpAggregationItems.push(hier_column);
+          }
+          if (hierarchyUnit.indexOf(hier_column) == -1) {
+            hierarchyUnit.push(hier_column);
+          }
+        });
+        if (hierarchyUnit.length) {
+          hierarchyItemArray.push(hierarchyUnit);
         }
+      }
 
-        if($scope.cubeMode==="addNewCube"){
+    });
 
-          if(!tmpAggregationItems.length) {
-              $scope.cubeMetaFrame.rowkey.aggregation_groups=[];
-              return;
-          }
 
-            var newUniqAggregationItem = [];
-            angular.forEach(tmpAggregationItems, function (item, index) {
-                if(newUniqAggregationItem.indexOf(item)==-1){
-                    newUniqAggregationItem.push(item);
-                }
-            });
+    //rm mandatory column from aggregation item
+    angular.forEach($scope.cubeMetaFrame.rowkey.rowkey_columns, function (value, index) {
+      if (value.mandatory) {
+        tmpAggregationItems = _.filter(tmpAggregationItems, function (item) {
+          return item != value.column;
+        });
+      }
+    });
 
-          var hierarchyItems = hierarchyItemArray.join().split(",");
-          var unHierarchyItems = increasedData(hierarchyItems,newUniqAggregationItem);
-          //hierarchyItems
-          var increasedDataGroups = sliceGroupItemToGroups(unHierarchyItems);
-          if(!hierarchyItemArray.length){
-              $scope.cubeMetaFrame.rowkey.aggregation_groups = increasedDataGroups;
-              return;
-          };
-
-          var lastAggregationGroup = increasedDataGroups.length===0?[]:increasedDataGroups[increasedDataGroups.length-1];
-
-          if(lastAggregationGroup.length<10){
-            if(lastAggregationGroup.length+hierarchyItemArray.length<=10){
-              lastAggregationGroup = lastAggregationGroup.concat(hierarchyItems);
-              if(increasedDataGroups.length==0){
-                //case only hierarchy
-                increasedDataGroups[0]=lastAggregationGroup;
-              }else{
-                increasedDataGroups[increasedDataGroups.length-1]=lastAggregationGroup;
+    var rowkeyColumns = $scope.cubeMetaFrame.rowkey.rowkey_columns;
+    var newRowKeyColumns = sortSharedData(rowkeyColumns, tmpRowKeyColumns);
+    var increasedColumns = increasedColumn(rowkeyColumns, tmpRowKeyColumns);
+    newRowKeyColumns = newRowKeyColumns.concat(increasedColumns);
+
+    //! here get the latest rowkey_columns
+    $scope.cubeMetaFrame.rowkey.rowkey_columns = newRowKeyColumns;
+
+    if ($scope.cubeMode === "editExistCube") {
+      var aggregationGroups = $scope.cubeMetaFrame.rowkey.aggregation_groups;
+      // rm unused item from group,will only rm when [edit] dimension
+      angular.forEach(aggregationGroups, function (group, index) {
+        if (group) {
+          for (var j = 0; j < group.length; j++) {
+            var elemStillExist = false;
+            for (var k = 0; k < tmpAggregationItems.length; k++) {
+              if (group[j] == tmpAggregationItems[k]) {
+                elemStillExist = true;
+                break;
               }
             }
-            else{
-                var cutIndex = 10-lastAggregationGroup.length;
-                var partialHierarchy =hierarchyItemArray.slice(0,cutIndex).join().split(",");
-                //add hierarchy to last group and make sure length less than 10
-                lastAggregationGroup = lastAggregationGroup.concat(partialHierarchy);
-                increasedDataGroups[increasedDataGroups.length-1]=lastAggregationGroup;
-                var leftHierarchy = hierarchyItemArray.slice(cutIndex);
-
-                var leftHierarchyLength = leftHierarchy.length;
-                var grpLength = parseInt(leftHierarchyLength/10);
-                if(leftHierarchyLength%10==0&&leftHierarchyLength!=0){
-                    grpLength--;
-                }
-                for(var i=0;i<=grpLength;i++){
-                    var hierAggGroupUnit = leftHierarchy.slice(i*10,(i+1)*10).join().split(",");
-                    increasedDataGroups.push(hierAggGroupUnit);
-                }
+            if (!elemStillExist) {
+              group.splice(j, 1);
+              j--;
             }
           }
-          //lastAggregationGroup length >=10
-          else{
-              var hierrachyArrayLength = hierarchyItemArray.length;
-              var grpLength = parseInt(hierrachyArrayLength/10);
-              if(hierrachyArrayLength%10==0&&hierrachyArrayLength!=0){
-                  grpLength--;
-              }
-              for(var i=0;i<=grpLength;i++){
-                   var hierAggGroupUnit = hierarchyItemArray.slice(i*10,(i+1)*10).join().split(",");
-                   increasedDataGroups.push(hierAggGroupUnit);
-              }
+          if (!group.length) {
+            aggregationGroups.splice(index, 1);
+            index--;
           }
-            //! here get the latest aggregation groups,only effect when add newCube
-            $scope.cubeMetaFrame.rowkey.aggregation_groups = increasedDataGroups;
         }
+        else {
+          aggregationGroups.splice(index, 1);
+          index--;
+        }
+      });
     }
 
-    function sortSharedData(oldArray,tmpArr){
-        var newArr = [];
-        for(var j=0;j<oldArray.length;j++){
-            var unit = oldArray[j];
-            for(var k=0;k<tmpArr.length;k++){
-                if(unit.column==tmpArr[k].column){
-                    newArr.push(unit);
-                }
-            }
+    if ($scope.cubeMode === "addNewCube") {
+
+      if (!tmpAggregationItems.length) {
+        $scope.cubeMetaFrame.rowkey.aggregation_groups = [];
+        return;
+      }
+
+      var newUniqAggregationItem = [];
+      angular.forEach(tmpAggregationItems, function (item, index) {
+        if (newUniqAggregationItem.indexOf(item) == -1) {
+          newUniqAggregationItem.push(item);
+        }
+      });
+
+      var hierarchyItems = hierarchyItemArray.join().split(",");
+      var unHierarchyItems = increasedData(hierarchyItems, newUniqAggregationItem);
+      //hierarchyItems
+      var increasedDataGroups = sliceGroupItemToGroups(unHierarchyItems);
+      if (!hierarchyItemArray.length) {
+        $scope.cubeMetaFrame.rowkey.aggregation_groups = increasedDataGroups;
+        return;
+      }
+      ;
+
+      var lastAggregationGroup = increasedDataGroups.length === 0 ? [] : increasedDataGroups[increasedDataGroups.length - 1];
+
+      if (lastAggregationGroup.length < 10) {
+        if (lastAggregationGroup.length + hierarchyItemArray.length <= 10) {
+          lastAggregationGroup = lastAggregationGroup.concat(hierarchyItems);
+          if (increasedDataGroups.length == 0) {
+            //case only hierarchy
+            increasedDataGroups[0] = lastAggregationGroup;
+          } else {
+            increasedDataGroups[increasedDataGroups.length - 1] = lastAggregationGroup;
+          }
         }
-        return newArr;
+        else {
+          var cutIndex = 10 - lastAggregationGroup.length;
+          var partialHierarchy = hierarchyItemArray.slice(0, cutIndex).join().split(",");
+          //add hierarchy to last group and make sure length less than 10
+          lastAggregationGroup = lastAggregationGroup.concat(partialHierarchy);
+          increasedDataGroups[increasedDataGroups.length - 1] = lastAggregationGroup;
+          var leftHierarchy = hierarchyItemArray.slice(cutIndex);
+
+          var leftHierarchyLength = leftHierarchy.length;
+          var grpLength = parseInt(leftHierarchyLength / 10);
+          if (leftHierarchyLength % 10 == 0 && leftHierarchyLength != 0) {
+            grpLength--;
+          }
+          for (var i = 0; i <= grpLength; i++) {
+            var hierAggGroupUnit = leftHierarchy.slice(i * 10, (i + 1) * 10).join().split(",");
+            increasedDataGroups.push(hierAggGroupUnit);
+          }
+        }
+      }
+      //lastAggregationGroup length >=10
+      else {
+        var hierrachyArrayLength = hierarchyItemArray.length;
+        var grpLength = parseInt(hierrachyArrayLength / 10);
+        if (hierrachyArrayLength % 10 == 0 && hierrachyArrayLength != 0) {
+          grpLength--;
+        }
+        for (var i = 0; i <= grpLength; i++) {
+          var hierAggGroupUnit = hierarchyItemArray.slice(i * 10, (i + 1) * 10).join().split(",");
+          increasedDataGroups.push(hierAggGroupUnit);
+        }
+      }
+      //! here get the latest aggregation groups,only effect when add newCube
+      $scope.cubeMetaFrame.rowkey.aggregation_groups = increasedDataGroups;
     }
-
-    function increasedData(oldArray,tmpArr){
-        var increasedData = [];
-        if(oldArray&&!oldArray.length){
-            return   increasedData.concat(tmpArr);
+  }
+
+  function sortSharedData(oldArray, tmpArr) {
+    var newArr = [];
+    for (var j = 0; j < oldArray.length; j++) {
+      var unit = oldArray[j];
+      for (var k = 0; k < tmpArr.length; k++) {
+        if (unit.column == tmpArr[k].column) {
+          newArr.push(unit);
         }
+      }
+    }
+    return newArr;
+  }
 
-        for(var j=0;j<tmpArr.length;j++){
-            var unit = tmpArr[j];
-            var exist = false;
-            for(var k=0;k<oldArray.length;k++){
-                if(unit==oldArray[k]){
-                    exist = true;
-                    break;
-                }
-            }
-            if(!exist){
-                increasedData.push(unit);
-            }
-        }
-        return increasedData;
+  function increasedData(oldArray, tmpArr) {
+    var increasedData = [];
+    if (oldArray && !oldArray.length) {
+      return increasedData.concat(tmpArr);
     }
 
-    function increasedColumn(oldArray,tmpArr){
-        var increasedData = [];
-        if(oldArray&&!oldArray.length){
-         return   increasedData.concat(tmpArr);
+    for (var j = 0; j < tmpArr.length; j++) {
+      var unit = tmpArr[j];
+      var exist = false;
+      for (var k = 0; k < oldArray.length; k++) {
+        if (unit == oldArray[k]) {
+          exist = true;
+          break;
         }
+      }
+      if (!exist) {
+        increasedData.push(unit);
+      }
+    }
+    return increasedData;
+  }
 
-        for(var j=0;j<tmpArr.length;j++){
-            var unit = tmpArr[j];
-            var exist = false;
-            for(var k=0;k<oldArray.length;k++){
-                if(unit.column==oldArray[k].column){
-                    exist = true;
-                    break;
-                }
-            }
-            if(!exist){
-                increasedData.push(unit);
-            }
-        }
-        return increasedData;
+  function increasedColumn(oldArray, tmpArr) {
+    var increasedData = [];
+    if (oldArray && !oldArray.length) {
+      return increasedData.concat(tmpArr);
     }
 
-    function sliceGroupItemToGroups(groupItems){
-        if(!groupItems.length){
-            return [];
-        }
-        var groups = [];
-        var j = -1;
-        for(var i = 0;i<groupItems.length;i++){
-            if(i%10==0){
-                j++;
-                groups[j]=[];
-            }
-            groups[j].push(groupItems[i]);
+    for (var j = 0; j < tmpArr.length; j++) {
+      var unit = tmpArr[j];
+      var exist = false;
+      for (var k = 0; k < oldArray.length; k++) {
+        if (unit.column == oldArray[k].column) {
+          exist = true;
+          break;
         }
+      }
+      if (!exist) {
+        increasedData.push(unit);
+      }
+    }
+    return increasedData;
+  }
+
+  function sliceGroupItemToGroups(groupItems) {
+    if (!groupItems.length) {
+      return [];
+    }
+    var groups = [];
+    var j = -1;
+    for (var i = 0; i < groupItems.length; i++) {
+      if (i % 10 == 0) {
+        j++;
+        groups[j] = [];
+      }
+      groups[j].push(groupItems[i]);
+    }
 //        if(groups[groups.length-1].length<10){
 //            groups.pop();
 //        }
-        return groups;
+    return groups;
+  }
+
+
+  // ~ private methods
+  function generateColumnFamily() {
+    $scope.cubeMetaFrame.hbase_mapping.column_family = [];
+    var colFamily = ColFamily();
+    var normalMeasures = [], distinctCountMeasures = [];
+    angular.forEach($scope.cubeMetaFrame.measures, function (measure, index) {
+      if (measure.function.expression === 'COUNT_DISTINCT') {
+        distinctCountMeasures.push(measure);
+      } else {
+        normalMeasures.push(measure);
+      }
+    });
+    if (normalMeasures.length > 0) {
+      var nmcf = colFamily();
+      angular.forEach(normalMeasures, function (normalM, index) {
+        nmcf.columns[0].measure_refs.push(normalM.name);
+      });
+      $scope.cubeMetaFrame.hbase_mapping.column_family.push(nmcf);
     }
 
+    if (distinctCountMeasures.length > 0) {
+      var dccf = colFamily();
+      angular.forEach(distinctCountMeasures, function (dcm, index) {
+        dccf.columns[0].measure_refs.push(dcm.name);
+      });
+      $scope.cubeMetaFrame.hbase_mapping.column_family.push(dccf);
+    }
+  }
 
-    // ~ private methods
-    function generateColumnFamily() {
-        $scope.cubeMetaFrame.hbase_mapping.column_family = [];
-        var colFamily = ColFamily();
-        var normalMeasures = [], distinctCountMeasures=[];
-        angular.forEach($scope.cubeMetaFrame.measures, function (measure, index) {
-            if(measure.function.expression === 'COUNT_DISTINCT'){
-                distinctCountMeasures.push(measure);
-            }else{
-                normalMeasures.push(measure);
-            }
+  $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
+    if (!newValue) {
+      return;
+    }
+    var param = {
+      ext: true,
+      project: newValue
+    };
+    if (newValue) {
+      TableModel.initTables();
+      TableService.list(param, function (tables) {
+        angular.forEach(tables, function (table) {
+          table.name = table.database + "." + table.name;
+          TableModel.addTable(table);
         });
-        if(normalMeasures.length>0){
-            var nmcf = colFamily();
-            angular.forEach(normalMeasures, function(normalM, index){
-                nmcf.columns[0].measure_refs.push(normalM.name);
-            });
-            $scope.cubeMetaFrame.hbase_mapping.column_family.push(nmcf);
-        }
-
-        if (distinctCountMeasures.length > 0){
-            var dccf = colFamily();
-            angular.forEach(distinctCountMeasures, function(dcm, index){
-                dccf.columns[0].measure_refs.push(dcm.name);
-            });
-            $scope.cubeMetaFrame.hbase_mapping.column_family.push(dccf);
-        }
+      });
     }
+  });
 
-    $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
-        if(!newValue){
-            return;
-        }
-        var param = {
-            ext: true,
-            project:newValue
-        };
-        if(newValue){
-            TableModel.initTables();
-            TableService.list(param, function (tables) {
-                angular.forEach(tables, function (table) {
-                    table.name = table.database+"."+table.name;
-                    TableModel.addTable(table);
-                });
-            });
-        }
-    });
-
-    $scope.$on('DimensionsEdited', function (event) {
-        if ($scope.cubeMetaFrame) {
-            reGenerateRowKey();
-        }
-    });
+  $scope.$on('DimensionsEdited', function (event) {
+    if ($scope.cubeMetaFrame) {
+      reGenerateRowKey();
+    }
+  });
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/cubeFilter.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeFilter.js b/webapp/app/js/controllers/cubeFilter.js
index 3c38f1d..53c49c6 100644
--- a/webapp/app/js/controllers/cubeFilter.js
+++ b/webapp/app/js/controllers/cubeFilter.js
@@ -14,10 +14,10 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
-KylinApp.controller('CubeFilterCtrl', function ($scope, $modal,cubeConfig,ModelService,MetaModel) {
+KylinApp.controller('CubeFilterCtrl', function ($scope, $modal, cubeConfig, ModelService, MetaModel) {
 
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/cubeModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeModel.js b/webapp/app/js/controllers/cubeModel.js
index 2874742..5f60aaa 100644
--- a/webapp/app/js/controllers/cubeModel.js
+++ b/webapp/app/js/controllers/cubeModel.js
@@ -14,144 +14,144 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
-KylinApp.controller('CubeModelCtrl', function ($scope, $modal,cubeConfig,ModelService,MetaModel,SweetAlert,$log) {
+KylinApp.controller('CubeModelCtrl', function ($scope, $modal, cubeConfig, ModelService, MetaModel, SweetAlert, $log) {
 
-    $scope.cubeConfig = cubeConfig;
-    var DataModel = function () {
-        return {
-            name: '',
-            fact_table: '',
-            lookups: []
-        };
+  $scope.cubeConfig = cubeConfig;
+  var DataModel = function () {
+    return {
+      name: '',
+      fact_table: '',
+      lookups: []
     };
-
-    var Lookup = function () {
-        return {
-            table: '',
-            join: {
-                type: '',
-                primary_key: [],
-                foreign_key: []
-            }
-        };
-    };
-
-    // Initialize params.
-    $scope.lookupState = {
-        editing: false,
-        editingIndex: -1,
-        filter: ''
-    };
-
-    $scope.newLookup = Lookup();
-
-    var lookupList = $scope.metaModel.model.lookups;
-
-    $scope.openLookupModal = function () {
-        var modalInstance = $modal.open({
-            templateUrl: 'dataModelLookupTable.html',
-            controller: cubeModelLookupModalCtrl,
-            backdrop: 'static',
-            scope: $scope
-        });
-
-        modalInstance.result.then(function () {
-            if (!$scope.lookupState.editing) {
-                $scope.doneAddLookup();
-            } else {
-                $scope.doneEditLookup();
-            }
-
-        }, function () {
-            $scope.cancelLookup();
-        });
+  };
+
+  var Lookup = function () {
+    return {
+      table: '',
+      join: {
+        type: '',
+        primary_key: [],
+        foreign_key: []
+      }
     };
-
-    // Controller for cube model lookup modal.
-    var cubeModelLookupModalCtrl = function ($scope, $modalInstance) {
-        $scope.ok = function () {
-            $modalInstance.close();
-        };
-
-        $scope.cancel = function () {
-            $modalInstance.dismiss('cancel');
-        };
+  };
+
+  // Initialize params.
+  $scope.lookupState = {
+    editing: false,
+    editingIndex: -1,
+    filter: ''
+  };
+
+  $scope.newLookup = Lookup();
+
+  var lookupList = $scope.metaModel.model.lookups;
+
+  $scope.openLookupModal = function () {
+    var modalInstance = $modal.open({
+      templateUrl: 'dataModelLookupTable.html',
+      controller: cubeModelLookupModalCtrl,
+      backdrop: 'static',
+      scope: $scope
+    });
+
+    modalInstance.result.then(function () {
+      if (!$scope.lookupState.editing) {
+        $scope.doneAddLookup();
+      } else {
+        $scope.doneEditLookup();
+      }
+
+    }, function () {
+      $scope.cancelLookup();
+    });
+  };
+
+  // Controller for cube model lookup modal.
+  var cubeModelLookupModalCtrl = function ($scope, $modalInstance) {
+    $scope.ok = function () {
+      $modalInstance.close();
     };
 
-    $scope.editLookup = function (lookup) {
-        $scope.lookupState.editingIndex = lookupList.indexOf(lookup);
-        $scope.lookupState.editing = true;
-
-        // Make a copy of model will be editing.
-        $scope.newLookup = angular.copy(lookup);
-
-        $scope.openLookupModal();
+    $scope.cancel = function () {
+      $modalInstance.dismiss('cancel');
     };
-
-    $scope.doneAddLookup = function () {
-        // Push newLookup which bound user input data.
-        lookupList.push(angular.copy($scope.newLookup));
-
-        $scope.resetParams();
-    };
-
-    $scope.doneEditLookup = function () {
-        // Copy edited model to destination model.
-        angular.copy($scope.newLookup, lookupList[$scope.lookupState.editingIndex]);
-
-        $scope.resetParams();
-    };
-
-    $scope.cancelLookup = function () {
-        $scope.resetParams();
-    };
-
-        $scope.removeLookup = function (lookup) {
-            var dimExist = _.some($scope.cubeMetaFrame.dimensions,function(item,index){
-                return item.table===lookup.table;
-            });
-            if(dimExist) {
-                SweetAlert.swal({
-                    title: '',
-                    text: "Once it's removed, all relative dimensions will be removed. Are you sure to remove the lookup table?",
-                    type: '',
-                    showCancelButton: true,
-                    confirmButtonColor: '#DD6B55',
-                    confirmButtonText: "Yes",
-                    closeOnConfirm: true
-                }, function (isConfirm) {
-                    if (isConfirm) {
-                        for (var i = $scope.cubeMetaFrame.dimensions.length - 1; i >= 0; i--) {
-                            if ($scope.cubeMetaFrame.dimensions[i].table === lookup.table) {
-                                $scope.cubeMetaFrame.dimensions.splice(i, 1);
-                            }
-                        }
-                        lookupList.splice(lookupList.indexOf(lookup), 1);
-                    }
-                });
-            }else{
-                lookupList.splice(lookupList.indexOf(lookup), 1);
+  };
+
+  $scope.editLookup = function (lookup) {
+    $scope.lookupState.editingIndex = lookupList.indexOf(lookup);
+    $scope.lookupState.editing = true;
+
+    // Make a copy of model will be editing.
+    $scope.newLookup = angular.copy(lookup);
+
+    $scope.openLookupModal();
+  };
+
+  $scope.doneAddLookup = function () {
+    // Push newLookup which bound user input data.
+    lookupList.push(angular.copy($scope.newLookup));
+
+    $scope.resetParams();
+  };
+
+  $scope.doneEditLookup = function () {
+    // Copy edited model to destination model.
+    angular.copy($scope.newLookup, lookupList[$scope.lookupState.editingIndex]);
+
+    $scope.resetParams();
+  };
+
+  $scope.cancelLookup = function () {
+    $scope.resetParams();
+  };
+
+  $scope.removeLookup = function (lookup) {
+    var dimExist = _.some($scope.cubeMetaFrame.dimensions, function (item, index) {
+      return item.table === lookup.table;
+    });
+    if (dimExist) {
+      SweetAlert.swal({
+        title: '',
+        text: "Once it's removed, all relative dimensions will be removed. Are you sure to remove the lookup table?",
+        type: '',
+        showCancelButton: true,
+        confirmButtonColor: '#DD6B55',
+        confirmButtonText: "Yes",
+        closeOnConfirm: true
+      }, function (isConfirm) {
+        if (isConfirm) {
+          for (var i = $scope.cubeMetaFrame.dimensions.length - 1; i >= 0; i--) {
+            if ($scope.cubeMetaFrame.dimensions[i].table === lookup.table) {
+              $scope.cubeMetaFrame.dimensions.splice(i, 1);
             }
-        };
-
-
-    $scope.addNewJoin = function(){
-        $scope.newLookup.join.primary_key.push("null");
-        $scope.newLookup.join.foreign_key.push("null");
-    };
-
-    $scope.removeJoin = function($index){
-        $scope.newLookup.join.primary_key.splice($index,1);
-        $scope.newLookup.join.foreign_key.splice($index,1);
-    };
-
-    $scope.resetParams = function () {
-        $scope.lookupState.editing = false;
-        $scope.lookupState.editingIndex = -1;
-        $scope.newLookup = Lookup();
-    };
+          }
+          lookupList.splice(lookupList.indexOf(lookup), 1);
+        }
+      });
+    } else {
+      lookupList.splice(lookupList.indexOf(lookup), 1);
+    }
+  };
+
+
+  $scope.addNewJoin = function () {
+    $scope.newLookup.join.primary_key.push("null");
+    $scope.newLookup.join.foreign_key.push("null");
+  };
+
+  $scope.removeJoin = function ($index) {
+    $scope.newLookup.join.primary_key.splice($index, 1);
+    $scope.newLookup.join.foreign_key.splice($index, 1);
+  };
+
+  $scope.resetParams = function () {
+    $scope.lookupState.editing = false;
+    $scope.lookupState.editingIndex = -1;
+    $scope.newLookup = Lookup();
+  };
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/cubeRefresh.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeRefresh.js b/webapp/app/js/controllers/cubeRefresh.js
index 640f2c8..05ac196 100644
--- a/webapp/app/js/controllers/cubeRefresh.js
+++ b/webapp/app/js/controllers/cubeRefresh.js
@@ -14,10 +14,10 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
-KylinApp.controller('CubeRefreshCtrl', function ($scope, $modal,cubeConfig,ModelService,MetaModel) {
+KylinApp.controller('CubeRefreshCtrl', function ($scope, $modal, cubeConfig, ModelService, MetaModel) {
 
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/cubes.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubes.js b/webapp/app/js/controllers/cubes.js
index 6c23c5e..75bd7cf 100755
--- a/webapp/app/js/controllers/cubes.js
+++ b/webapp/app/js/controllers/cubes.js
@@ -14,467 +14,468 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
 KylinApp
-    .controller('CubesCtrl', function ($scope, $q, $routeParams, $location, $modal, MessageService, CubeDescService, CubeService, JobService, UserService,  ProjectService,SweetAlert,loadingRequest,$log,cubeConfig,ProjectModel,ModelService,MetaModel,CubeList) {
+  .controller('CubesCtrl', function ($scope, $q, $routeParams, $location, $modal, MessageService, CubeDescService, CubeService, JobService, UserService, ProjectService, SweetAlert, loadingRequest, $log, cubeConfig, ProjectModel, ModelService, MetaModel, CubeList) {
 
-        $scope.cubeConfig = cubeConfig;
-        $scope.cubeList = CubeList;
+    $scope.cubeConfig = cubeConfig;
+    $scope.cubeList = CubeList;
 
-        $scope.listParams={
-            cubeName: $routeParams.cubeName,
-            projectName: $routeParams.projectName
-        };
-        if($routeParams.projectName){
-            $scope.projectModel.setSelectedProject($routeParams.projectName);
-        }
-        CubeList.removeAll();
-        $scope.loading = false;
-        $scope.action = {};
+    $scope.listParams = {
+      cubeName: $routeParams.cubeName,
+      projectName: $routeParams.projectName
+    };
+    if ($routeParams.projectName) {
+      $scope.projectModel.setSelectedProject($routeParams.projectName);
+    }
+    CubeList.removeAll();
+    $scope.loading = false;
+    $scope.action = {};
 
 
+    $scope.state = {
+      filterAttr: 'create_time', filterReverse: true, reverseColumn: 'create_time',
+      dimensionFilter: '', measureFilter: ''
+    };
 
-        $scope.state = { filterAttr: 'create_time', filterReverse: true, reverseColumn: 'create_time',
-            dimensionFilter: '', measureFilter: ''};
+    $scope.list = function (offset, limit) {
+      var defer = $q.defer();
+      if (!$scope.projectModel.projects.length) {
+        defer.resolve([]);
+        return defer.promise;
+      }
+      offset = (!!offset) ? offset : 0;
+      limit = (!!limit) ? limit : 20;
 
-        $scope.list = function (offset, limit) {
-            var defer = $q.defer();
-            if(!$scope.projectModel.projects.length){
-                defer.resolve([]);
-                return defer.promise;
-            }
-            offset = (!!offset) ? offset : 0;
-            limit = (!!limit) ? limit : 20;
+      var queryParam = {offset: offset, limit: limit};
+      if ($scope.listParams.cubeName) {
+        queryParam.cubeName = $scope.listParams.cubeName;
+      }
+      queryParam.projectName = $scope.projectModel.selectedProject;
 
-            var queryParam = {offset: offset, limit: limit};
-            if ($scope.listParams.cubeName) {
-                queryParam.cubeName = $scope.listParams.cubeName;
-            }
-               queryParam.projectName = $scope.projectModel.selectedProject;
+      $scope.loading = true;
+
+      return CubeList.list(queryParam).then(function (resp) {
+        $scope.loading = false;
+        defer.resolve(resp);
+        return defer.promise;
+      });
+    };
 
-            $scope.loading = true;
+    $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
+      if (newValue != oldValue || newValue == null) {
+        CubeList.removeAll();
+        $scope.reload();
+      }
 
-            return CubeList.list(queryParam).then(function(resp){
-                $scope.loading = false;
-                defer.resolve(resp);
-                return defer.promise;
-            });
-        };
+    });
+    $scope.reload = function () {
+      // trigger reload action in pagination directive
+      $scope.action.reload = !$scope.action.reload;
+    };
 
-        $scope.$watch('projectModel.selectedProject', function (newValue, oldValue) {
-            if(newValue!=oldValue||newValue==null){
-                CubeList.removeAll();
-                $scope.reload();
-            }
+    $scope.loadDetail = function (cube) {
+      var defer = $q.defer();
+      if (cube.detail) {
+        defer.resolve(cube.detail);
+      } else {
+        CubeDescService.get({cube_name: cube.name}, {}, function (detail) {
+          if (detail.length > 0 && detail[0].hasOwnProperty("name")) {
+            cube.detail = detail[0];
+            ModelService.get({model_name: cube.detail.model_name}, function (model) {
+              cube.model = model
+              defer.resolve(cube.detail);
+            });
 
+          } else {
+            SweetAlert.swal('Oops...', "No cube detail info loaded.", 'error');
+          }
+        }, function (e) {
+          if (e.data && e.data.exception) {
+            var message = e.data.exception;
+            var msg = !!(message) ? message : 'Failed to take action.';
+            SweetAlert.swal('Oops...', msg, 'error');
+          } else {
+            SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+          }
         });
-        $scope.reload = function () {
-            // trigger reload action in pagination directive
-            $scope.action.reload = !$scope.action.reload;
-        };
-
-        $scope.loadDetail = function (cube) {
-            var defer = $q.defer();
-            if(cube.detail){
-                defer.resolve(cube.detail);
-            } else {
-                CubeDescService.get({cube_name: cube.name}, {}, function (detail) {
-                    if (detail.length > 0&&detail[0].hasOwnProperty("name")) {
-                        cube.detail = detail[0];
-                        ModelService.get({model_name: cube.detail.model_name}, function (model) {
-                          cube.model = model
-                          defer.resolve(cube.detail);
-                       });
-
-                    }else{
-                        SweetAlert.swal('Oops...', "No cube detail info loaded.", 'error');
-                    }
-                }, function (e) {
-                    if(e.data&& e.data.exception){
-                        var message =e.data.exception;
-                        var msg = !!(message) ? message : 'Failed to take action.';
-                        SweetAlert.swal('Oops...', msg, 'error');
-                    }else{
-                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                    }
-                });
-            }
+      }
 
-            return defer.promise;
-        };
+      return defer.promise;
+    };
 
-        $scope.getTotalSize = function (cubes) {
-            var size = 0;
-            if (!cubes) {
-                return 0;
-            }
-            else {
-                for(var i = 0; i < cubes.length; i++){
-                    size += cubes[i].size_kb;
-                }
-                return $scope.dataSize(size*1024);
-            }
-        };
+    $scope.getTotalSize = function (cubes) {
+      var size = 0;
+      if (!cubes) {
+        return 0;
+      }
+      else {
+        for (var i = 0; i < cubes.length; i++) {
+          size += cubes[i].size_kb;
+        }
+        return $scope.dataSize(size * 1024);
+      }
+    };
 
-        $scope.enable = function (cube) {
-            SweetAlert.swal({
-                title: '',
-                text: 'Are you sure to enable the cube? Please note: if cube schema is changed in the disabled period, all segments of the cube will be discarded due to data and schema mismatch.',
-                type: '',
-                showCancelButton: true,
-                confirmButtonColor: '#DD6B55',
+    $scope.enable = function (cube) {
+      SweetAlert.swal({
+        title: '',
+        text: 'Are you sure to enable the cube? Please note: if cube schema is changed in the disabled period, all segments of the cube will be discarded due to data and schema mismatch.',
+        type: '',
+        showCancelButton: true,
+        confirmButtonColor: '#DD6B55',
 //                confirmButtonText: "Yes",
-                closeOnConfirm: true
-            }, function(isConfirm) {
-                if(isConfirm){
-
-                loadingRequest.show();
-                CubeService.enable({cubeId: cube.name}, {}, function (result) {
-
-                    loadingRequest.hide();
-                    cube.status = 'READY';
-                    SweetAlert.swal('Success!', 'Enable job was submitted successfully', 'success');
-                },function(e){
-
-                    loadingRequest.hide();
-                    if(e.data&& e.data.exception){
-                        var message =e.data.exception;
-                        var msg = !!(message) ? message : 'Failed to take action.';
-                        SweetAlert.swal('Oops...', msg, 'error');
-                    }else{
-                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                    }
-                });
-                }
-            });
-        };
-
-        $scope.purge = function (cube) {
-            SweetAlert.swal({
-                title: '',
-                text: 'Are you sure to purge the cube? ',
-                type: '',
-                showCancelButton: true,
-                confirmButtonColor: '#DD6B55',
-                confirmButtonText: "Yes",
-                closeOnConfirm: true
-            }, function(isConfirm) {
-                if(isConfirm){
-
-                loadingRequest.show();
-                CubeService.purge({cubeId: cube.name}, {}, function (result) {
-
-                    loadingRequest.hide();
-                    CubeList.removeAll();
-                    $scope.reload();
-                    SweetAlert.swal('Success!', 'Purge job was submitted successfully', 'success');
-                },function(e){
-                    loadingRequest.hide();
-                    if(e.data&& e.data.exception){
-                        var message =e.data.exception;
-                        var msg = !!(message) ? message : 'Failed to take action.';
-                        SweetAlert.swal('Oops...', msg, 'error');
-                    }else{
-                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                    }
-                });
-                }
-            });
+        closeOnConfirm: true
+      }, function (isConfirm) {
+        if (isConfirm) {
+
+          loadingRequest.show();
+          CubeService.enable({cubeId: cube.name}, {}, function (result) {
+
+            loadingRequest.hide();
+            cube.status = 'READY';
+            SweetAlert.swal('Success!', 'Enable job was submitted successfully', 'success');
+          }, function (e) {
+
+            loadingRequest.hide();
+            if (e.data && e.data.exception) {
+              var message = e.data.exception;
+              var msg = !!(message) ? message : 'Failed to take action.';
+              SweetAlert.swal('Oops...', msg, 'error');
+            } else {
+              SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+            }
+          });
         }
+      });
+    };
 
-        $scope.disable = function (cube) {
-
-            SweetAlert.swal({
-                title: '',
-                text: 'Are you sure to disable the cube? ',
-                type: '',
-                showCancelButton: true,
-                confirmButtonColor: '#DD6B55',
-                confirmButtonText: "Yes",
-                closeOnConfirm: true
-            }, function(isConfirm) {
-                if(isConfirm){
+    $scope.purge = function (cube) {
+      SweetAlert.swal({
+        title: '',
+        text: 'Are you sure to purge the cube? ',
+        type: '',
+        showCancelButton: true,
+        confirmButtonColor: '#DD6B55',
+        confirmButtonText: "Yes",
+        closeOnConfirm: true
+      }, function (isConfirm) {
+        if (isConfirm) {
+
+          loadingRequest.show();
+          CubeService.purge({cubeId: cube.name}, {}, function (result) {
+
+            loadingRequest.hide();
+            CubeList.removeAll();
+            $scope.reload();
+            SweetAlert.swal('Success!', 'Purge job was submitted successfully', 'success');
+          }, function (e) {
+            loadingRequest.hide();
+            if (e.data && e.data.exception) {
+              var message = e.data.exception;
+              var msg = !!(message) ? message : 'Failed to take action.';
+              SweetAlert.swal('Oops...', msg, 'error');
+            } else {
+              SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+            }
+          });
+        }
+      });
+    }
 
-                loadingRequest.show();
-                CubeService.disable({cubeId: cube.name}, {}, function (result) {
+    $scope.disable = function (cube) {
+
+      SweetAlert.swal({
+        title: '',
+        text: 'Are you sure to disable the cube? ',
+        type: '',
+        showCancelButton: true,
+        confirmButtonColor: '#DD6B55',
+        confirmButtonText: "Yes",
+        closeOnConfirm: true
+      }, function (isConfirm) {
+        if (isConfirm) {
+
+          loadingRequest.show();
+          CubeService.disable({cubeId: cube.name}, {}, function (result) {
+
+            loadingRequest.hide();
+            cube.status = 'DISABLED';
+            SweetAlert.swal('Success!', 'Disable job was submitted successfully', 'success');
+          }, function (e) {
+
+            loadingRequest.hide();
+            if (e.data && e.data.exception) {
+              var message = e.data.exception;
+              var msg = !!(message) ? message : 'Failed to take action.';
+              SweetAlert.swal('Oops...', msg, 'error');
+            } else {
+              SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+            }
+          });
+        }
 
-                    loadingRequest.hide();
-                    cube.status = 'DISABLED';
-                    SweetAlert.swal('Success!', 'Disable job was submitted successfully', 'success');
-                },function(e){
+      });
+    };
 
-                    loadingRequest.hide();
-                    if(e.data&& e.data.exception){
-                        var message =e.data.exception;
-                        var msg = !!(message) ? message : 'Failed to take action.';
-                        SweetAlert.swal('Oops...', msg, 'error');
-                    }else{
-                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                    }
-                });
-                }
+    $scope.dropCube = function (cube) {
 
-            });
-        };
+      SweetAlert.swal({
+        title: '',
+        text: " Once it's dropped, your cube’s metadata and data will be cleaned up and can’t be restored back. ",
+        type: '',
+        showCancelButton: true,
+        confirmButtonColor: '#DD6B55',
+        confirmButtonText: "Yes",
+        closeOnConfirm: true
+      }, function (isConfirm) {
+        if (isConfirm) {
 
-        $scope.dropCube = function (cube) {
+          loadingRequest.show();
+          CubeService.drop({cubeId: cube.name}, {}, function (result) {
 
-            SweetAlert.swal({
-                title: '',
-                text: " Once it's dropped, your cube’s metadata and data will be cleaned up and can’t be restored back. ",
-                type: '',
-                showCancelButton: true,
-                confirmButtonColor: '#DD6B55',
-                confirmButtonText: "Yes",
-                closeOnConfirm: true
-            }, function(isConfirm) {
-                if(isConfirm){
-
-                    loadingRequest.show();
-                    CubeService.drop({cubeId: cube.name}, {}, function (result) {
-
-                    loadingRequest.hide();
+            loadingRequest.hide();
 //                    var cubeIndex = CubeList.cubes.indexOf(cube);
 //                    if (cubeIndex > -1) {
 //                        $scope.cubes.splice(cubeIndex, 1);
 //                    }
-                     CubeList.removeCube(cube);
-                    SweetAlert.swal('Success!', 'Cube drop is done successfully', 'success');
-
-                },function(e){
-
-                    loadingRequest.hide();
-                    if(e.data&& e.data.exception){
-                        var message =e.data.exception;
-                        var msg = !!(message) ? message : 'Failed to take action.';
-                        SweetAlert.swal('Oops...', msg, 'error');
-                    }else{
-                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                    }
-                });
-                }
-
-            });
-        };
-
-        $scope.startJobSubmit = function (cube) {
-            $scope.loadDetail(cube).then(function(cubeDetail){
-                ModelService.get({model_name: cubeDetail.model_name}, function (model) {
-                    if (model.name) {
-                        $scope.metaModel = MetaModel;
-                        $scope.metaModel.model= model;
-                        if (model.partition_desc.partition_date_column) {
-                            $modal.open({
-                                templateUrl: 'jobSubmit.html',
-                                controller: jobSubmitCtrl,
-                                resolve: {
-                                    cube: function () {
-                                        return cube;
-                                    },
-                                    metaModel:function(){
-                                        return $scope.metaModel;
-                                    },
-                                    buildType: function () {
-                                        return 'BUILD';
-                                    }
-                                }
-                            });
-                        }
-                        else {
-
-                            SweetAlert.swal({
-                                title: '',
-                                text: "Are you sure to start the build? ",
-                                type: '',
-                                showCancelButton: true,
-                                confirmButtonColor: '#DD6B55',
-                                confirmButtonText: "Yes",
-                                closeOnConfirm: true
-                            }, function(isConfirm) {
-                                if(isConfirm){
-
-                                    loadingRequest.show();
-                                    CubeService.rebuildCube(
-                                        {
-                                            cubeId: cube.name
-                                        },
-                                        {
-                                            buildType: 'BUILD',
-                                            startTime: 0,
-                                            endTime: 0
-                                        }, function (job) {
-
-                                            loadingRequest.hide();
-                                            SweetAlert.swal('Success!', 'Rebuild job was submitted successfully', 'success');
-                                        },function(e){
-
-                                            loadingRequest.hide();
-                                            if(e.data&& e.data.exception){
-                                                var message =e.data.exception;
-                                                var msg = !!(message) ? message : 'Failed to take action.';
-                                                SweetAlert.swal('Oops...', msg, 'error');
-                                            }else{
-                                                SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                                            }
-                                        });
-                                }
-
-                            });
-                        }
-                    }
-                });
-            });
-
-        };
-
-        $scope.startRefresh = function (cube) {
-            $scope.loadDetail(cube).then(function(){
-              $modal.open({
-                  templateUrl: 'jobRefresh.html',
-                  controller: jobSubmitCtrl,
-                  resolve: {
-                      cube: function () {
-                          return cube;
-                      },
-                      buildType: function () {
-                          return 'REFRESH';
-                      }
-                  }
-              });
-            });
+            CubeList.removeCube(cube);
+            SweetAlert.swal('Success!', 'Cube drop is done successfully', 'success');
 
-        };
+          }, function (e) {
 
-        $scope.cubeEdit = function(cube){
-            $location.path("cubes/edit/"+cube.name);
+            loadingRequest.hide();
+            if (e.data && e.data.exception) {
+              var message = e.data.exception;
+              var msg = !!(message) ? message : 'Failed to take action.';
+              SweetAlert.swal('Oops...', msg, 'error');
+            } else {
+              SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+            }
+          });
         }
 
-        $scope.startMerge = function (cube) {
-            $scope.loadDetail(cube).then(function(){
+      });
+    };
+
+    $scope.startJobSubmit = function (cube) {
+      $scope.loadDetail(cube).then(function (cubeDetail) {
+        ModelService.get({model_name: cubeDetail.model_name}, function (model) {
+          if (model.name) {
+            $scope.metaModel = MetaModel;
+            $scope.metaModel.model = model;
+            if (model.partition_desc.partition_date_column) {
               $modal.open({
-                templateUrl: 'jobMerge.html',
+                templateUrl: 'jobSubmit.html',
                 controller: jobSubmitCtrl,
                 resolve: {
                   cube: function () {
                     return cube;
                   },
+                  metaModel: function () {
+                    return $scope.metaModel;
+                  },
                   buildType: function () {
-                    return 'MERGE';
+                    return 'BUILD';
                   }
                 }
               });
-            });
-        }
-    });
-
-var jobSubmitCtrl = function ($scope, $modalInstance, CubeService, MessageService, $location, cube,MetaModel, buildType,SweetAlert,loadingRequest) {
-    $scope.cube = cube;
-    $scope.metaModel={
-      model:cube.model
-    }
-    $scope.jobBuildRequest = {
-        buildType: buildType,
-        startTime: 0,
-        endTime: 0
-    };
-    $scope.message = "";
-
-    $scope.rebuild = function (jobsubmit) {
-
-                $scope.message = null;
-                $scope.jobBuildRequest.startTime = new Date($scope.jobBuildRequest.startTime).getTime();
-                $scope.jobBuildRequest.endTime = new Date($scope.jobBuildRequest.endTime).getTime();
-
-                if ($scope.jobBuildRequest.startTime >= $scope.jobBuildRequest.endTime) {
-                    $scope.message = "WARNING: End time should be later than the start time.";
+            }
+            else {
 
-                    //rollback date setting
-                    if(jobsubmit){
-                        $scope.rebuildRollback();
-                    }
-                    return;
+              SweetAlert.swal({
+                title: '',
+                text: "Are you sure to start the build? ",
+                type: '',
+                showCancelButton: true,
+                confirmButtonColor: '#DD6B55',
+                confirmButtonText: "Yes",
+                closeOnConfirm: true
+              }, function (isConfirm) {
+                if (isConfirm) {
+
+                  loadingRequest.show();
+                  CubeService.rebuildCube(
+                    {
+                      cubeId: cube.name
+                    },
+                    {
+                      buildType: 'BUILD',
+                      startTime: 0,
+                      endTime: 0
+                    }, function (job) {
+
+                      loadingRequest.hide();
+                      SweetAlert.swal('Success!', 'Rebuild job was submitted successfully', 'success');
+                    }, function (e) {
+
+                      loadingRequest.hide();
+                      if (e.data && e.data.exception) {
+                        var message = e.data.exception;
+                        var msg = !!(message) ? message : 'Failed to take action.';
+                        SweetAlert.swal('Oops...', msg, 'error');
+                      } else {
+                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+                      }
+                    });
                 }
 
-                loadingRequest.show();
-                CubeService.rebuildCube({cubeId: cube.name}, $scope.jobBuildRequest, function (job) {
+              });
+            }
+          }
+        });
+      });
 
-                    loadingRequest.hide();
-                    $modalInstance.dismiss('cancel');
-                    SweetAlert.swal('Success!', 'Rebuild job was submitted successfully', 'success');
-                },function(e){
+    };
 
-                    //rollback date setting
-                    if(jobsubmit){
-                        $scope.rebuildRollback();
-                    }
+    $scope.startRefresh = function (cube) {
+      $scope.loadDetail(cube).then(function () {
+        $modal.open({
+          templateUrl: 'jobRefresh.html',
+          controller: jobSubmitCtrl,
+          resolve: {
+            cube: function () {
+              return cube;
+            },
+            buildType: function () {
+              return 'REFRESH';
+            }
+          }
+        });
+      });
 
-                    loadingRequest.hide();
-                    if(e.data&& e.data.exception){
-                        var message =e.data.exception;
-                        var msg = !!(message) ? message : 'Failed to take action.';
-                        SweetAlert.swal('Oops...', msg, 'error');
-                    }else{
-                        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
-                    }
-                });
     };
 
-    $scope.rebuildRollback = function(){
-        $scope.jobBuildRequest.endTime+=new Date().getTimezoneOffset()*60000;
+    $scope.cubeEdit = function (cube) {
+      $location.path("cubes/edit/" + cube.name);
     }
 
-    // used by cube segment refresh
-    $scope.segmentSelected = function (selectedSegment) {
-        $scope.jobBuildRequest.startTime = 0;
-        $scope.jobBuildRequest.endTime = 0;
+    $scope.startMerge = function (cube) {
+      $scope.loadDetail(cube).then(function () {
+        $modal.open({
+          templateUrl: 'jobMerge.html',
+          controller: jobSubmitCtrl,
+          resolve: {
+            cube: function () {
+              return cube;
+            },
+            buildType: function () {
+              return 'MERGE';
+            }
+          }
+        });
+      });
+    }
+  });
+
+var jobSubmitCtrl = function ($scope, $modalInstance, CubeService, MessageService, $location, cube, MetaModel, buildType, SweetAlert, loadingRequest) {
+  $scope.cube = cube;
+  $scope.metaModel = {
+    model: cube.model
+  }
+  $scope.jobBuildRequest = {
+    buildType: buildType,
+    startTime: 0,
+    endTime: 0
+  };
+  $scope.message = "";
+
+  $scope.rebuild = function (jobsubmit) {
+
+    $scope.message = null;
+    $scope.jobBuildRequest.startTime = new Date($scope.jobBuildRequest.startTime).getTime();
+    $scope.jobBuildRequest.endTime = new Date($scope.jobBuildRequest.endTime).getTime();
+
+    if ($scope.jobBuildRequest.startTime >= $scope.jobBuildRequest.endTime) {
+      $scope.message = "WARNING: End time should be later than the start time.";
+
+      //rollback date setting
+      if (jobsubmit) {
+        $scope.rebuildRollback();
+      }
+      return;
+    }
 
-        if (selectedSegment.date_range_start) {
-            $scope.jobBuildRequest.startTime = selectedSegment.date_range_start;
-        }
+    loadingRequest.show();
+    CubeService.rebuildCube({cubeId: cube.name}, $scope.jobBuildRequest, function (job) {
+
+      loadingRequest.hide();
+      $modalInstance.dismiss('cancel');
+      SweetAlert.swal('Success!', 'Rebuild job was submitted successfully', 'success');
+    }, function (e) {
+
+      //rollback date setting
+      if (jobsubmit) {
+        $scope.rebuildRollback();
+      }
+
+      loadingRequest.hide();
+      if (e.data && e.data.exception) {
+        var message = e.data.exception;
+        var msg = !!(message) ? message : 'Failed to take action.';
+        SweetAlert.swal('Oops...', msg, 'error');
+      } else {
+        SweetAlert.swal('Oops...', "Failed to take action.", 'error');
+      }
+    });
+  };
 
-        if (selectedSegment.date_range_end) {
-            $scope.jobBuildRequest.endTime = selectedSegment.date_range_end;
-        }
-    };
+  $scope.rebuildRollback = function () {
+    $scope.jobBuildRequest.endTime += new Date().getTimezoneOffset() * 60000;
+  }
 
-    // used by cube segments merge
-    $scope.mergeStartSelected = function (mergeStartSeg) {
-        $scope.jobBuildRequest.startTime = 0;
+  // used by cube segment refresh
+  $scope.segmentSelected = function (selectedSegment) {
+    $scope.jobBuildRequest.startTime = 0;
+    $scope.jobBuildRequest.endTime = 0;
 
-        if (mergeStartSeg.date_range_start) {
-            $scope.jobBuildRequest.startTime = mergeStartSeg.date_range_start;
-        }
-    };
+    if (selectedSegment.date_range_start) {
+      $scope.jobBuildRequest.startTime = selectedSegment.date_range_start;
+    }
 
-    $scope.mergeEndSelected = function (mergeEndSeg) {
-        $scope.jobBuildRequest.endTime = 0;
+    if (selectedSegment.date_range_end) {
+      $scope.jobBuildRequest.endTime = selectedSegment.date_range_end;
+    }
+  };
 
-        if (mergeEndSeg.date_range_end) {
-            $scope.jobBuildRequest.endTime = mergeEndSeg.date_range_end;
-        }
-    };
+  // used by cube segments merge
+  $scope.mergeStartSelected = function (mergeStartSeg) {
+    $scope.jobBuildRequest.startTime = 0;
 
-    $scope.updateDate = function() {
+    if (mergeStartSeg.date_range_start) {
+      $scope.jobBuildRequest.startTime = mergeStartSeg.date_range_start;
+    }
+  };
+
+  $scope.mergeEndSelected = function (mergeEndSeg) {
+    $scope.jobBuildRequest.endTime = 0;
+
+    if (mergeEndSeg.date_range_end) {
+      $scope.jobBuildRequest.endTime = mergeEndSeg.date_range_end;
+    }
+  };
+
+  $scope.updateDate = function () {
 
 
 //        if ($scope.cube.detail.partition_desc.cube_partition_type=='UPDATE_INSERT')
 //        {
 //            $scope.jobBuildRequest.startTime=$scope.formatDate($scope.jobBuildRequest.startTime);
 //        }
-        $scope.jobBuildRequest.endTime=$scope.formatDate($scope.jobBuildRequest.endTime);
-    };
-
-    $scope.formatDate = function(timestemp) {
-        var dateStart = new Date(timestemp);
-        dateStart = (dateStart.getFullYear() + "-" + (dateStart.getMonth() + 1) + "-" + dateStart.getDate());
-        //switch selected time to utc timestamp
-        return new Date(moment.utc(dateStart, "YYYY-MM-DD").format()).getTime();
-    };
-    $scope.cancel = function () {
-        $modalInstance.dismiss('cancel');
-    };
+    $scope.jobBuildRequest.endTime = $scope.formatDate($scope.jobBuildRequest.endTime);
+  };
+
+  $scope.formatDate = function (timestemp) {
+    var dateStart = new Date(timestemp);
+    dateStart = (dateStart.getFullYear() + "-" + (dateStart.getMonth() + 1) + "-" + dateStart.getDate());
+    //switch selected time to utc timestamp
+    return new Date(moment.utc(dateStart, "YYYY-MM-DD").format()).getTime();
+  };
+  $scope.cancel = function () {
+    $modalInstance.dismiss('cancel');
+  };
 };
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ba9592c8/webapp/app/js/controllers/index.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/index.js b/webapp/app/js/controllers/index.js
index 8dc2051..a648c1d 100644
--- a/webapp/app/js/controllers/index.js
+++ b/webapp/app/js/controllers/index.js
@@ -14,31 +14,31 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-*/
+ */
 
 'use strict';
 
 KylinApp.controller('IndexCtrl', function ($scope, $location, $anchorScroll) {
-    // Settings about carousel presentation.
-    $scope.myInterval = 5000;
-    // Data url for 1x1 pixel transparent gif.
-    var carouselImg = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
+  // Settings about carousel presentation.
+  $scope.myInterval = 5000;
+  // Data url for 1x1 pixel transparent gif.
+  var carouselImg = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
 
-    $scope.slides = [
-        {
-            image: carouselImg,
-            caption: 'Kylin',
-            text: 'Get your data ready for analytics'
-        },
-        {
-            image: carouselImg,
-            caption: 'Kylin',
-            text: 'Process and transform data from multiple sources'
-        },
-        {
-            image: carouselImg,
-            caption: 'Kylin',
-            text: 'Harness the power of Hadoop with zero coding and no deployment'
-        }
-    ];
+  $scope.slides = [
+    {
+      image: carouselImg,
+      caption: 'Kylin',
+      text: 'Get your data ready for analytics'
+    },
+    {
+      image: carouselImg,
+      caption: 'Kylin',
+      text: 'Process and transform data from multiple sources'
+    },
+    {
+      image: carouselImg,
+      caption: 'Kylin',
+      text: 'Harness the power of Hadoop with zero coding and no deployment'
+    }
+  ];
 });


[03/39] incubator-kylin git commit: KYLIN-682 Got "No aggregator for func 'MIN' and return type 'decimal(19, 4)'" error when build cube

Posted by li...@apache.org.
KYLIN-682 Got "No aggregator for func 'MIN' and return type 'decimal(19,4)'" error when build cube

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

Branch: refs/heads/staging
Commit: 022f05c66175c9b80b002d9971e1660b4f2e35f5
Parents: 5f1da6e
Author: Shao Feng, Shi <sh...@ebay.com>
Authored: Tue Apr 14 12:32:33 2015 +0800
Committer: Shao Feng, Shi <sh...@ebay.com>
Committed: Tue Apr 14 12:32:33 2015 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/metadata/measure/MeasureAggregator.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/022f05c6/metadata/src/main/java/org/apache/kylin/metadata/measure/MeasureAggregator.java
----------------------------------------------------------------------
diff --git a/metadata/src/main/java/org/apache/kylin/metadata/measure/MeasureAggregator.java b/metadata/src/main/java/org/apache/kylin/metadata/measure/MeasureAggregator.java
index 634c85f..0e2fc55 100644
--- a/metadata/src/main/java/org/apache/kylin/metadata/measure/MeasureAggregator.java
+++ b/metadata/src/main/java/org/apache/kylin/metadata/measure/MeasureAggregator.java
@@ -59,7 +59,7 @@ abstract public class MeasureAggregator<V> {
     }
 
     public static boolean isBigDecimal(String type) {
-        return "decimal".equalsIgnoreCase(type);
+        return type.startsWith("decimal");
     }
 
     public static boolean isDouble(String type) {


[16/39] incubator-kylin git commit: KYLIN-711 UT failure in REST module

Posted by li...@apache.org.
KYLIN-711 UT failure in REST module

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

Branch: refs/heads/staging
Commit: 13f92a2d22ebfa907d823d04017be01365ff434c
Parents: d7d9f03
Author: Shao Feng, Shi <sh...@ebay.com>
Authored: Tue Apr 21 18:02:07 2015 +0800
Committer: Shao Feng, Shi <sh...@ebay.com>
Committed: Tue Apr 21 21:43:38 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/rest/service/AccessServiceTest.java     | 8 ++++----
 .../java/org/apache/kylin/rest/service/ServiceTestBase.java  | 4 ++++
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/13f92a2d/server/src/test/java/org/apache/kylin/rest/service/AccessServiceTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/kylin/rest/service/AccessServiceTest.java b/server/src/test/java/org/apache/kylin/rest/service/AccessServiceTest.java
index d3d3c46..402440a 100644
--- a/server/src/test/java/org/apache/kylin/rest/service/AccessServiceTest.java
+++ b/server/src/test/java/org/apache/kylin/rest/service/AccessServiceTest.java
@@ -58,7 +58,7 @@ public class AccessServiceTest extends ServiceTestBase {
         // test init
         acl = accessService.init(ae, AclPermission.ADMINISTRATION);
         Assert.assertTrue(((PrincipalSid) acl.getOwner()).getPrincipal().equals("ADMIN"));
-        Assert.assertTrue(accessService.generateAceResponses(acl).size() == 1);
+        Assert.assertEquals(accessService.generateAceResponses(acl).size(), 1);
         AccessEntryResponse aer = accessService.generateAceResponses(acl).get(0);
         Assert.assertTrue(aer.getId() != null);
         Assert.assertTrue(aer.getPermission() == AclPermission.ADMINISTRATION);
@@ -67,7 +67,7 @@ public class AccessServiceTest extends ServiceTestBase {
         // test grant
         Sid modeler = accessService.getSid("MODELER", true);
         acl = accessService.grant(ae, AclPermission.ADMINISTRATION, modeler);
-        Assert.assertTrue(accessService.generateAceResponses(acl).size() == 2);
+        Assert.assertEquals(accessService.generateAceResponses(acl).size(), 2);
 
         Long modelerEntryId = null;
         for (AccessControlEntry ace : acl.getEntries()) {
@@ -82,7 +82,7 @@ public class AccessServiceTest extends ServiceTestBase {
         // test update
         acl = accessService.update(ae, modelerEntryId, AclPermission.READ);
 
-        Assert.assertTrue(accessService.generateAceResponses(acl).size() == 2);
+        Assert.assertEquals(accessService.generateAceResponses(acl).size(), 2);
 
         for (AccessControlEntry ace : acl.getEntries()) {
             PrincipalSid sid = (PrincipalSid) ace.getSid();
@@ -108,7 +108,7 @@ public class AccessServiceTest extends ServiceTestBase {
 
         // test revoke
         acl = accessService.revoke(ae, modelerEntryId);
-        Assert.assertTrue(accessService.generateAceResponses(acl).size() == 1);
+        Assert.assertEquals(accessService.generateAceResponses(acl).size(), 1);
 
         // test clean
         accessService.clean(ae, true);

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/13f92a2d/server/src/test/java/org/apache/kylin/rest/service/ServiceTestBase.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/kylin/rest/service/ServiceTestBase.java b/server/src/test/java/org/apache/kylin/rest/service/ServiceTestBase.java
index 5f98767..cc0dfc6 100644
--- a/server/src/test/java/org/apache/kylin/rest/service/ServiceTestBase.java
+++ b/server/src/test/java/org/apache/kylin/rest/service/ServiceTestBase.java
@@ -19,8 +19,10 @@
 package org.apache.kylin.rest.service;
 
 import org.apache.kylin.common.util.HBaseMetadataTestCase;
+import org.apache.kylin.cube.CubeDescManager;
 import org.apache.kylin.cube.CubeManager;
 import org.apache.kylin.dict.DictionaryManager;
+import org.apache.kylin.invertedindex.IIDescManager;
 import org.apache.kylin.invertedindex.IIManager;
 import org.apache.kylin.metadata.MetadataManager;
 import org.apache.kylin.metadata.project.ProjectManager;
@@ -58,7 +60,9 @@ public class ServiceTestBase extends HBaseMetadataTestCase {
 
         MetadataManager.clearCache();
         DictionaryManager.clearCache();
+        CubeDescManager.clearCache();
         CubeManager.clearCache();
+        IIDescManager.clearCache();
         IIManager.clearCache();
         ProjectManager.clearCache();
     }


[25/39] incubator-kylin git commit: KYLIN-715

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query49.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query49.sql b/query/src/test/resources/query/sql/query49.sql
index 814bc5c..3cd66cf 100644
--- a/query/src/test/resources/query/sql/query49.sql
+++ b/query/src/test/resources/query/sql/query49.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query50.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query50.sql b/query/src/test/resources/query/sql/query50.sql
index 9216f43..f6300a4 100644
--- a/query/src/test/resources/query/sql/query50.sql
+++ b/query/src/test/resources/query/sql/query50.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query51.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query51.sql b/query/src/test/resources/query/sql/query51.sql
index e110358..2069abd 100644
--- a/query/src/test/resources/query/sql/query51.sql
+++ b/query/src/test/resources/query/sql/query51.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query52.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query52.sql b/query/src/test/resources/query/sql/query52.sql
index 1a49ce1..8d9cff4 100644
--- a/query/src/test/resources/query/sql/query52.sql
+++ b/query/src/test/resources/query/sql/query52.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 
  where test_kylin_fact.seller_id in ( 10000002, 10000003, 10000004,10000005,10000006,10000008,10000009,10000001,10000010,10000011)

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query53.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query53.sql b/query/src/test/resources/query/sql/query53.sql
index 193297d..088cc15 100644
--- a/query/src/test/resources/query/sql/query53.sql
+++ b/query/src/test/resources/query/sql/query53.sql
@@ -1,6 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.cal_dt,test_kylin_fact.seller_id, sum(test_kylin_fact.price) as GMV
  , count(*) as TRANS_CNT 
 from test_kylin_fact
 where DATE '2012-09-01' <= test_kylin_fact.cal_dt   and  test_kylin_fact.seller_id = 10000002
  group by test_kylin_fact.cal_dt,
-test_kylin_fact.seller_id
\ No newline at end of file
+test_kylin_fact.seller_id

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query54.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query54.sql b/query/src/test/resources/query/sql/query54.sql
index 931b07f..04c26cd 100644
--- a/query/src/test/resources/query/sql/query54.sql
+++ b/query/src/test/resources/query/sql/query54.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query55.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query55.sql b/query/src/test/resources/query/sql/query55.sql
index 8f71b62..2b803f3 100644
--- a/query/src/test/resources/query/sql/query55.sql
+++ b/query/src/test/resources/query/sql/query55.sql
@@ -1 +1,19 @@
-select count(*) as c from edw.test_cal_dt as test_cal_dt where extract(YEAR from test_cal_dt.cal_dt) = 2012
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select count(*) as c from edw.test_cal_dt as test_cal_dt where extract(YEAR from test_cal_dt.cal_dt) = 2012

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query56.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query56.sql b/query/src/test/resources/query/sql/query56.sql
index 83dbe33..dd42bdd 100644
--- a/query/src/test/resources/query/sql/query56.sql
+++ b/query/src/test/resources/query/sql/query56.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 
  from test_kylin_fact 
@@ -5,4 +23,4 @@ select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) as GMV
  ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt
  where
  extract(MONTH from test_cal_dt.week_beg_dt) = 12
- group by test_cal_dt.week_beg_dt
\ No newline at end of file
+ group by test_cal_dt.week_beg_dt

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query57.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query57.sql b/query/src/test/resources/query/sql/query57.sql
index 89ab240..5e730e3 100644
--- a/query/src/test/resources/query/sql/query57.sql
+++ b/query/src/test/resources/query/sql/query57.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) as GMV 
  , count(*) as TRANS_CNT 
  from test_kylin_fact 
@@ -5,4 +23,4 @@ select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) as GMV
  ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt
  where
  (test_kylin_fact.lstg_format_name='FP-GTC')  and extract(MONTH from test_cal_dt.week_beg_dt) = 12
- group by test_cal_dt.week_beg_dt
\ No newline at end of file
+ group by test_cal_dt.week_beg_dt

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query58.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query58.sql b/query/src/test/resources/query/sql/query58.sql
index 4cc834b..7d30866 100644
--- a/query/src/test/resources/query/sql/query58.sql
+++ b/query/src/test/resources/query/sql/query58.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select  sum(test_kylin_fact.price) as GMV
  , count(*) as TRANS_CNT
  from test_kylin_fact
@@ -5,4 +23,4 @@ select  sum(test_kylin_fact.price) as GMV
  ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt
  where
  (test_kylin_fact.lstg_format_name='FP-GTC')  and extract(MONTH from test_cal_dt.week_beg_dt) = 12
- group by test_kylin_fact.lstg_format_name
\ No newline at end of file
+ group by test_kylin_fact.lstg_format_name

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query59.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query59.sql b/query/src/test/resources/query/sql/query59.sql
index d2db28c..7870433 100644
--- a/query/src/test/resources/query/sql/query59.sql
+++ b/query/src/test/resources/query/sql/query59.sql
@@ -1 +1,19 @@
-select sum(price) as GVM,lstg_format_name from test_kylin_fact group by lstg_format_name
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select sum(price) as GVM,lstg_format_name from test_kylin_fact group by lstg_format_name

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query60.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query60.sql b/query/src/test/resources/query/sql/query60.sql
index 3e1b0f0..f1d4ac7 100644
--- a/query/src/test/resources/query/sql/query60.sql
+++ b/query/src/test/resources/query/sql/query60.sql
@@ -1,6 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.cal_dt, sum(test_kylin_fact.price) as sum_price, count(1) as cnt_1
 from test_kylin_fact 
 left JOIN edw.test_cal_dt as test_cal_dt on test_kylin_fact.cal_dt=test_cal_dt.cal_dt 
 group by test_kylin_fact.cal_dt 
 order by 2 desc 
-limit 3
\ No newline at end of file
+limit 3

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query61.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query61.sql b/query/src/test/resources/query/sql/query61.sql
index 243e61e..19c3b95 100644
--- a/query/src/test/resources/query/sql/query61.sql
+++ b/query/src/test/resources/query/sql/query61.sql
@@ -1,6 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select count(1) as cnt_1
 from test_kylin_fact 
 left JOIN edw.test_cal_dt as test_cal_dt on test_kylin_fact.cal_dt=test_cal_dt.cal_dt 
 group by test_kylin_fact.cal_dt 
 order by 1 desc 
-limit 4
\ No newline at end of file
+limit 4

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query62.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query62.sql b/query/src/test/resources/query/sql/query62.sql
index b9bbd0b..1371674 100644
--- a/query/src/test/resources/query/sql/query62.sql
+++ b/query/src/test/resources/query/sql/query62.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV , min(cal_dt) as min_cal_dt
  , count(*) as TRANS_CNT from test_kylin_fact
- group by test_kylin_fact.lstg_format_name having sum(price)>5000 and count(*)>72
\ No newline at end of file
+ group by test_kylin_fact.lstg_format_name having sum(price)>5000 and count(*)>72

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query63.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query63.sql b/query/src/test/resources/query/sql/query63.sql
index 13a26bc..084822e 100644
--- a/query/src/test/resources/query/sql/query63.sql
+++ b/query/src/test/resources/query/sql/query63.sql
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select min(cal_dt) as min_cal_dt
- from test_kylin_fact
\ No newline at end of file
+ from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query64.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query64.sql b/query/src/test/resources/query/sql/query64.sql
index bbf99a8..77f5710 100644
--- a/query/src/test/resources/query/sql/query64.sql
+++ b/query/src/test/resources/query/sql/query64.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
  select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV , min(cal_dt) as min_cal_dt
  , count(*) as TRANS_CNT from test_kylin_fact
- group by test_kylin_fact.lstg_format_name
\ No newline at end of file
+ group by test_kylin_fact.lstg_format_name

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query65.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query65.sql b/query/src/test/resources/query/sql/query65.sql
index b44cb1b..98cb7ab 100644
--- a/query/src/test/resources/query/sql/query65.sql
+++ b/query/src/test/resources/query/sql/query65.sql
@@ -1 +1,19 @@
-select min(cal_dt) as min_cal_dt, max(cal_dt) as max_cal_dt from test_kylin_fact
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select min(cal_dt) as min_cal_dt, max(cal_dt) as max_cal_dt from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query66.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query66.sql b/query/src/test/resources/query/sql/query66.sql
index 46eb159..7889cbb 100644
--- a/query/src/test/resources/query/sql/query66.sql
+++ b/query/src/test/resources/query/sql/query66.sql
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.cal_dt, max(test_kylin_fact.cal_dt) as mmm from test_kylin_fact left join edw.test_cal_dt as test_cal_dt 
-	on test_kylin_fact.cal_dt=test_cal_dt.cal_dt group by test_kylin_fact.cal_dt order by 2 desc limit 7
\ No newline at end of file
+	on test_kylin_fact.cal_dt=test_cal_dt.cal_dt group by test_kylin_fact.cal_dt order by 2 desc limit 7

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query67.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query67.sql b/query/src/test/resources/query/sql/query67.sql
index b50b518..1bc4424 100644
--- a/query/src/test/resources/query/sql/query67.sql
+++ b/query/src/test/resources/query/sql/query67.sql
@@ -1,4 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT (CASE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" WHEN 'Auction' THEN '111' ELSE '222' END) AS "LSTG_FORMAT_NAME__group_",
   SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok"
 FROM "TEST_KYLIN_FACT" "TEST_KYLIN_FACT"
-group by (CASE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" WHEN 'Auction' THEN '111' ELSE '222' END)  ORDER BY 1 ASC
\ No newline at end of file
+group by (CASE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" WHEN 'Auction' THEN '111' ELSE '222' END)  ORDER BY 1 ASC

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query68.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query68.sql b/query/src/test/resources/query/sql/query68.sql
index 635c131..fc5404f 100644
--- a/query/src/test/resources/query/sql/query68.sql
+++ b/query/src/test/resources/query/sql/query68.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select cal_dt as bb , sum(price) as aa from test_kylin_fact fact
 inner join (
 
@@ -5,4 +23,4 @@ inner join (
 select count(1) as cnt, min(cal_dt) as "mmm",  cal_dt as dt from test_kylin_fact group by cal_dt order by 2 desc limit 10
 
 
-) t0 on (fact.cal_dt = t0.dt) group by cal_dt
\ No newline at end of file
+) t0 on (fact.cal_dt = t0.dt) group by cal_dt

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query69.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query69.sql b/query/src/test/resources/query/sql/query69.sql
index 5491078..0a93d90 100644
--- a/query/src/test/resources/query/sql/query69.sql
+++ b/query/src/test/resources/query/sql/query69.sql
@@ -1,7 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, 
  sum(price) as GMV, 
  count(1) as TRANS_CNT 
  from test_kylin_fact 
  where (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" IN ('Auction', 'FP-GTC')) THEN 'Auction' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END) = 'Auction'
  group by lstg_format_name 
- order by sum(price)
\ No newline at end of file
+ order by sum(price)

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query70.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query70.sql b/query/src/test/resources/query/sql/query70.sql
index 413fb12..055990d 100644
--- a/query/src/test/resources/query/sql/query70.sql
+++ b/query/src/test/resources/query/sql/query70.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, 
  sum(price) as GMV, 
  count(1) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query71.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query71.sql b/query/src/test/resources/query/sql/query71.sql
index e6b69c9..9288ec1 100644
--- a/query/src/test/resources/query/sql/query71.sql
+++ b/query/src/test/resources/query/sql/query71.sql
@@ -1,6 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, 
  sum(price) as GMV, 
  count(1) as TRANS_CNT 
  from test_kylin_fact 
  where "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" in ('Auction', 'ABIN') and (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" IN ('Auction', 'FP-GTC')) THEN 'Auction' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END) = 'Auction'
- group by lstg_format_name 
\ No newline at end of file
+ group by lstg_format_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query72.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query72.sql b/query/src/test/resources/query/sql/query72.sql
index 350e7aa..4c27789 100644
--- a/query/src/test/resources/query/sql/query72.sql
+++ b/query/src/test/resources/query/sql/query72.sql
@@ -1,6 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.week_beg_dt, test_kylin_fact.lstg_format_name, sum(test_kylin_fact.price) as GMV, count(*) as TRANS_CNT 
  from test_kylin_fact 
  inner JOIN edw.test_cal_dt as test_cal_dt 
  on test_kylin_fact.cal_dt = test_cal_dt.cal_dt
  where test_kylin_fact.lstg_format_name='FP-GTC'  or extract(MONTH from test_cal_dt.week_beg_dt) = 12
- group by test_cal_dt.week_beg_dt, test_kylin_fact.lstg_format_name
\ No newline at end of file
+ group by test_cal_dt.week_beg_dt, test_kylin_fact.lstg_format_name

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query73.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query73.sql b/query/src/test/resources/query/sql/query73.sql
index d5f1cbb..229dd63 100644
--- a/query/src/test/resources/query/sql/query73.sql
+++ b/query/src/test/resources/query/sql/query73.sql
@@ -1 +1,19 @@
-select min("t"."s") as min_pr from (select max(price) as "s" from test_kylin_fact group by lstg_format_name) "t"  having (count(1) > 0)
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select min("t"."s") as min_pr from (select max(price) as "s" from test_kylin_fact group by lstg_format_name) "t"  having (count(1) > 0)

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query74.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query74.sql b/query/src/test/resources/query/sql/query74.sql
index 111804e..92a3e2a 100644
--- a/query/src/test/resources/query/sql/query74.sql
+++ b/query/src/test/resources/query/sql/query74.sql
@@ -1 +1,19 @@
-select min("t"."s") as min_x, max("t"."s") as max_x from (select max(price) as "s" from test_kylin_fact group by lstg_format_name) "t" having ( count(1)  > 0)
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+select min("t"."s") as min_x, max("t"."s") as max_x from (select max(price) as "s" from test_kylin_fact group by lstg_format_name) "t" having ( count(1)  > 0)

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query75.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query75.sql b/query/src/test/resources/query/sql/query75.sql
index d47f65e..1848e0a 100644
--- a/query/src/test/resources/query/sql/query75.sql
+++ b/query/src/test/resources/query/sql/query75.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 
  where (NOT ((CASE WHEN (lstg_format_name IS NULL) THEN 1 WHEN NOT (lstg_format_name IS NULL) THEN 0 ELSE NULL END) <> 0))

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query76.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query76.sql b/query/src/test/resources/query/sql/query76.sql
index 32b1582..7ba7340 100644
--- a/query/src/test/resources/query/sql/query76.sql
+++ b/query/src/test/resources/query/sql/query76.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 
  group by lstg_format_name, SLR_SEGMENT_CD

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query77.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query77.sql b/query/src/test/resources/query/sql/query77.sql
index 829d61d..79c1d70 100644
--- a/query/src/test/resources/query/sql/query77.sql
+++ b/query/src/test/resources/query/sql/query77.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV
  , count(*) as TRANS_CNT from test_kylin_fact
- group by test_kylin_fact.lstg_format_name having sum(price)>5000 and count(*)>72
\ No newline at end of file
+ group by test_kylin_fact.lstg_format_name having sum(price)>5000 and count(*)>72

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql/query78.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query78.sql b/query/src/test/resources/query/sql/query78.sql
index d055b8e..2e58077 100644
--- a/query/src/test/resources/query/sql/query78.sql
+++ b/query/src/test/resources/query/sql/query78.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select sum(PRICE) as GMV, LSTG_FORMAT_NAME as FORMAT_NAME
 from test_kylin_fact
 where (LSTG_FORMAT_NAME in ('ABIN')) or  (LSTG_FORMAT_NAME>='FP-GTC' and LSTG_FORMAT_NAME<='Others')

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_all_types/query00.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query00.sql b/query/src/test/resources/query/sql_all_types/query00.sql
index 3e02614..870e122 100644
--- a/query/src/test/resources/query/sql_all_types/query00.sql
+++ b/query/src/test/resources/query/sql_all_types/query00.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select ML_tinyint, sum(price) as GMV from test_kylin_fact group by ML_tinyint order by ML_tinyint 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_all_types/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query01.sql b/query/src/test/resources/query/sql_all_types/query01.sql
index c3a5bef..89d13ff 100644
--- a/query/src/test/resources/query/sql_all_types/query01.sql
+++ b/query/src/test/resources/query/sql_all_types/query01.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select ML_smallint, sum(price) as GMV from test_kylin_fact group by ML_smallint order by ML_smallint 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_all_types/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query02.sql b/query/src/test/resources/query/sql_all_types/query02.sql
index 710d991..e64516d 100644
--- a/query/src/test/resources/query/sql_all_types/query02.sql
+++ b/query/src/test/resources/query/sql_all_types/query02.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select ML_int, sum(price) as GMV from test_kylin_fact group by ML_int order by ML_int 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_all_types/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query03.sql b/query/src/test/resources/query/sql_all_types/query03.sql
index 34dd85e..2334dc8 100644
--- a/query/src/test/resources/query/sql_all_types/query03.sql
+++ b/query/src/test/resources/query/sql_all_types/query03.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select ML_bigint, sum(price) as GMV from test_kylin_fact group by ML_bigint order by ML_bigint 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_all_types/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query04.sql b/query/src/test/resources/query/sql_all_types/query04.sql
index 23f9081..7a4d4fb 100644
--- a/query/src/test/resources/query/sql_all_types/query04.sql
+++ b/query/src/test/resources/query/sql_all_types/query04.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select ML_float, sum(price) as GMV from test_kylin_fact group by ML_float order by ML_float 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_all_types/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query05.sql b/query/src/test/resources/query/sql_all_types/query05.sql
index 5614706..de53ec4 100644
--- a/query/src/test/resources/query/sql_all_types/query05.sql
+++ b/query/src/test/resources/query/sql_all_types/query05.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select ML_double, sum(price) as GMV from test_kylin_fact group by ML_double order by ML_double 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_all_types/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query06.sql b/query/src/test/resources/query/sql_all_types/query06.sql
index 1f49d51..f533763 100644
--- a/query/src/test/resources/query/sql_all_types/query06.sql
+++ b/query/src/test/resources/query/sql_all_types/query06.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select ML_decimal, sum(price) as GMV from test_kylin_fact group by ML_decimal order by ML_decimal 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_all_types/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query07.sql b/query/src/test/resources/query/sql_all_types/query07.sql
index 9a4b4af..b46105e 100644
--- a/query/src/test/resources/query/sql_all_types/query07.sql
+++ b/query/src/test/resources/query/sql_all_types/query07.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select ML_boolean, sum(price) as GMV from test_kylin_fact group by ML_boolean order by ML_boolean 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_all_types/query08.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query08.sql b/query/src/test/resources/query/sql_all_types/query08.sql
index dd8fef0..5cac3f9 100644
--- a/query/src/test/resources/query/sql_all_types/query08.sql
+++ b/query/src/test/resources/query/sql_all_types/query08.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select ML_varchar, sum(price) as GMV from test_kylin_fact group by ML_varchar order by ML_varchar 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_all_types/query09.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_all_types/query09.sql b/query/src/test/resources/query/sql_all_types/query09.sql
index d2cc8d8..00ecff6 100644
--- a/query/src/test/resources/query/sql_all_types/query09.sql
+++ b/query/src/test/resources/query/sql_all_types/query09.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select ML_char, sum(price) as GMV from test_kylin_fact group by ML_char order by ML_char 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_casewhen/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_casewhen/query01.sql b/query/src/test/resources/query/sql_casewhen/query01.sql
index 825cad6..98159fb 100644
--- a/query/src/test/resources/query/sql_casewhen/query01.sql
+++ b/query/src/test/resources/query/sql_casewhen/query01.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT lstg_format_name 
 FROM   test_kylin_fact 
 WHERE  ( NOT ( ( CASE 
@@ -5,4 +23,4 @@ WHERE  ( NOT ( ( CASE
                    WHEN NOT ( lstg_format_name IS NULL ) THEN 0 
                    ELSE NULL 
                  END ) <> 0 ) ) 
-GROUP  BY lstg_format_name 
\ No newline at end of file
+GROUP  BY lstg_format_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_casewhen/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_casewhen/query02.sql b/query/src/test/resources/query/sql_casewhen/query02.sql
index 986fea1..8db7e7e 100644
--- a/query/src/test/resources/query/sql_casewhen/query02.sql
+++ b/query/src/test/resources/query/sql_casewhen/query02.sql
@@ -1,4 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" 
 FROM   TEST_KYLIN_FACT 
 WHERE  ((CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" = 'Auction') THEN 'Auction1' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END) = 'Auction1')
-GROUP BY "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" 
\ No newline at end of file
+GROUP BY "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_casewhen/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_casewhen/query03.sql b/query/src/test/resources/query/sql_casewhen/query03.sql
index 2c3881f..09300c3 100644
--- a/query/src/test/resources/query/sql_casewhen/query03.sql
+++ b/query/src/test/resources/query/sql_casewhen/query03.sql
@@ -1,7 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" 
 FROM   TEST_KYLIN_FACT 
 WHERE  (CASE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" 
 	WHEN 'Auction' THEN '111' 
 	WHEN 'FP-GTC' THEN '222' 
 	ELSE '999' END) = '111'
-GROUP BY "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" 
\ No newline at end of file
+GROUP BY "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_casewhen/query55.sql.disable
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_casewhen/query55.sql.disable b/query/src/test/resources/query/sql_casewhen/query55.sql.disable
index ea73cd8..7bb2ce9 100644
--- a/query/src/test/resources/query/sql_casewhen/query55.sql.disable
+++ b/query/src/test/resources/query/sql_casewhen/query55.sql.disable
@@ -1,4 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" IN ('Auction', 'FP-GTC')) THEN 'Auction' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END) AS "LSTG_FORMAT_NAME__group_",
   SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok"
 FROM "TEST_KYLIN_FACT" "TEST_KYLIN_FACT"
-GROUP BY (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" IN ('Auction', 'FP-GTC')) THEN 'Auction' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END)
\ No newline at end of file
+GROUP BY (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" IN ('Auction', 'FP-GTC')) THEN 'Auction' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END)

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_casewhen/query56.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_casewhen/query56.sql b/query/src/test/resources/query/sql_casewhen/query56.sql
index 07f5db6..4c72096 100644
--- a/query/src/test/resources/query/sql_casewhen/query56.sql
+++ b/query/src/test/resources/query/sql_casewhen/query56.sql
@@ -1,4 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
  SELECT (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" = 'Auction') THEN 'Auction2' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END) AS "LSTG_FORMAT_NAME__group_",
   SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok"
 FROM "TEST_KYLIN_FACT" "TEST_KYLIN_FACT"
-GROUP BY (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" =  'Auction') THEN 'Auction2' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END)
\ No newline at end of file
+GROUP BY (CASE WHEN ("TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" =  'Auction') THEN 'Auction2' ELSE "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" END)

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_derived/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query01.sql b/query/src/test/resources/query/sql_derived/query01.sql
index 80d5738..cb7cc67 100644
--- a/query/src/test/resources/query/sql_derived/query01.sql
+++ b/query/src/test/resources/query/sql_derived/query01.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_kylin_fact.seller_id 
  ,test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_derived/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query02.sql b/query/src/test/resources/query/sql_derived/query02.sql
index 0bf5ad9..ec089cf 100644
--- a/query/src/test/resources/query/sql_derived/query02.sql
+++ b/query/src/test/resources/query/sql_derived/query02.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_kylin_fact.seller_id 
  ,test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_derived/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query03.sql b/query/src/test/resources/query/sql_derived/query03.sql
index 8c7938a..7a42c5b 100644
--- a/query/src/test/resources/query/sql_derived/query03.sql
+++ b/query/src/test/resources/query/sql_derived/query03.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT distinct LSTG_FORMAT_NAME from test_kylin_fact 
  
  

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_derived/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query04.sql b/query/src/test/resources/query/sql_derived/query04.sql
index cad008a..2ca9044 100644
--- a/query/src/test/resources/query/sql_derived/query04.sql
+++ b/query/src/test/resources/query/sql_derived/query04.sql
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT site_id, site_name, cre_user from edw.test_sites 
  

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_derived/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query05.sql b/query/src/test/resources/query/sql_derived/query05.sql
index 6b1caec..65d68d5 100644
--- a/query/src/test/resources/query/sql_derived/query05.sql
+++ b/query/src/test/resources/query/sql_derived/query05.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT test_sites.site_name, test_kylin_fact.lstg_format_name, sum(test_kylin_fact.price) as GMV, count(*) as TRANS_CNT 
  FROM test_kylin_fact 
  inner JOIN edw.test_sites as test_sites ON test_kylin_fact.lstg_site_id = test_sites.site_id 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_derived/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query06.sql b/query/src/test/resources/query/sql_derived/query06.sql
index 2d70f45..3b510fd 100644
--- a/query/src/test/resources/query/sql_derived/query06.sql
+++ b/query/src/test/resources/query/sql_derived/query06.sql
@@ -1,2 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT distinct cal_dt from test_kylin_fact 
  

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_derived/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query07.sql b/query/src/test/resources/query/sql_derived/query07.sql
index e3ef635..3956421 100644
--- a/query/src/test/resources/query/sql_derived/query07.sql
+++ b/query/src/test/resources/query/sql_derived/query07.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select cal_dt, lstg_format_name, sum(price) as GMV 
  from test_kylin_fact 
  where cal_dt=date '2013-05-06' 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_derived/query08.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query08.sql.disabled b/query/src/test/resources/query/sql_derived/query08.sql.disabled
index 17cdc4e..f2173d2 100644
--- a/query/src/test/resources/query/sql_derived/query08.sql.disabled
+++ b/query/src/test/resources/query/sql_derived/query08.sql.disabled
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select distinct leaf_categ_id, lstg_site_id from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_derived/query09.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query09.sql b/query/src/test/resources/query/sql_derived/query09.sql
index 0ecbb5b..ff6f46a 100644
--- a/query/src/test/resources/query/sql_derived/query09.sql
+++ b/query/src/test/resources/query/sql_derived/query09.sql
@@ -1 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select distinct leaf_categ_id, site_id from test_category_groupings 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_derived/query10.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_derived/query10.sql b/query/src/test/resources/query/sql_derived/query10.sql
index f0d62d2..4903314 100644
--- a/query/src/test/resources/query/sql_derived/query10.sql
+++ b/query/src/test/resources/query/sql_derived/query10.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 SELECT 
  test_cal_dt.week_beg_dt 
  ,test_category_groupings.meta_categ_name 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_distinct/query00.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query00.sql b/query/src/test/resources/query/sql_distinct/query00.sql
index 021caf4..584d0be 100644
--- a/query/src/test/resources/query/sql_distinct/query00.sql
+++ b/query/src/test/resources/query/sql_distinct/query00.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, cal_dt,
  sum(price) as GMV, 
  count(1) as TRANS_CNT, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_distinct/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query01.sql b/query/src/test/resources/query/sql_distinct/query01.sql
index d57ef11..60e436d 100644
--- a/query/src/test/resources/query/sql_distinct/query01.sql
+++ b/query/src/test/resources/query/sql_distinct/query01.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, 
  sum(price) as GMV, 
  count(1) as TRANS_CNT, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_distinct/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query02.sql b/query/src/test/resources/query/sql_distinct/query02.sql
index 3c5589c..8fcf5de 100644
--- a/query/src/test/resources/query/sql_distinct/query02.sql
+++ b/query/src/test/resources/query/sql_distinct/query02.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select lstg_format_name, 
  sum(price) as GMV, 
  count(1) as TRANS_CNT, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e1960f83/query/src/test/resources/query/sql_distinct/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query03.sql b/query/src/test/resources/query/sql_distinct/query03.sql
index a1b0e8d..d17e96a 100644
--- a/query/src/test/resources/query/sql_distinct/query03.sql
+++ b/query/src/test/resources/query/sql_distinct/query03.sql
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 select test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
  , count(1) as TRANS_CNT, count(distinct seller_id) as DIST_SELLER 
  from test_kylin_fact 


[22/39] incubator-kylin git commit: KYLIN-715 fix license issue

Posted by li...@apache.org.
KYLIN-715 fix license issue


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

Branch: refs/heads/staging
Commit: 0f3c6ae10b9f804162e0054cb19e38e7168efafd
Parents: 7514ad2
Author: lukehan <lu...@apache.org>
Authored: Fri Apr 24 00:18:50 2015 +0800
Committer: lukehan <lu...@apache.org>
Committed: Fri Apr 24 00:18:50 2015 +0800

----------------------------------------------------------------------
 .gitignore                                        |  3 ++-
 .../org/apache/kylin/common/util/SoutLogger.java  | 17 +++++++++++++++++
 .../apache/kylin/common/util/HbaseImporter.java   | 18 ++++++++++++++++++
 examples/sample_cube/create_sample_tables.sql     | 16 ++++++++++++++++
 pom.xml                                           | 14 ++++++++++++++
 webapp/.bowerrc                                   | 17 +++++++++++++++++
 webapp/.jshintrc                                  | 17 +++++++++++++++++
 webapp/Gruntfile.js                               | 17 +++++++++++++++++
 8 files changed, 118 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/0f3c6ae1/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 6649d69..08a55a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,13 +53,14 @@ hs_err_pid*
 .classpath
 .project
 .idea
-.DS_Store
+**/*.DS_Store
 target
 logs
 *.jar
 *.releaseBackup
 *.log
 *.DS_Store
+*.releaseBackup
 
 # .settings
 org.eclipse.m2e.core.prefs

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/0f3c6ae1/common/src/main/java/org/apache/kylin/common/util/SoutLogger.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/kylin/common/util/SoutLogger.java b/common/src/main/java/org/apache/kylin/common/util/SoutLogger.java
index 3bd9090..e7a8ef0 100644
--- a/common/src/main/java/org/apache/kylin/common/util/SoutLogger.java
+++ b/common/src/main/java/org/apache/kylin/common/util/SoutLogger.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
 package org.apache.kylin.common.util;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/0f3c6ae1/common/src/test/java/org/apache/kylin/common/util/HbaseImporter.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/kylin/common/util/HbaseImporter.java b/common/src/test/java/org/apache/kylin/common/util/HbaseImporter.java
index e1bac24..16c3307 100644
--- a/common/src/test/java/org/apache/kylin/common/util/HbaseImporter.java
+++ b/common/src/test/java/org/apache/kylin/common/util/HbaseImporter.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
 package org.apache.kylin.common.util;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/0f3c6ae1/examples/sample_cube/create_sample_tables.sql
----------------------------------------------------------------------
diff --git a/examples/sample_cube/create_sample_tables.sql b/examples/sample_cube/create_sample_tables.sql
index ad6f3d6..8cd8738 100644
--- a/examples/sample_cube/create_sample_tables.sql
+++ b/examples/sample_cube/create_sample_tables.sql
@@ -1,3 +1,19 @@
+--Licensed to the Apache Software Foundation (ASF) under one
+--or more contributor license agreements.  See the NOTICE file
+--distributed with this work for additional information
+--regarding copyright ownership.  The ASF licenses this file
+--to you under the Apache License, Version 2.0 (the
+--"License"); you may not use this file except in compliance
+--with the License.  You may obtain a copy of the License at
+-- 
+--   http://www.apache.org/licenses/LICENSE-2.0
+-- 
+--Unless required by applicable law or agreed to in writing, software
+--distributed under the License is distributed on an "AS IS" BASIS,
+--WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--See the License for the specific language governing permissions and
+--limitations under the License.
+
 DROP TABLE IF EXISTS DEFAULT.KYLIN_CAL_DT;
 
 CREATE TABLE DEFAULT.KYLIN_CAL_DT

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/0f3c6ae1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cbf876c..5b09e15 100644
--- a/pom.xml
+++ b/pom.xml
@@ -658,8 +658,22 @@
                                 <exclude>**/*.dict</exclude>
                                 <exclude>**/*.snapshot</exclude>
                                 <exclude>**/*.pdf</exclude>
+
                                 <!-- generated files -->
                                 <exclude>**/target/**</exclude>
+                                <exclude>lib/**</exclude>
+                                <!-- Kylin's website content -->
+                                <exclude>**/.sass-cache/**</exclude>
+                                <exclude>docs/website/**</exclude>
+                                <!-- tomcat package -->
+                                <exclude>tomcat/**</exclude>
+                                <!-- front end libary and generated files -->
+                                <exclude>webapp/node_modules/**</exclude>
+                                <exclude>webapp/dist/**</exclude>
+                                <exclude>webapp/app/components/**</exclude>
+                                <!-- Temp -->
+                                <exclude>webapp/template/nginx_default.conf</exclude>
+                                <exclude>webapp/validate-commit-msg.js</exclude>
                             </excludes>
                         </configuration>
                         <executions>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/0f3c6ae1/webapp/.bowerrc
----------------------------------------------------------------------
diff --git a/webapp/.bowerrc b/webapp/.bowerrc
index e1094e6..19888b4 100644
--- a/webapp/.bowerrc
+++ b/webapp/.bowerrc
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
 {
   "directory": "app/components"
 }

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/0f3c6ae1/webapp/.jshintrc
----------------------------------------------------------------------
diff --git a/webapp/.jshintrc b/webapp/.jshintrc
index 0839b6b..4b24574 100644
--- a/webapp/.jshintrc
+++ b/webapp/.jshintrc
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
 {
   "bitwise": true,
   "browser": true,

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/0f3c6ae1/webapp/Gruntfile.js
----------------------------------------------------------------------
diff --git a/webapp/Gruntfile.js b/webapp/Gruntfile.js
index d78a5e0..64dc859 100644
--- a/webapp/Gruntfile.js
+++ b/webapp/Gruntfile.js
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
 'use strict';
 
 module.exports = function (grunt) {


[05/39] incubator-kylin git commit: KYLIN-684 Remove holistic distinct count and multiple column distinct count from sample cube

Posted by li...@apache.org.
KYLIN-684 Remove holistic distinct count and multiple column distinct count from sample cube

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

Branch: refs/heads/staging
Commit: c5a19f5fa0ee3c59a91d8f8e91d78f1a4f8314fc
Parents: 4a41d7e
Author: Shao Feng, Shi <sh...@ebay.com>
Authored: Tue Apr 14 13:48:41 2015 +0800
Committer: Shao Feng, Shi <sh...@ebay.com>
Committed: Tue Apr 14 13:48:41 2015 +0800

----------------------------------------------------------------------
 .../cube_desc/kylin_sales_cube_desc.json        | 24 +++++---------------
 1 file changed, 6 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/c5a19f5f/examples/sample_cube/metadata/cube_desc/kylin_sales_cube_desc.json
----------------------------------------------------------------------
diff --git a/examples/sample_cube/metadata/cube_desc/kylin_sales_cube_desc.json b/examples/sample_cube/metadata/cube_desc/kylin_sales_cube_desc.json
index a67e70e..4d402fe 100644
--- a/examples/sample_cube/metadata/cube_desc/kylin_sales_cube_desc.json
+++ b/examples/sample_cube/metadata/cube_desc/kylin_sales_cube_desc.json
@@ -40,7 +40,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {
@@ -52,7 +52,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {
@@ -64,7 +64,7 @@
         "type" : "column",
         "value" : "PRICE"
       },
-      "returntype" : "decimal"
+      "returntype" : "decimal(19,4)"
     },
     "dependent_measure_ref" : null
   }, {
@@ -93,24 +93,12 @@
     "dependent_measure_ref" : null
   }, {
     "id" : 6,
-    "name" : "SELLER_CNT_LONG",
-    "function" : {
-      "expression" : "COUNT_DISTINCT",
-      "parameter" : {
-        "type" : "column",
-        "value" : "SELLER_ID"
-      },
-      "returntype" : "bigint"
-    },
-    "dependent_measure_ref" : "SELLER_CNT_HLL"
-  }, {
-    "id" : 7,
     "name" : "SELLER_FORMAT_CNT",
     "function" : {
       "expression" : "COUNT_DISTINCT",
       "parameter" : {
         "type" : "column",
-        "value" : "LSTG_FORMAT_NAME,SELLER_ID"
+        "value" : "LSTG_FORMAT_NAME"
       },
       "returntype" : "hllc(10)"
     },
@@ -155,7 +143,7 @@
     } ],
     "aggregation_groups" : [ [ "part_dt", "lstg_site_id", "leaf_categ_id", "meta_categ_name", "categ_lvl3_name", "categ_lvl2_name", "lstg_format_name" ] ]
   },
-  "signature" : "ZJWTQ2jIPXjBfuwYeizpxg==",
+  "signature" : "OWc6h/qpWCBgxEnzB5wr0w==",
   "last_modified" : 1426255280419,
   "model_name" : "kylin_sales_model",
   "null_string" : null,
@@ -164,7 +152,7 @@
       "name" : "f1",
       "columns" : [ {
         "qualifier" : "m",
-        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt", "seller_cnt_long" ]
+        "measure_refs" : [ "gmv_sum", "gmv_min", "gmv_max", "trans_cnt" ]
       } ]
     }, {
       "name" : "f2",


[15/39] incubator-kylin git commit: KYLIN-686 Maven release dry-run hang

Posted by li...@apache.org.
KYLIN-686 Maven release dry-run hang

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

Branch: refs/heads/staging
Commit: d7d9f03817c438991de01d0d32d19dd965dae9c5
Parents: ac5bb81
Author: Shao Feng, Shi <sh...@ebay.com>
Authored: Tue Apr 21 15:35:49 2015 +0800
Committer: Shao Feng, Shi <sh...@ebay.com>
Committed: Tue Apr 21 15:45:46 2015 +0800

----------------------------------------------------------------------
 job/pom.xml    | 18 ------------------
 pom.xml        |  1 +
 server/pom.xml |  6 ------
 3 files changed, 1 insertion(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/d7d9f038/job/pom.xml
----------------------------------------------------------------------
diff --git a/job/pom.xml b/job/pom.xml
index 57a80ec..c76dccf 100644
--- a/job/pom.xml
+++ b/job/pom.xml
@@ -226,24 +226,6 @@
                 </exclusion>
             </exclusions>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.hbase</groupId>
-            <artifactId>hbase-testing-util</artifactId>
-            <version>${hbase-hadoop2.version}</version>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>javax.servlet</groupId>
-                    <artifactId>servlet-api</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>javax.servlet.jsp</groupId>
-                    <artifactId>jsp-api</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
     </dependencies>
 
     <build>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/d7d9f038/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c083867..6753e69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -678,6 +678,7 @@
           <plugin>
             <groupId>net.ju-n.maven.plugins</groupId>
             <artifactId>checksum-maven-plugin</artifactId>
+            <version>1.2</version>
             <executions>
               <execution>
                 <goals>

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/d7d9f038/server/pom.xml
----------------------------------------------------------------------
diff --git a/server/pom.xml b/server/pom.xml
index 8fc03b3..c99ed94 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -444,12 +444,6 @@
             <version>${jetty.version}</version>
             <scope>test</scope>
         </dependency>
-		<dependency>
-		    <groupId>com.thetransactioncompany</groupId>
-		    <artifactId>cors-filter</artifactId>
-		    <version>1.3.2</version>
-		</dependency>
-
     </dependencies>
 
     <build>


[34/39] incubator-kylin git commit: KYLIN-715 modify license format for .sql files

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/tableau_probing/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query04.sql b/query/src/test/resources/query/tableau_probing/query04.sql
index a43d456..da0d3a2 100644
--- a/query/src/test/resources/query/tableau_probing/query04.sql
+++ b/query/src/test/resources/query/tableau_probing/query04.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT TOP 1 "COL" FROM (SELECT 1 AS "COL") AS "CHECKTOP" 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/tableau_probing/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query05.sql b/query/src/test/resources/query/tableau_probing/query05.sql
index 7886d1f..7fae0d7 100644
--- a/query/src/test/resources/query/tableau_probing/query05.sql
+++ b/query/src/test/resources/query/tableau_probing/query05.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "COL" FROM (SELECT 1 AS "COL") AS "CHECKTOP" LIMIT 1 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/tableau_probing/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query06.sql b/query/src/test/resources/query/tableau_probing/query06.sql
index dd0e538..1a609bb 100644
--- a/query/src/test/resources/query/tableau_probing/query06.sql
+++ b/query/src/test/resources/query/tableau_probing/query06.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "SUBCOL" AS "COL" FROM ( SELECT 1 AS "SUBCOL" ) "SUBQUERY" GROUP BY 1 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/tableau_probing/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/tableau_probing/query07.sql b/query/src/test/resources/query/tableau_probing/query07.sql
index f0f782d..e2722d6 100644
--- a/query/src/test/resources/query/tableau_probing/query07.sql
+++ b/query/src/test/resources/query/tableau_probing/query07.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "SUBCOL" AS "COL" FROM ( SELECT 1 AS "SUBCOL" ) "SUBQUERY" GROUP BY 2 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/webapp/.bowerrc
----------------------------------------------------------------------
diff --git a/webapp/.bowerrc b/webapp/.bowerrc
index 19888b4..e1094e6 100644
--- a/webapp/.bowerrc
+++ b/webapp/.bowerrc
@@ -1,20 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
 {
   "directory": "app/components"
 }

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/webapp/.jshintrc
----------------------------------------------------------------------
diff --git a/webapp/.jshintrc b/webapp/.jshintrc
index 4b24574..0839b6b 100644
--- a/webapp/.jshintrc
+++ b/webapp/.jshintrc
@@ -1,20 +1,3 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
 {
   "bitwise": true,
   "browser": true,


[36/39] incubator-kylin git commit: KYLIN-715 modify license format for .sql files

Posted by li...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_distinct/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query06.sql b/query/src/test/resources/query/sql_distinct/query06.sql
index 19ef2a6..4a46048 100644
--- a/query/src/test/resources/query/sql_distinct/query06.sql
+++ b/query/src/test/resources/query/sql_distinct/query06.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, 
  sum(price) as GMV, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_distinct/query07.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_distinct/query07.sql b/query/src/test/resources/query/sql_distinct/query07.sql
index aeaca89..b76cdc8 100644
--- a/query/src/test/resources/query/sql_distinct/query07.sql
+++ b/query/src/test/resources/query/sql_distinct/query07.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, 
  sum(price) as GMV, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_dynamic/query01.dat
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_dynamic/query01.dat b/query/src/test/resources/query/sql_dynamic/query01.dat
index 5e68a24..0f85294 100644
--- a/query/src/test/resources/query/sql_dynamic/query01.dat
+++ b/query/src/test/resources/query/sql_dynamic/query01.dat
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 FP-GTC
 Collectibles

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_dynamic/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_dynamic/query01.sql b/query/src/test/resources/query/sql_dynamic/query01.sql
index 5e216c2..d777fdf 100644
--- a/query/src/test/resources/query/sql_dynamic/query01.sql
+++ b/query/src/test/resources/query/sql_dynamic/query01.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.week_beg_dt, test_kylin_fact.lstg_format_name, test_category_groupings.meta_categ_name, sum(test_kylin_fact.price) as gmv, count(*) as trans_cnt 
  from test_kylin_fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_dynamic/query02.dat
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_dynamic/query02.dat b/query/src/test/resources/query/sql_dynamic/query02.dat
index 5e68a24..0f85294 100644
--- a/query/src/test/resources/query/sql_dynamic/query02.dat
+++ b/query/src/test/resources/query/sql_dynamic/query02.dat
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 FP-GTC
 Collectibles

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_dynamic/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_dynamic/query02.sql b/query/src/test/resources/query/sql_dynamic/query02.sql
index 0452da9..eaeccdd 100644
--- a/query/src/test/resources/query/sql_dynamic/query02.sql
+++ b/query/src/test/resources/query/sql_dynamic/query02.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select sum(1) as "col" from ( 
  select test_cal_dt.week_beg_dt, test_kylin_fact.lstg_format_name, test_category_groupings.meta_categ_name, sum(test_kylin_fact.price) as gmv, count(*) as trans_cnt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_fast_common/query00.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_fast_common/query00.sql b/query/src/test/resources/query/sql_fast_common/query00.sql
index 0ff7395..36249a8 100644
--- a/query/src/test/resources/query/sql_fast_common/query00.sql
+++ b/query/src/test/resources/query/sql_fast_common/query00.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, cal_dt,
  sum(price) as GMV,

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_hive/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_hive/query01.sql b/query/src/test/resources/query/sql_hive/query01.sql
index 988ae84..34b81e2 100644
--- a/query/src/test/resources/query/sql_hive/query01.sql
+++ b/query/src/test/resources/query/sql_hive/query01.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select cal_dt, sum(price)as GMV, count(1) as trans_cnt from test_kylin_fact 
  group by cal_dt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_hive/query10.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_hive/query10.sql b/query/src/test/resources/query/sql_hive/query10.sql
index c469e22..ca77a41 100644
--- a/query/src/test/resources/query/sql_hive/query10.sql
+++ b/query/src/test/resources/query/sql_hive/query10.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.QTR_BEG_DT,sum(test_kylin_fact.price) as gmv 
  , count(*) as trans_cnt 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_ii/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query01.sql b/query/src/test/resources/query/sql_ii/query01.sql
index 1316dfd..be187f5 100644
--- a/query/src/test/resources/query/sql_ii/query01.sql
+++ b/query/src/test/resources/query/sql_ii/query01.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select count(*) as all_count from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_ii/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query02.sql b/query/src/test/resources/query/sql_ii/query02.sql
index e2299eb..eb52d11 100644
--- a/query/src/test/resources/query/sql_ii/query02.sql
+++ b/query/src/test/resources/query/sql_ii/query02.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select sum(price) as price_sum, min(price) as price_min, max(price) as price_max from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_ii/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query03.sql b/query/src/test/resources/query/sql_ii/query03.sql
index 410118b..d20efec 100644
--- a/query/src/test/resources/query/sql_ii/query03.sql
+++ b/query/src/test/resources/query/sql_ii/query03.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select sum(price) as price_sum, min(price) as price_min , max(price) as price_max , LSTG_FORMAT_NAME from test_kylin_fact group by LSTG_FORMAT_NAME

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_ii/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query04.sql b/query/src/test/resources/query/sql_ii/query04.sql
index 91b3763..5b1e29d 100644
--- a/query/src/test/resources/query/sql_ii/query04.sql
+++ b/query/src/test/resources/query/sql_ii/query04.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select TRANS_ID,CAL_DT,LSTG_FORMAT_NAME,LEAF_CATEG_ID,LSTG_SITE_ID,SLR_SEGMENT_CD,PRICE,ITEM_COUNT,SELLER_ID from test_kylin_fact where LSTG_FORMAT_NAME = 'ABIN'

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_ii/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query05.sql b/query/src/test/resources/query/sql_ii/query05.sql
index 754ae45..4043a2c 100644
--- a/query/src/test/resources/query/sql_ii/query05.sql
+++ b/query/src/test/resources/query/sql_ii/query05.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select sum(price) as price_sum, min(price) as price_min , max(price) as price_max , SELLER_ID from test_kylin_fact   where SELLER_ID > 10000149 group by SELLER_ID

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_ii/query06.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query06.sql.disabled b/query/src/test/resources/query/sql_ii/query06.sql.disabled
index 0d16e5c..f97f440 100644
--- a/query/src/test/resources/query/sql_ii/query06.sql.disabled
+++ b/query/src/test/resources/query/sql_ii/query06.sql.disabled
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select price from test_kylin_fact where price > 50

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_ii/query07.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query07.sql.disabled b/query/src/test/resources/query/sql_ii/query07.sql.disabled
index b6e7092..0471a47 100644
--- a/query/src/test/resources/query/sql_ii/query07.sql.disabled
+++ b/query/src/test/resources/query/sql_ii/query07.sql.disabled
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select sum(price) as price_sum, min(price) as price_min , max(price) as price_max , LSTG_FORMAT_NAME from test_kylin_fact   where price > 50 group by LSTG_FORMAT_NAME

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_ii/query08.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query08.sql b/query/src/test/resources/query/sql_ii/query08.sql
index a1495eb..242cb22 100644
--- a/query/src/test/resources/query/sql_ii/query08.sql
+++ b/query/src/test/resources/query/sql_ii/query08.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select TRANS_ID,CAL_DT,LSTG_FORMAT_NAME,LEAF_CATEG_ID,LSTG_SITE_ID,SLR_SEGMENT_CD,PRICE,ITEM_COUNT,SELLER_ID from test_kylin_fact where LSTG_FORMAT_NAME > 'ABIN'

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_ii/query09.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_ii/query09.sql b/query/src/test/resources/query/sql_ii/query09.sql
index f77c6d5..1562288 100644
--- a/query/src/test/resources/query/sql_ii/query09.sql
+++ b/query/src/test/resources/query/sql_ii/query09.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select price, SELLER_ID from test_kylin_fact   where SELLER_ID > 10000149

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_invalid/query29_invalid_SQL.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query29_invalid_SQL.sql b/query/src/test/resources/query/sql_invalid/query29_invalid_SQL.sql
index d7fa053..7d2b1b5 100644
--- a/query/src/test/resources/query/sql_invalid/query29_invalid_SQL.sql
+++ b/query/src/test/resources/query/sql_invalid/query29_invalid_SQL.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt_test 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql b/query/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql
index f6abc04..229d198 100644
--- a/query/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql
+++ b/query/src/test/resources/query/sql_invalid/query30_invalid_SQL.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt_test 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql b/query/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql
index 0d8318b..8fac5a6 100644
--- a/query/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql
+++ b/query/src/test/resources/query/sql_invalid/query31_invalid_SQL.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt_test 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_invalid/query32_invalid_SQL.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query32_invalid_SQL.sql b/query/src/test/resources/query/sql_invalid/query32_invalid_SQL.sql
index bd29963..40b82d8 100644
--- a/query/src/test/resources/query/sql_invalid/query32_invalid_SQL.sql
+++ b/query/src/test/resources/query/sql_invalid/query32_invalid_SQL.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt_test 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_invalid/query33_invalid_SQL.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query33_invalid_SQL.sql b/query/src/test/resources/query/sql_invalid/query33_invalid_SQL.sql
index 0cbc9b9..d18dbcc 100644
--- a/query/src/test/resources/query/sql_invalid/query33_invalid_SQL.sql
+++ b/query/src/test/resources/query/sql_invalid/query33_invalid_SQL.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT 
  test_cal_dt.week_beg_dt_test 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_invalid/query34_invalid_SQL.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query34_invalid_SQL.sql b/query/src/test/resources/query/sql_invalid/query34_invalid_SQL.sql
index 3483555..4308735 100644
--- a/query/src/test/resources/query/sql_invalid/query34_invalid_SQL.sql
+++ b/query/src/test/resources/query/sql_invalid/query34_invalid_SQL.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT COUNT(DISTINCT "TableauSQL"."TRANS_CNT") AS "ctd_TRANS_CNT_qk", "TableauSQL"."LSTG_FORMAT_NAME" AS "none_LSTG_FORMAT_NAME_nk" 
  FROM ( select test_kylin_fact.lstg_format_name, sum(price) as GMV, count(seller_id) as TRANS_CNT 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_invalid/query_count_distinct_on_dimension.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_invalid/query_count_distinct_on_dimension.sql.disabled b/query/src/test/resources/query/sql_invalid/query_count_distinct_on_dimension.sql.disabled
index 351126b..63d83b5 100644
--- a/query/src/test/resources/query/sql_invalid/query_count_distinct_on_dimension.sql.disabled
+++ b/query/src/test/resources/query/sql_invalid/query_count_distinct_on_dimension.sql.disabled
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 ##dd 
 select count(distinct cal_dt) from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_lookup/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_lookup/query01.sql b/query/src/test/resources/query/sql_lookup/query01.sql
index 97010dd..eb08c01 100644
--- a/query/src/test/resources/query/sql_lookup/query01.sql
+++ b/query/src/test/resources/query/sql_lookup/query01.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select CAL_DT, WEEK_BEG_DT from edw.test_cal_dt
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_lookup/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_lookup/query02.sql b/query/src/test/resources/query/sql_lookup/query02.sql
index c1b45ff..b667519 100644
--- a/query/src/test/resources/query/sql_lookup/query02.sql
+++ b/query/src/test/resources/query/sql_lookup/query02.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select CATEG_LVL3_NAME, CATEG_LVL2_NAME, SITE_ID, META_CATEG_NAME, LEAF_CATEG_ID  from test_category_groupings

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_lookup/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_lookup/query03.sql b/query/src/test/resources/query/sql_lookup/query03.sql
index 64360db..f663627 100644
--- a/query/src/test/resources/query/sql_lookup/query03.sql
+++ b/query/src/test/resources/query/sql_lookup/query03.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select SELLER_TYPE_DESC, SELLER_TYPE_CD from edw.test_seller_type_dim

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_lookup/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_lookup/query04.sql b/query/src/test/resources/query/sql_lookup/query04.sql
index 4000b95..69a77d7 100644
--- a/query/src/test/resources/query/sql_lookup/query04.sql
+++ b/query/src/test/resources/query/sql_lookup/query04.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select SITE_NAME, SITE_ID from edw.test_sites

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_optimize/enable-limit01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_optimize/enable-limit01.sql b/query/src/test/resources/query/sql_optimize/enable-limit01.sql
index feae828..4a62d92 100644
--- a/query/src/test/resources/query/sql_optimize/enable-limit01.sql
+++ b/query/src/test/resources/query/sql_optimize/enable-limit01.sql
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select * from test_kylin_fact limit 10

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_orderby/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_orderby/query01.sql b/query/src/test/resources/query/sql_orderby/query01.sql
index e528fb2..9384ee5 100644
--- a/query/src/test/resources/query/sql_orderby/query01.sql
+++ b/query/src/test/resources/query/sql_orderby/query01.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.Week_Beg_Dt, sum(price) as c1, count(1) as c2 
  from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_orderby/query02.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_orderby/query02.sql b/query/src/test/resources/query/sql_orderby/query02.sql
index c722eb2..cdcef50 100644
--- a/query/src/test/resources/query/sql_orderby/query02.sql
+++ b/query/src/test/resources/query/sql_orderby/query02.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, 
  sum(price) as GMV, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_orderby/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_orderby/query03.sql b/query/src/test/resources/query/sql_orderby/query03.sql
index aeaf9fd..69854e2 100644
--- a/query/src/test/resources/query/sql_orderby/query03.sql
+++ b/query/src/test/resources/query/sql_orderby/query03.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select lstg_format_name, 
  sum(price) as GMV, 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_subquery/query00.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query00.sql b/query/src/test/resources/query/sql_subquery/query00.sql
index 322ec83..27b52b4 100644
--- a/query/src/test/resources/query/sql_subquery/query00.sql
+++ b/query/src/test/resources/query/sql_subquery/query00.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price)  as sum_price, count(1) as cnt_1
  from test_kylin_fact

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_subquery/query01.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query01.sql b/query/src/test/resources/query/sql_subquery/query01.sql
index 5cb6279..7db35a5 100644
--- a/query/src/test/resources/query/sql_subquery/query01.sql
+++ b/query/src/test/resources/query/sql_subquery/query01.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT sum(sum_price) AS "COL" 
  FROM ( 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_subquery/query02.sql.disable
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query02.sql.disable b/query/src/test/resources/query/sql_subquery/query02.sql.disable
index e590dcf..968dbae 100644
--- a/query/src/test/resources/query/sql_subquery/query02.sql.disable
+++ b/query/src/test/resources/query/sql_subquery/query02.sql.disable
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT sum(1) AS "COL" 
  FROM ( 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_subquery/query03.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query03.sql b/query/src/test/resources/query/sql_subquery/query03.sql
index 95157f0..c526e0f 100644
--- a/query/src/test/resources/query/sql_subquery/query03.sql
+++ b/query/src/test/resources/query/sql_subquery/query03.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select fact.cal_dt, sum(fact.price) as sum_price, count(1) as cnt_1
 from test_kylin_fact fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_subquery/query04.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query04.sql b/query/src/test/resources/query/sql_subquery/query04.sql
index 108a092..c5fb920 100644
--- a/query/src/test/resources/query/sql_subquery/query04.sql
+++ b/query/src/test/resources/query/sql_subquery/query04.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 select fact.cal_dt, sum(fact.price) as sum_price, count(1) as cnt_1
 from test_kylin_fact fact 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_subquery/query05.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query05.sql b/query/src/test/resources/query/sql_subquery/query05.sql
index da43f5c..c0c99dd 100644
--- a/query/src/test/resources/query/sql_subquery/query05.sql
+++ b/query/src/test/resources/query/sql_subquery/query05.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT  SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" 
 	FROM "TEST_KYLIN_FACT"

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1219a08d/query/src/test/resources/query/sql_subquery/query06.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql_subquery/query06.sql b/query/src/test/resources/query/sql_subquery/query06.sql
index cac08e4..7a8b26a 100644
--- a/query/src/test/resources/query/sql_subquery/query06.sql
+++ b/query/src/test/resources/query/sql_subquery/query06.sql
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
 
 SELECT "TEST_KYLIN_FACT"."CAL_DT", SUM("TEST_KYLIN_FACT"."PRICE") AS "sum_PRICE_ok" FROM "TEST_KYLIN_FACT" "TEST_KYLIN_FACT"
   INNER JOIN (


[09/39] incubator-kylin git commit: KYLIN-669 remove HDP repo from pom

Posted by li...@apache.org.
KYLIN-669 remove HDP repo from pom


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

Branch: refs/heads/staging
Commit: 52a8e5ca20b20462deac9b56d147653d6e7d881e
Parents: 857daad
Author: lukehan <lu...@apache.org>
Authored: Tue Apr 14 16:33:24 2015 +0800
Committer: lukehan <lu...@apache.org>
Committed: Tue Apr 14 16:33:24 2015 +0800

----------------------------------------------------------------------
 pom.xml | 30 +++++++++++++-----------------
 1 file changed, 13 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/52a8e5ca/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 224a162..c083867 100644
--- a/pom.xml
+++ b/pom.xml
@@ -425,23 +425,6 @@
             <id>conjars</id>
             <url>http://conjars.org/repo/</url>
         </repository>
-        
-        <repository>
-            <releases>
-                <enabled>true</enabled>
-                <updatePolicy>always</updatePolicy>
-                <checksumPolicy>warn</checksumPolicy>
-            </releases>
-            <snapshots>
-                <enabled>false</enabled>
-                <updatePolicy>never</updatePolicy>
-                <checksumPolicy>fail</checksumPolicy>
-            </snapshots>
-            <id>HDPReleases</id>
-            <name>HDP Releases</name>
-            <url>http://repo.hortonworks.com/content/repositories/releases/</url>
-            <layout>default</layout>
-        </repository>
     </repositories>
 
     <build>
@@ -678,6 +661,19 @@
                 </goals>
               </execution>
             </executions>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.maven.doxia</groupId>
+                    <artifactId>doxia-core</artifactId>
+                    <version>1.6</version>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>xerces</groupId>
+                            <artifactId>xercesImpl</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+            </dependencies>
           </plugin>
           <plugin>
             <groupId>net.ju-n.maven.plugins</groupId>