You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2015/05/27 06:34:30 UTC
[05/50] [abbrv] incubator-kylin git commit: KYLIN-715
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d57aade/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/2d57aade/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 73e8724..489ffb4 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/2d57aade/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 cebaa07..9f0920c 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/2d57aade/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/2d57aade/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/2d57aade/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 3d913df..9d5e006 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/2d57aade/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/2d57aade/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 0c045b6..fca163e 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
@@ -9,4 +27,4 @@ inner JOIN edw.test_cal_dt as test_cal_dt
ON test_kylin_fact.lstg_site_id = test_sites.site_id
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/2d57aade/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 fe80717..4b29b5c 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
@@ -9,4 +27,4 @@ inner JOIN edw.test_cal_dt as test_cal_dt
ON test_kylin_fact.lstg_site_id = test_sites.site_id
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/2d57aade/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 223984d..b2ebd22 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
@@ -9,4 +27,4 @@ inner JOIN edw.test_cal_dt as test_cal_dt
ON test_kylin_fact.lstg_site_id = test_sites.site_id
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/2d57aade/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/2d57aade/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 642b417..b1901cf 100644
--- a/query/src/test/resources/query/sql/query60.sql
+++ b/query/src/test/resources/query/sql/query60.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, count(1) as cnt_1
from test_kylin_fact
inner JOIN edw.test_cal_dt as test_cal_dt
@@ -8,4 +26,4 @@ inner JOIN edw.test_cal_dt as test_cal_dt
ON test_kylin_fact.lstg_site_id = test_sites.site_id
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/2d57aade/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 bf6c00e..7219de1 100644
--- a/query/src/test/resources/query/sql/query61.sql
+++ b/query/src/test/resources/query/sql/query61.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_1
from test_kylin_fact
inner JOIN edw.test_cal_dt as test_cal_dt
@@ -8,4 +26,4 @@ inner JOIN edw.test_cal_dt as test_cal_dt
ON test_kylin_fact.lstg_site_id = test_sites.site_id
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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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 e7ed57a..80826a4 100644
--- a/query/src/test/resources/query/sql/query66.sql
+++ b/query/src/test/resources/query/sql/query66.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, max(test_kylin_fact.cal_dt) as mmm 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
inner JOIN test_category_groupings
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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 5a4fe66..49e45a3 100644
--- a/query/src/test/resources/query/sql/query72.sql
+++ b/query/src/test/resources/query/sql/query72.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, 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
@@ -7,4 +25,4 @@ inner JOIN edw.test_cal_dt as test_cal_dt
inner JOIN edw.test_sites as test_sites
ON test_kylin_fact.lstg_site_id = test_sites.site_id
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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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 1430ae6..8fc8bb3 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_cal_dt as test_cal_dt
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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/2d57aade/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