Repository: kylin
Updated Branches:
  refs/heads/2.x-staging a1b26ff9f -> bb130af0a


KYLIN-1294 disabled related test cases as it is depending on Calcite-980


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

Branch: refs/heads/2.x-staging
Commit: bb130af0a37f36fbc76eb9a549b222df964e7761
Parents: a1b26ff
Author: honma <ho...@ebay.com>
Authored: Fri Jan 8 10:50:41 2016 +0800
Committer: honma <ho...@ebay.com>
Committed: Fri Jan 8 10:50:41 2016 +0800

----------------------------------------------------------------------
 .../metadata/filter/ConstantTupleFilter.java    |  9 ++++++
 .../metadata/filter/LogicalTupleFilter.java     | 19 +++++++++++--
 query/src/test/resources/query/sql/query92.sql  | 30 --------------------
 .../resources/query/sql/query92.sql.disabled    | 30 ++++++++++++++++++++
 query/src/test/resources/query/sql/query93.sql  | 30 --------------------
 .../resources/query/sql/query93.sql.disabled    | 30 ++++++++++++++++++++
 query/src/test/resources/query/sql/query94.sql  | 30 --------------------
 .../resources/query/sql/query94.sql.disabled    | 30 ++++++++++++++++++++
 query/src/test/resources/query/sql/query95.sql  | 30 --------------------
 .../resources/query/sql/query95.sql.disabled    | 30 ++++++++++++++++++++
 10 files changed, 146 insertions(+), 122 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ConstantTupleFilter.java
----------------------------------------------------------------------
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ConstantTupleFilter.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ConstantTupleFilter.java
index cc3add2..3056a9c 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ConstantTupleFilter.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ConstantTupleFilter.java
@@ -54,6 +54,15 @@ public class ConstantTupleFilter extends TupleFilter {
     }
 
     @Override
+    public TupleFilter reverse() {
+        if (this.evaluate(null, null)) {
+            return ConstantTupleFilter.FALSE;
+        } else {
+            return ConstantTupleFilter.TRUE;
+        }
+    }
+
+    @Override
     public void addChild(TupleFilter child) {
         throw new UnsupportedOperationException("This is " + this + " and 
child is " + child);
     }

http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/core-metadata/src/main/java/org/apache/kylin/metadata/filter/LogicalTupleFilter.java
----------------------------------------------------------------------
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/LogicalTupleFilter.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/LogicalTupleFilter.java
index 83404eb..0929cf1 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/LogicalTupleFilter.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/LogicalTupleFilter.java
@@ -46,12 +46,27 @@ public class LogicalTupleFilter extends TupleFilter {
         return cloneTuple;
     }
 
+
+    //    private TupleFilter reverseNestedNots(TupleFilter filter, int depth) 
{
+    //        if ((filter instanceof LogicalTupleFilter) && (filter.operator 
== FilterOperatorEnum.NOT)) {
+    //            assert (filter.children.size() == 1);
+    //            return reverseNestedNots(filter.children.get(0), depth + 1);
+    //        }
+    //
+    //        if (depth % 2 == 1) {
+    //            return filter;
+    //        } else {
+    //            return filter.reverse();
+    //        }
+    //    }
+
+
     @Override
     public TupleFilter reverse() {
         switch (operator) {
         case NOT:
-            assert (children.size() == 1);
-            return children.get(0);
+            throw new IllegalStateException("not( not in ()) is invalid 
syntax");
+            //return reverseNestedNots(this, 0);
         case AND:
         case OR:
             LogicalTupleFilter reverse = new 
LogicalTupleFilter(REVERSE_OP_MAP.get(operator));

http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/query/src/test/resources/query/sql/query92.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query92.sql 
b/query/src/test/resources/query/sql/query92.sql
deleted file mode 100644
index e551a45..0000000
--- a/query/src/test/resources/query/sql/query92.sql
+++ /dev/null
@@ -1,30 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---     http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
-
-select meta_categ_name, count(1) as cnt, sum(price) as GMV 
-
- 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
- left JOIN test_category_groupings
- ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id
- left JOIN edw.test_sites as test_sites
- ON test_kylin_fact.lstg_site_id = test_sites.site_id
-
- where meta_categ_name not in ('', 'a')
- group by meta_categ_name 

http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/query/src/test/resources/query/sql/query92.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query92.sql.disabled 
b/query/src/test/resources/query/sql/query92.sql.disabled
new file mode 100644
index 0000000..e551a45
--- /dev/null
+++ b/query/src/test/resources/query/sql/query92.sql.disabled
@@ -0,0 +1,30 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+select meta_categ_name, count(1) as cnt, sum(price) as GMV 
+
+ 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
+ left JOIN test_category_groupings
+ ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id
+ left JOIN edw.test_sites as test_sites
+ ON test_kylin_fact.lstg_site_id = test_sites.site_id
+
+ where meta_categ_name not in ('', 'a')
+ group by meta_categ_name 

http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/query/src/test/resources/query/sql/query93.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query93.sql 
b/query/src/test/resources/query/sql/query93.sql
deleted file mode 100644
index cc6dca5..0000000
--- a/query/src/test/resources/query/sql/query93.sql
+++ /dev/null
@@ -1,30 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---     http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
-
-select meta_categ_name, count(1) as cnt, sum(price) as GMV 
-
- 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
- left JOIN test_category_groupings
- ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id
- left JOIN edw.test_sites as test_sites
- ON test_kylin_fact.lstg_site_id = test_sites.site_id
-
- where meta_categ_name is not null
- group by meta_categ_name 

http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/query/src/test/resources/query/sql/query93.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query93.sql.disabled 
b/query/src/test/resources/query/sql/query93.sql.disabled
new file mode 100644
index 0000000..cc6dca5
--- /dev/null
+++ b/query/src/test/resources/query/sql/query93.sql.disabled
@@ -0,0 +1,30 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+select meta_categ_name, count(1) as cnt, sum(price) as GMV 
+
+ 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
+ left JOIN test_category_groupings
+ ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id
+ left JOIN edw.test_sites as test_sites
+ ON test_kylin_fact.lstg_site_id = test_sites.site_id
+
+ where meta_categ_name is not null
+ group by meta_categ_name 

http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/query/src/test/resources/query/sql/query94.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query94.sql 
b/query/src/test/resources/query/sql/query94.sql
deleted file mode 100644
index c7899fd..0000000
--- a/query/src/test/resources/query/sql/query94.sql
+++ /dev/null
@@ -1,30 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---     http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
-
-select meta_categ_name, count(1) as cnt, sum(price) as GMV 
-
- 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
- left JOIN test_category_groupings
- ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id
- left JOIN edw.test_sites as test_sites
- ON test_kylin_fact.lstg_site_id = test_sites.site_id
-
- where meta_categ_name not in ('Unknown')
- group by meta_categ_name 

http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/query/src/test/resources/query/sql/query94.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query94.sql.disabled 
b/query/src/test/resources/query/sql/query94.sql.disabled
new file mode 100644
index 0000000..c7899fd
--- /dev/null
+++ b/query/src/test/resources/query/sql/query94.sql.disabled
@@ -0,0 +1,30 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+select meta_categ_name, count(1) as cnt, sum(price) as GMV 
+
+ 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
+ left JOIN test_category_groupings
+ ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id
+ left JOIN edw.test_sites as test_sites
+ ON test_kylin_fact.lstg_site_id = test_sites.site_id
+
+ where meta_categ_name not in ('Unknown')
+ group by meta_categ_name 

http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/query/src/test/resources/query/sql/query95.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query95.sql 
b/query/src/test/resources/query/sql/query95.sql
deleted file mode 100644
index 578b93f..0000000
--- a/query/src/test/resources/query/sql/query95.sql
+++ /dev/null
@@ -1,30 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
---     http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
-
-select meta_categ_name, count(1) as cnt, sum(price) as GMV 
-
- 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
- left JOIN test_category_groupings
- ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id
- left JOIN edw.test_sites as test_sites
- ON test_kylin_fact.lstg_site_id = test_sites.site_id
-
- where meta_categ_name not in ('Unknown', 'ToyHobbies', '', 'a', 
'BookMagazines')
- group by meta_categ_name 

http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/query/src/test/resources/query/sql/query95.sql.disabled
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query95.sql.disabled 
b/query/src/test/resources/query/sql/query95.sql.disabled
new file mode 100644
index 0000000..578b93f
--- /dev/null
+++ b/query/src/test/resources/query/sql/query95.sql.disabled
@@ -0,0 +1,30 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+select meta_categ_name, count(1) as cnt, sum(price) as GMV 
+
+ 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
+ left JOIN test_category_groupings
+ ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id
+ left JOIN edw.test_sites as test_sites
+ ON test_kylin_fact.lstg_site_id = test_sites.site_id
+
+ where meta_categ_name not in ('Unknown', 'ToyHobbies', '', 'a', 
'BookMagazines')
+ group by meta_categ_name 

Reply via email to