apache / apache/iotdb

Request corresponding error message for keyword conflicts.

Open
#6,698 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

In 0.13.0, executing **select * from root.global.\*\*** in cli will raise an error:
`Msg: 401: Error occurred while parsing SQL to physical plan: line 1:19 mismatched input 'global' expecting {'*', '**', STRING_LITERAL, INTEGER_LITERAL, ID, QUTOED_ID_IN_NODE_NAME}`
This is because 'global' is a keyword in iotdb. Though the statement **select * from root.\`global\`.\*\*** is supported, the error message is not telling users there's been a keyword conflict.

Here are some possible solutions:
1. Add a message code representing keyword conflicts.
2. Show warnings when user try to use keywords in paths.

Also, creating or selecting from **root.global.\*\*** is not allowed in cli, but is ok in Java native api.

Contributor guide

Open the contributing guide

Research direction

Start with the CLI SQL parsing path for queries containing the keyword `global` in a path, then compare it with the Java native API behavior described in the issue. Determine how keyword conflicts are currently reported and define consistent behavior for the CLI and API, with tests covering the failing query and its quoted form.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
api, cli, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.