Repository: kylin
Updated Branches:
  refs/heads/2.0-rc f67ab7aea -> f91e738a7


KYLIN-993 Remove unnecessary logs


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

Branch: refs/heads/2.0-rc
Commit: f91e738a78098edefa811085230d8236b0e78cf4
Parents: f67ab7a
Author: lidongsjtu <don...@ebay.com>
Authored: Mon Jan 11 09:28:55 2016 +0800
Committer: lidongsjtu <don...@ebay.com>
Committed: Mon Jan 11 09:28:55 2016 +0800

----------------------------------------------------------------------
 .../dict/TupleFilterDictionaryTranslater.java   | 14 ++++++-------
 query/src/test/resources/query/sql/query94.sql  | 22 --------------------
 query/src/test/resources/query/sql/query95.sql  | 22 ++++++++++++++++++++
 3 files changed, 29 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/f91e738a/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
----------------------------------------------------------------------
diff --git 
a/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
 
b/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
index 5df9f39..fec6a85 100644
--- 
a/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
+++ 
b/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
@@ -49,24 +49,24 @@ public class TupleFilterDictionaryTranslater implements 
ITupleFilterTranslator {
 
     @Override
     public TupleFilter translate(TupleFilter tupleFilter) {
-        TupleFilter translated = tupleFilter;
+        TupleFilter translated = null;
         if (tupleFilter instanceof CompareTupleFilter) {
-            logger.info("Translation to IN clause: " + tupleFilter);
             translated = translateCompareTupleFilter((CompareTupleFilter) 
tupleFilter);
-            logger.info(translated == null ? "Failed, will use Calcite to 
handle computed comparison." : "Succeed: " + translated);
+            if (translated != null) {
+                logger.info("Translated {" + tupleFilter + "} to IN clause: {" 
+ translated + "}");
+            }
         } else if (tupleFilter instanceof FunctionTupleFilter) {
-            logger.info("Translation to IN clause: " + tupleFilter);
             translated = translateFunctionTupleFilter((FunctionTupleFilter) 
tupleFilter);
-            logger.info(translated == null ? "Failed, will use Calcite to 
handle computed column." : "Succeed: " + translated);
+            if (translated != null) {
+                logger.info("Translated {" + tupleFilter + "} to IN clause: {" 
+ translated + "}");
+            }
         } else if (tupleFilter instanceof LogicalTupleFilter) {
-            logger.info("Translation to IN clause: " + tupleFilter);
             ListIterator<TupleFilter> childIterator = 
(ListIterator<TupleFilter>) tupleFilter.getChildren().listIterator();
             while (childIterator.hasNext()) {
                 TupleFilter tempTranslated = translate(childIterator.next());
                 if (tempTranslated != null)
                     childIterator.set(tempTranslated);
             }
-            logger.info(translated == null ? "Failed, will use Calcite to 
handle computed column." : "Succeed: " + translated);
         }
         return translated == null ? tupleFilter : translated;
     }

http://git-wip-us.apache.org/repos/asf/kylin/blob/f91e738a/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 4e80d59..0000000
--- a/query/src/test/resources/query/sql/query94.sql
+++ /dev/null
@@ -1,22 +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 upper(lstg_format_name) as lstg_format_name, count(*) as cnt from 
test_kylin_fact
-where lower(lstg_format_name)='abin' and substring(lstg_format_name,1,3) in 
('ABI') and upper(lstg_format_name) > 'AAAA' and
-lower(lstg_format_name) like '%b%' and char_length(lstg_format_name) < 10 and 
char_length(lstg_format_name) > 3 and lstg_format_name||'a'='ABINa'
-group by lstg_format_name
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/f91e738a/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
new file mode 100644
index 0000000..4e80d59
--- /dev/null
+++ b/query/src/test/resources/query/sql/query95.sql
@@ -0,0 +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 upper(lstg_format_name) as lstg_format_name, count(*) as cnt from 
test_kylin_fact
+where lower(lstg_format_name)='abin' and substring(lstg_format_name,1,3) in 
('ABI') and upper(lstg_format_name) > 'AAAA' and
+lower(lstg_format_name) like '%b%' and char_length(lstg_format_name) < 10 and 
char_length(lstg_format_name) > 3 and lstg_format_name||'a'='ABINa'
+group by lstg_format_name
\ No newline at end of file

Reply via email to