Skip to content

sql: internal error when CFetcher reads from an index with unneeded unsupported type #42994

@yuzefovich

Description

@yuzefovich

The repro (on current master):

create table t (a int primary key, b bit, index i (a, b));
insert into t values (1, 1::BIT);
set vectorize_row_count_threshold = 0;
select a from t@i;

results in

ERROR: internal error: unsupported type bit
SQLSTATE: XX000
DETAIL: stack trace:
github.com/cockroachdb/cockroach/pkg/sql/colencoding/key_encoding.go:250: decodeTableKeyToCol()
github.com/cockroachdb/cockroach/pkg/sql/colencoding/key_encoding.go:158: DecodeKeyValsToCols()
github.com/cockroachdb/cockroach/pkg/sql/colencoding/key_encoding.go:106: DecodeIndexKeyToCols()
github.com/cockroachdb/cockroach/pkg/sql/colexec/cfetcher.go:635: nextBatch()
github.com/cockroachdb/cockroach/pkg/sql/colexec/cfetcher.go:563: nextAdapter()
github.com/cockroachdb/cockroach/pkg/sql/colexec/allocator.go:90: performOperation()
github.com/cockroachdb/cockroach/pkg/sql/colexec/cfetcher.go:555: NextBatch()
github.com/cockroachdb/cockroach/pkg/sql/colexec/colbatch_scan.go:68: Next()
github.com/cockroachdb/cockroach/pkg/sql/colexec/cancel_checker.go:47: Next()
...

Metadata

Metadata

Assignees

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-sqlsmith

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions