Non-root users with correct query privileges are unable to select a empty timesereis
- Dominant language
- Java
- Stars
- 6.4k
- Forks
- 1.2k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 115
Description
How to reproduce:
```sql
# user: root
CREATE USER steve 'steve'
GRANT ROLE application_role PRIVILEGES 'SET_STORAGE_GROUP','CREATE_TIMESERIES','INSERT_TIMESERIES','READ_TIMESERIES','DELETE_TIMESERIES','DROP_FUNCTION','CREATE_FUNCTION','CREATE_TRIGGER','DROP_TRIGGER','START_TRIGGER','STOP_TRIGGER' ON root.test
GRANT application_role TO steve
```
```sql
# user: steve
select sin(s1) from root.test where time >= 2021-01-01 and time<= 2021-01-31 23:59:59
```
Then, you will get:

Contributor guide
Research direction
Start by reproducing the SQL setup and SELECT as user steve, then compare the behavior with the root user on the empty root.test timeseries. Review the closed pull request #4423 for prior context; done means a non-root user with the listed query privileges can select from the empty timeseries without an authorization error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- authorization, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100