apache / apache/iotdb

'+0' trigger 305 INTERNAL ERROR

Open
#16,436 3 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

### Search before asking

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

### Version

2.0.5 (build: 0917050)

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

CREATE DATABASE root.min;
CREATE ALIGNED TIMESERIES root.min.d1 (c0 INT64);

INSERT INTO root.min.d1(time, c0) VALUES (1641024094598, -42837);
--query 1
SELECT c0 FROM root.min.d1 WHERE (c0 = -42837) AND (time BETWEEN 1641024094598 AND 1641024955352);

--query 2
SELECT c0 FROM root.min.d1 WHERE (c0 = -42837) AND (time BETWEEN (1641024094598) AND (1641024955352));

--query 3
SELECT c0 FROM root.min.d1 WHERE (c0 = -42837) AND (time BETWEEN (1641024094598+0) AND (1641024955352+0));

### What did you expect to see?

query 1 : return 1 result

query2 : return 1 result

query3 : return 1 result

### What did you see instead?

query 1 : return 1 result

query2 : return 1 result

query3 : 305 INTERNAL_SERVER_ERROR

Image

### Anything else?

305 INTERNAL_SERVER_ERROR when +0 is present on either or both BETWEEN endpoints.

### Are you willing to submit a PR?

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

Contributor guide

Open the contributing guide

Research direction

Start by running the minimal CREATE, INSERT, and three SELECT statements from the issue against IoTDB 2.0.5, then trace how BETWEEN endpoints containing +0 are handled. Done means both endpoints with +0 return the same single result as the equivalent queries without it instead of producing 305 INTERNAL_SERVER_ERROR.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.