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 2021/02/23 01:26:40 UTC
[GitHub] [iotdb] ope-nz opened a new issue #2722: Question; Path Constraints & Backslash
ope-nz opened a new issue #2722:
URL: https://github.com/apache/iotdb/issues/2722
The documentation states that for a path STAR and DOT cannot be used. Single quotes are not allowed.
Are there any restrictions on backslashes? I cannot seem to create a path with a backslash - forward slash is fine.
With a backlash these are all the same path;
C:\
C:\\
C:\\\
Double quotes can be escaped with a backslash so it is an escape character, can we escape a backslash?
I did see I can do this \"C:\\" which results in "C:\"
----------------------------------------------------------------
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
[GitHub] [iotdb] ope-nz commented on issue #2722: Question; Path Constraints & Backslash
Posted by GitBox <gi...@apache.org>.
ope-nz commented on issue #2722:
URL: https://github.com/apache/iotdb/issues/2722#issuecomment-789133525
I noticed today in my logs that the error below is noted. What is interesting is that the storage grouo root.Test no longer exists but I am still seeing this message. How do I clear this message
2021-03-02 18:48:24,578 [main] ERROR org.apache.iotdb.db.metadata.MManager:269 - Can not operate cmd 0,root.Test."C:\\".status,0,2,1,,,
org.apache.iotdb.db.exception.metadata.IllegalPathException: Illegal path: root.Test."C:\\".status is not a legal path
at org.apache.iotdb.db.metadata.MetaUtils.splitPathToDetachedPath(MetaUtils.java:70)
at org.apache.iotdb.db.metadata.PartialPath.<init>(PartialPath.java:51)
at org.apache.iotdb.db.metadata.MManager.operation(MManager.java:353)
at org.apache.iotdb.db.metadata.MManager.initFromLog(MManager.java:266)
at org.apache.iotdb.db.metadata.MManager.init(MManager.java:218)
at org.apache.iotdb.db.service.IoTDB.initMManager(IoTDB.java:156)
at org.apache.iotdb.db.service.IoTDB.setUp(IoTDB.java:100)
at org.apache.iotdb.db.service.IoTDB.active(IoTDB.java:84)
at org.apache.iotdb.db.service.IoTDB.main(IoTDB.java:66)
----------------------------------------------------------------
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
[GitHub] [iotdb] HTHou edited a comment on issue #2722: Question; Path Constraints & Backslash
Posted by GitBox <gi...@apache.org>.
HTHou edited a comment on issue #2722:
URL: https://github.com/apache/iotdb/issues/2722#issuecomment-783963086
Hi, could I know which version were you trying?
I tried to create timeseries with path `root.sg.d1."C:\"` on `0.12-snapshot` and got an error message `Msg: 315: The timeseries name contains unsupported character. root.sg.d1."C:\" is not a legal path`.
I do know why this error thrown. We have a `ID_MATCHER` field in IoTDBConfig class. If the path node name doesn't match this, the creating will fail.
Also, antlr will check if the name is following the rule defined in SqlBase.g4 when create timeseries using JDBC api.
BTW, the matcher and the antlr rule need to be updated indeed.
----------------------------------------------------------------
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
[GitHub] [iotdb] HTHou commented on issue #2722: Question; Path Constraints & Backslash
Posted by GitBox <gi...@apache.org>.
HTHou commented on issue #2722:
URL: https://github.com/apache/iotdb/issues/2722#issuecomment-783963086
Hi, could I know which version were you trying?
I tried to create timeseries with path `root.sg.d1."C:\"` on `0.12-snapshot` and got an error message `Msg: 315: The timeseries name contains unsupported character. root.sg.d1."C:\" is not a legal path`.
I do know why this error thrown. We have a `ID_MATCHER` field in IoTDBConfig class, if the path node name doesn't match this, the creating will fail.
BTW, this matcher needs to be updated indeed.
----------------------------------------------------------------
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
[GitHub] [iotdb] ope-nz commented on issue #2722: Question; Path Constraints & Backslash
Posted by GitBox <gi...@apache.org>.
ope-nz commented on issue #2722:
URL: https://github.com/apache/iotdb/issues/2722#issuecomment-784454386
@HTHou ok I see the regex for ID_MATCHER
"([a-zA-Z0-9/\"[ ],:@#$%&{}\\[\\]\\-+\\u2E80-\\u9FFF_]+)"
It seems to suggest that backslash is supported so I wonder if it is an issue with JDBC? It doesnt seem to escape a backslash correctly?
Its not a big deal as I can just use forward slash instead.
----------------------------------------------------------------
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
[GitHub] [iotdb] HTHou closed issue #2722: Question; Path Constraints & Backslash
Posted by GitBox <gi...@apache.org>.
HTHou closed issue #2722:
URL: https://github.com/apache/iotdb/issues/2722
--
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
[GitHub] [iotdb] HTHou commented on issue #2722: Question; Path Constraints & Backslash
Posted by GitBox <gi...@apache.org>.
HTHou commented on issue #2722:
URL: https://github.com/apache/iotdb/issues/2722#issuecomment-784732599
@ope-nz Well... You're right. Version 0.11 doesn't even use the ID_MATCHER, so it is only affected by antlr. If you would like to use backslash, you can just modify the part in SqlBase.g4 like this.
```
fragment
NAME_CHAR
: 'A'..'Z'
| 'a'..'z'
| '0'..'9'
| '_'
| '-'
| ':'
| '/'
| '\\'
| '@'
| '#'
| '$'
| '%'
| '&'
| '+'
| CN_CHAR
;
fragment
FIRST_NAME_CHAR
: 'A'..'Z'
| 'a'..'z'
| '0'..'9'
| '_'
| '/'
| '\\'
| '@'
| '#'
| '$'
| '%'
| '&'
| '+'
| CN_CHAR
;
```
After adding `'\\'`, I tried some statements and they works.
```
IoTDB> create timeseries root.sg.d1."C:\".status with datatype=BOOLEAN
Msg: The statement is executed successfully.
IoTDB> show timeseries
+-----------------------+-----+-------------+--------+--------+-----------+----+----------+
| timeseries|alias|storage group|dataType|encoding|compression|tags|attributes|
+-----------------------+-----+-------------+--------+--------+-----------+----+----------+
|root.sg.d1."C:\".status| null| root.sg| BOOLEAN| RLE| SNAPPY|null| null|
| root.sg.d1.C:.status| null| root.sg| BOOLEAN| RLE| SNAPPY|null| null|
+-----------------------+-----+-------------+--------+--------+-----------+----+----------+
Total line number = 2
It costs 0.167s
IoTDB> create timeseries root.sg.d1.C:\.status with datatype=BOOLEAN
Msg: The statement is executed successfully.
IoTDB> show timeseries
+-----------------------+-----+-------------+--------+--------+-----------+----+----------+
| timeseries|alias|storage group|dataType|encoding|compression|tags|attributes|
+-----------------------+-----+-------------+--------+--------+-----------+----+----------+
|root.sg.d1."C:\".status| null| root.sg| BOOLEAN| RLE| SNAPPY|null| null|
| root.sg.d1.C:\.status| null| root.sg| BOOLEAN| RLE| SNAPPY|null| null|
| root.sg.d1.C:.status| null| root.sg| BOOLEAN| RLE| SNAPPY|null| null|
+-----------------------+-----+-------------+--------+--------+-----------+----+----------+
Total line number = 3
It costs 0.025s
```
----------------------------------------------------------------
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
[GitHub] [iotdb] ope-nz commented on issue #2722: Question; Path Constraints & Backslash
Posted by GitBox <gi...@apache.org>.
ope-nz commented on issue #2722:
URL: https://github.com/apache/iotdb/issues/2722#issuecomment-784406672
@HTHou I am using version 11.x
Apologies for the double quote name the syntax should be;
_create timeseries root.sg.d1.\"C:\\".status with datatype=BOOLEAN_
This will create timeseries root.sg.d1."C:\".status - I am trying to create root.sg.d1.C:\.status if possible.
----------------------------------------------------------------
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