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

hui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new d9d2465f0d [IOTDB-3343] Aggregate existing and non-exsit timeseries 
together failure in AlignByDevice (#6084)
d9d2465f0d is described below

commit d9d2465f0d211fbf51504c5ed618c6a3314e5a2b
Author: Xiangwei Wei <[email protected]>
AuthorDate: Tue May 31 14:18:17 2022 +0800

    [IOTDB-3343] Aggregate existing and non-exsit timeseries together failure 
in AlignByDevice (#6084)
---
 .../apache/iotdb/db/mpp/plan/analyze/ExpressionAnalyzer.java   | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ExpressionAnalyzer.java
 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ExpressionAnalyzer.java
index 0c5cfc5b1d..7c0a6e9a54 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ExpressionAnalyzer.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ExpressionAnalyzer.java
@@ -420,8 +420,11 @@ public class ExpressionAnalyzer {
     } else if (expression instanceof FunctionExpression) {
       List<List<Expression>> extendedExpressions = new ArrayList<>();
       for (Expression suffixExpression : expression.getExpressions()) {
-        extendedExpressions.add(
-            concatDeviceAndRemoveWildcard(suffixExpression, devicePath, 
schemaTree, typeProvider));
+        List<Expression> concatedExpression =
+            concatDeviceAndRemoveWildcard(suffixExpression, devicePath, 
schemaTree, typeProvider);
+        if (concatedExpression != null && concatedExpression.size() != 0) {
+          extendedExpressions.add(concatedExpression);
+        }
       }
       List<List<Expression>> childExpressionsList = new ArrayList<>();
       cartesianProduct(extendedExpressions, childExpressionsList, 0, new 
ArrayList<>());
@@ -431,6 +434,9 @@ public class ExpressionAnalyzer {
       PartialPath concatPath = devicePath.concatPath(measurement);
 
       List<MeasurementPath> actualPaths = 
schemaTree.searchMeasurementPaths(concatPath).left;
+      if (actualPaths.isEmpty()) {
+        return new ArrayList<>();
+      }
       List<PartialPath> noStarPaths = new ArrayList<>(actualPaths);
       noStarPaths.forEach(path -> typeProvider.setType(path.getFullPath(), 
path.getSeriesType()));
       return reconstructTimeSeriesOperands(noStarPaths);

Reply via email to