Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-932

Timeseries with double ticks (") cannot be created via CREATE TIMESErIES but only via INSERT INTO implicitly

    XMLWordPrintableJSON

Details

    Description

      The following works (session API):

       

       

      String deviceId = "root.sg1.\"org.pragmaticminds:my.device\"";
      List<String> measurements = new ArrayList<>();
      measurements.add("s1");
      measurements.add("s2");
      measurements.add("s3");
      measurements.add("s4");
      
      List<String> values = new ArrayList<>();
      values.add("1");
      values.add("1.2");
      values.add("true");
      values.add("dad");
      session.insertRecord(deviceId, 1L, measurements, values);
      

       

       

      and the rifht TS is implicitly created.

       

      This however fails:

      String storageGroup = "root.存储组1";
      String[] devices = new String[]{
          "设备1.指标1",
          "设备1.s2",
          "d2.s1",
          "d2.指标2",
          "\"org.pragmaticminds:my.device\".指标2"
      };
      session.setStorageGroup(storageGroup);
      for (String path : devices) {
        String fullPath = storageGroup + TsFileConstant.PATH_SEPARATOR + path;
        session.createTimeseries(fullPath, TSDataType.INT64, TSEncoding.RLE, CompressionType.SNAPPY);
      }
      

      This is due to the Method `TSServiceImpl.checkPathValidity()` which uses a REGEX that is not in sync with the Parser.

       

      I suggest to remove this method and all checks to it as its simply redundant functionality and we should simply let the parser determine (as single source of truth) what is allowed syntax and what not.

       

      WDYT?

      Attachments

        1. image-2020-10-03-19-49-23-984.png
          286 kB
          Xiangdong Huang

        Issue Links

          Activity

            People

              jfeinauer Julian Feinauer
              jfeinauer Julian Feinauer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: