Skip to content

Unexpected Error: overflow during Encode #111473

@bajinsheng

Description

@bajinsheng

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:

  • CockroachDB version [CockroachDB CCL v23.2.0-alpha.00000000-dev-d7738743c955be36b1c9304a40d9e4e7b3edc4ad]
  • Server OS: [Ubuntu]
  • Client app [cockroach sql]

Additional context
What was the impact?

Add any other context about the problem here.

Jira issue: CRDB-31913

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-communityOriginated from the communityT-sql-queriesSQL Queries Team

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions