You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ge...@apache.org on 2020/06/22 04:28:17 UTC

[incubator-iotdb] branch fix_path_0.9 created (now f197f35)

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

geniuspig pushed a change to branch fix_path_0.9
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


      at f197f35  fix path

This branch includes the following new commits:

     new f197f35  fix path

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-iotdb] 01/01: fix path

Posted by ge...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f197f3506fa93aefbae253f2abf652244a71ae45
Author: zhutianci <zh...@gmail.com>
AuthorDate: Mon Jun 22 12:27:58 2020 +0800

    fix path
---
 server/src/main/java/org/apache/iotdb/db/conf/IoTDBConstant.java  | 1 +
 .../org/apache/iotdb/db/qp/executor/QueryProcessExecutor.java     | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConstant.java b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConstant.java
index 069d79e..d5d5f67 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConstant.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConstant.java
@@ -42,6 +42,7 @@ public class IoTDBConstant {
 
   public static final String PATH_ROOT = "root";
   public static final char PATH_SEPARATOR = '.';
+  public static final char DOUBLE_QUOTATION = '\"';
   public static final String ADMIN_NAME = "root";
   public static final String ADMIN_PW = "root";
   public static final String PROFILE_SUFFIX = ".profile";
diff --git a/server/src/main/java/org/apache/iotdb/db/qp/executor/QueryProcessExecutor.java b/server/src/main/java/org/apache/iotdb/db/qp/executor/QueryProcessExecutor.java
index c267a9f..a91bf7c 100644
--- a/server/src/main/java/org/apache/iotdb/db/qp/executor/QueryProcessExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/qp/executor/QueryProcessExecutor.java
@@ -706,7 +706,13 @@ public class QueryProcessExecutor extends AbstractQueryProcessExecutor {
    */
   private void addPathToMTree(String deviceId, String measurementId, TSDataType dataType)
       throws PathException, MetadataException, StorageEngineException {
-    String fullPath = deviceId + IoTDBConstant.PATH_SEPARATOR + measurementId;
+    String fullPath;
+    if(measurementId.indexOf(IoTDBConstant.PATH_SEPARATOR) != -1) {
+         fullPath =  deviceId + IoTDBConstant.PATH_SEPARATOR
+             + IoTDBConstant.DOUBLE_QUOTATION + measurementId + IoTDBConstant.DOUBLE_QUOTATION;
+    } else {
+      fullPath = deviceId + IoTDBConstant.PATH_SEPARATOR + measurementId;
+    }
     TSEncoding defaultEncoding = getDefaultEncoding(dataType);
     CompressionType defaultCompressor =
         CompressionType.valueOf(TSFileDescriptor.getInstance().getConfig().getCompressor());