apache / apache/iotdb

backtick escape character handled inconsistently by CLI and Java API when create timeseries

Open
#4,851 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.4k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
115

Description

I created TIMESERIES like this using the session.createTimeseries()

```shell
IoTDB> SHOW TIMESERIES
+--------------------------------------------------------------------------------------------------------------------------------------+--------+-------------+--------+--------+-----------+----+----------+
| timeseries| alias|storage group|dataType|encoding|compression|tags|attributes|
+--------------------------------------------------------------------------------------------------------------------------------------+--------+-------------+--------+--------+-----------+----+----------+
|root.test.xx.xx.NULL.xx.ff8081816c21dc05016c22bdca284f65.CARD.CARD-8a5b8486656aa31001656b6d35d6768e.15.temperature|| root.test| DOUBLE| PLAIN| LZO|null| null|
+--------------------------------------------------------------------------------------------------------------------------------------+--------+-------------+--------+--------+-----------+----+----------+
Total line number = 1
```

You can notice that the path contains **NULL**

I get the following error when I delete it using the CLI

```shell
IoTDB> DELETE TIMESERIES root.test.xx.xx.NULL.xx.TRANS_ELEMENT-ff8081816c21dc05016c22bdca284f65.CARD.CARD-8a5b8486656aa31001656b6d35d6768e.15.temperature
Msg: 401: Error occurred while parsing SQL to physical plan: line 1:34 mismatched input 'NULL' expecting {CREATE, INSERT, UPDATE, DELETE, SELECT, SHOW, GRANT, INTO, SET, WHERE, FROM, TO, BY, DEVICE, CONFIGURATION, DESCRIBE, SLIMIT, LIMIT, UNLINK, OFFSET, SOFFSET, FILL, LINEAR, PREVIOUS, PREVIOUSUNTILLAST, METADATA, TIMESERIES, TIMESTAMP, PROPERTY, WITH, DATATYPE, COMPRESSOR, STORAGE, GROUP, LABEL, INT32, INT64, FLOAT, DOUBLE, BOOLEAN, TEXT, PLAIN, PLAIN_DICTIONARY, RLE, DIFF, TS_2DIFF, GORILLA, REGULAR, ADD, UPSERT, VALUES, NOW, LINK, INDEX, USING, TRACING, ON, OFF, SYSTEM, READONLY, WRITABLE, DROP, MERGE, LIST, USER, PRIVILEGES, ROLE, ALL, OF, ALTER, PASSWORD, REVOKE, LOAD, WATERMARK_EMBEDDING, UNSET, TTL, FLUSH, TASK, INFO, VERSION, REMOVE, MOVE, CHILD, PATHS, DEVICES, COUNT, NODES, LEVEL, MIN_TIME, MAX_TIME, MIN_VALUE, MAX_VALUE, AVG, FIRST_VALUE, SUM, LAST_VALUE, LAST, DISABLE, ALIGN, COMPRESSION, TIME, ATTRIBUTES, TAGS, RENAME, GLOBAL, FULL, CLEAR, CACHE, TRUE, FALSE, UNCOMPRESSED, SNAPPY, GZIP, LZ4, PARTITION, SNAPSHOT, FOR, SCHEMA, DESC, ASC, '*', OPERATOR_IN, '-', '[', INT, EXPONENT, DURATION, DATETIME, ID, DOUBLE_QUOTE_STRING_LITERAL}
IoTDB>
```

**Desktop (please complete the following information):**
- OS: MacOS
- Version 0.13.0-SNAPSHOT

How do I delete this TIMESERIES

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with session.createTimeseries(), SHOW TIMESERIES, and the CLI DELETE TIMESERIES command described in the report. Compare how the Java API and CLI parse or escape the generated path, and consider the issue done when the created timeseries can be deleted consistently through both interfaces.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
api, cli, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.