[
https://issues.apache.org/jira/browse/IOTDB-932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17206684#comment-17206684
]
Xiangdong Huang commented on IOTDB-932:
---------------------------------------
+1.
I think the check can be removed as if the path is invalid, an exception can be
thrown by `new PartialPath(path)`.
That is, Line 1503 can be replaced by Line 1508.
!image-2020-10-03-19-49-23-984.png!
> Timeseries with double ticks (") cannot be created via CREATE TIMESErIES but
> only via INSERT INTO implicitly
> ------------------------------------------------------------------------------------------------------------
>
> Key: IOTDB-932
> URL: https://issues.apache.org/jira/browse/IOTDB-932
> Project: Apache IoTDB
> Issue Type: Bug
> Components: Server
> Reporter: Julian Feinauer
> Assignee: Julian Feinauer
> Priority: Major
> Labels: pull-request-available
> Attachments: image-2020-10-03-19-49-23-984.png
>
>
> The following works (session API):
>
>
> {code:java}
> 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);
> {code}
>
>
> {color:#172b4d}and the rifht TS is implicitly created.{color}
> {color:#172b4d} {color}
> {color:#172b4d}This however fails:{color}
> {code:java}
> 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);
> }
> {code}
> {color:#172b4d}This is due to the Method `TSServiceImpl.checkPathValidity()`
> which uses a REGEX that is not in sync with the Parser.{color}
> {color:#172b4d} {color}
> {color:#172b4d}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.{color}
> {color:#172b4d} {color}
> {color:#172b4d}WDYT?{color}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)