You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by lt...@apache.org on 2019/05/21 09:34:47 UTC

[incubator-iotdb] 03/04: remove useless code

This is an automated email from the ASF dual-hosted git repository.

lta pushed a commit to branch cluster
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit d10c2f1942ab8292d9a50bf56d0576e358175cd3
Author: lta <li...@163.com>
AuthorDate: Tue May 21 17:33:47 2019 +0800

    remove useless code
---
 .../org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java  | 1 +
 .../java/org/apache/iotdb/db/query/aggregation/impl/MeanAggrFunc.java   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java
index 9736f7c..25062f7 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java
@@ -326,6 +326,7 @@ public class ConcatPathOptimizer implements ILogicalOptimizer {
       for (Path path : paths) {
         List<String> all;
         all = executor.getAllPaths(path.getFullPath());
+        LOG.debug("All paths of path<{}> is {}", path.getFullPath(), all);
         for (String subPath : all) {
           if (!pathMap.containsKey(subPath)) {
             pathMap.put(subPath, 1);
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/aggregation/impl/MeanAggrFunc.java b/iotdb/src/main/java/org/apache/iotdb/db/query/aggregation/impl/MeanAggrFunc.java
index 5373018..68e43d3 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/query/aggregation/impl/MeanAggrFunc.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/query/aggregation/impl/MeanAggrFunc.java
@@ -77,7 +77,7 @@ public class MeanAggrFunc extends AggregateFunction {
   private void calculateValueFromPageData(BatchData dataInThisPage, IPointReader unsequenceReader,
       boolean hasBound, long bound) throws IOException {
     while (dataInThisPage.hasNext() && unsequenceReader.hasNext()) {
-      Object sumVal = null;
+      Object sumVal;
       long time = Math.min(dataInThisPage.currentTime(), unsequenceReader.current().getTimestamp());
       if (hasBound && time >= bound) {
         break;