apache / apache/iotdb

[Bug] the 'ALTER timeseries {ts} DROP {tag1 .. tagN}' clause is confusing (no tags/attributes discrimination)

Open
#12,545 1 comment 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

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.

### Version

1.3 release

### Describe the bug and provide the minimal reproduce step

If a same name is used for TAGS and ATTRIBUTES, the DROP clause doesn't know to discriminate them.
```
ALTER timeseries root.turbine.d1.s1 ADD TAGS meta1=tag_value
ALTER timeseries root.turbine.d1.s1 ADD ATTRIBUTES meta1=attr_value
ALTER timeseries root.turbine.d1.s1 DROP meta1
ALTER timeseries root.turbine.d1.s1 DROP meta1
```

### What did you expect to see?

DROP should accept a TAGS/ATTRIBUTES specifier (as the others clauses, ADD/UPSERT)

### What did you see instead?

IoTDB seems to drop the TAGS at 1th call. The second call removes the attribute

### Anything else?

The SET or RENAME clauses exhibit same behavior

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the ALTER timeseries sequence from the issue, including the same-name TAGS and ATTRIBUTES and the related SET and RENAME cases. Trace the ALTER timeseries handling for DROP, SET, and RENAME, then add regression coverage showing that explicit TAGS or ATTRIBUTES selection removes only the requested metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.