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:
[email protected]


Reply via email to