cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.15k stars 3.81k forks source link

Unexpected Error: overflow during Encode #111473

Open bajinsheng opened 1 year ago

bajinsheng commented 1 year ago

Describe the problem

Please describe the issue you observed, and any steps we can take to reproduce it:

To Reproduce

CREATE TABLE t4 (c0 CHAR, c1 INTERVAL UNIQUE);
INSERT INTO t4 (c0, c1) VALUES('1', NULL);

SELECT * FROM t4 WHERE (INTERVAL '100000000 year')<t4.c1; -- {}
SELECT * FROM t4 @{FORCE_INDEX=t4_c1_key} WHERE (INTERVAL '100000000 year')<t4.c1; -- ERROR: overflow during Encode

Expected behavior Since the index does not exist, I expect it either ignores the index hint or throws the error: index "t4_c1_key" not found.

Environment:

Additional context What was the impact?

Add any other context about the problem here.

Jira issue: CRDB-31913

blathers-crl[bot] commented 1 year ago

Hello, I am Blathers. I am here to help you get the issue triaged.

Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.

I was unable to automatically find someone to ping.

If we have not gotten back to your issue within a few business days, you can try the following:

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

yuzefovich commented 1 year ago

Thanks for the report! I think this is a known issue #45993, so I'm closing as a dup.

yuzefovich commented 1 year ago

Actually, sorry, that issue is about an INSERT, and this issue is for a read-only query. We'll take a closer look shortly.

bajinsheng commented 1 year ago

Thanks for your prompt reply! Hope this report is useful.