DB::TiFlashException: Column index out of bound: 4, should in [0,3) #9188
Closed
Description
opened on Jul 3, 2024
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
drop table if exists test.t;
create table if not exists test.t(a int);
alter table test.t add column b int as (a+1) virtual;
alter table test.t add column c int;
alter table test.t add column d int as (c+1) virtual;
alter table test.t add column t time(6);
insert into test.t(a, c, t) values(1, 2, '000:10:10.123456'), (3, 4, '001:10:10.123456'), (5, 6, '002:10:10.123456');
insert into test.t(a, c, t) select a, c, t from test.t;
insert into test.t(a, c, t) select a, c, t from test.t;
insert into test.t(a, c, t) select a, c, t from test.t;
insert into test.t(a, c, t) select a, c, t from test.t;
insert into test.t(a, c, t) select a, c, t from test.t;
insert into test.t(a, c, t) select a, c, t from test.t;
insert into test.t(a, c, t) select a, c, t from test.t;
insert into test.t(a, c, t) select a, c, t from test.t;
insert into test.t(a, c, t) select a, c, t from test.t;
insert into test.t(a, c, t) select a, c, t from test.t;
insert into test.t(a, c, t) select a, c, t from test.t;
insert into test.t(a, c, t) select a, c, t from test.t;
insert into test.t(a, c, t) select a, c, t from test.t;
alter table test.t set tiflash replica 1;
select a, b, c, d, hour(t) from test.t where t = '000:10:10.123456';
2. What did you expect to see? (Required)
+------+------+------+------+---------+
| a | b | c | d | hour(t) |
+------+------+------+------+---------+
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
| 1 | 2 | 2 | 3 | 0 |
...
...
| 1 | 2 | 2 | 3 | 0 |
+------+------+------+------+---------+
8192 rows in set (0.04 sec)
3. What did you see instead (Required)
ERROR 1105 (HY000): other error for mpp stream: Code: 0, e.displayText() = DB::TiFlashException: Column index out of bound: 4, should in [0,3): (while creating read sources from storage `db_2`.`t_534`, keyspace_id=4294967295 table_id=534), e.what() = DB::TiFlashException,
4. What is your TiFlash version? (Required)
./tiflash --version
TiFlash
Release Version: v8.2.0-alpha-79-g20d46162a
Edition: Community
Git Commit Hash: 20d46162a6a426991cd9ad2f755072caa8408e9f
Git Branch: HEAD
UTC Build Time: 2024-07-03 04:13:41
Enable Features: jemalloc sm4(GmSSL) avx2 avx512 unwind thinlto
Profile: RELWITHDEBINFO
Compiler: clang++ 17.0.6
Raft Proxy
Git Commit Hash: b8c00d3953fc847a4958cec69b69ad5aa45c8a6d
Git Commit Branch: HEAD
UTC Build Time: 2024-07-03 04:15:32
Rust Version: rustc 1.77.0-nightly (89e2160c4 2023-12-27)
Storage Engine: tiflash
Prometheus Prefix: tiflash_proxy_
Profile: release
Enable Features: external-jemalloc portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine openssl-vendored portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine openssl-vendored
Activity