You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/09/01 13:02:24 UTC

[GitHub] [incubator-iotdb] Alima777 commented on a change in pull request #1621: [New feature] Add the alias and show it as column name when querying

Alima777 commented on a change in pull request #1621:
URL: https://github.com/apache/incubator-iotdb/pull/1621#discussion_r481119768



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java
##########
@@ -690,14 +700,14 @@ private void deduplicate(QueryPlan queryPlan) throws MetadataException {
 
     int index = 0;
     for (Pair<PartialPath, Integer> indexedPath : indexedPaths) {
-      String column;
-      if (indexedPath.left.getAlias() != null) {
-        column = indexedPath.left.getFullPathWithAlias();
-      } else {
-        column = indexedPath.left.getFullPath();
-      }
-      if (queryPlan instanceof AggregationPlan) {
-        column = queryPlan.getAggregations().get(indexedPath.right) + "(" + column + ")";
+      // judge whether as clause is used or not first

Review comment:
       If as clause is used, measurementAlias will be covered.

##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/PartialPath.java
##########
@@ -31,7 +31,10 @@
 public class PartialPath extends Path implements Comparable<Path> {
 
   private String[] nodes;
-  private String alias;
+  // alias of sensor
+  private String alias = null;

Review comment:
       Fixed.

##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/PartialPath.java
##########
@@ -31,7 +31,10 @@
 public class PartialPath extends Path implements Comparable<Path> {
 
   private String[] nodes;
-  private String alias;
+  // alias of sensor

Review comment:
       Fixed.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org