Skip to content

Query fails under disaggregated arch #10226

@JaySon-Huang

Description

@JaySon-Huang

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Deploy a object storage, here I use minio
  2. Deploy a tidb cluster with disaggregated arch on the object storage
tiup playground v8.5.2 --mode tidb-cse --cse.bucket jayson --cse.s3_endpoint "http://10.2.12.79:9000" --host 10.2.12.81 --tiflash 1
  1. Run the following queries
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 + 0.001 from test.t;
insert into test.t(a, c, t) select a, c, t + 0.002 from test.t;
insert into test.t(a, c, t) select a, c, t + 0.004 from test.t;
insert into test.t(a, c, t) select a, c, t + 0.008 from test.t;
insert into test.t(a, c, t) select a, c, t + 0.016 from test.t;
insert into test.t(a, c, t) select a, c, t + 0.032 from test.t;
insert into test.t(a, c, t) select a, c, t + 0.064 from test.t;
insert into test.t(a, c, t) select a, c, t + 0.128 from test.t;
insert into test.t(a, c, t) select a, c, t + 0.256 from test.t;
insert into test.t(a, c, t) select a, c, t + 0.512 from test.t;
insert into test.t(a, c, t) select a, c, t + 1.024 from test.t;
insert into test.t(a, c, t) select a, c, t + 2.048 from test.t;

alter table test.t set tiflash replica 1;

analyze table test.t;

set tidb_isolation_read_engines='tiflash'; select a, b, c, d, hour(t) from test.t where t = '000:10:10.123456';
+------+------+------+------+---------+
| a    | b    | c    | d    | hour(t) |
+------+------+------+------+---------+
|    1 |    2 |    2 |    3 |       0 |
+------+------+------+------+---------+

drop table test.t;

2. What did you expect to see? (Required)

The query success

3. What did you see instead (Required)

The query fails

> set tidb_isolation_read_engines='tiflash'; select a, b, c, d, hour(t) from test.t where t = '000:10:10.123456';
(1105, 'other error for mpp stream: Code: 0, e.displayText() = DB::TiFlashException: The data type Nullable(MyDuration(6)) from tidb table scan schema is different from the data type Nullable(Int64) from tiflash storage schema, \n                    table id is 110, \n                    column index is 4, \n                    column name from tidb table scan is table_scan_4, \n                    column name from tiflash storage is exchange_receiver_4, e.what() = DB::TiFlashException,')

4. What is your TiFlash version? (Required)

v8.5.2

Metadata

Metadata

Assignees

Labels

affects-8.5This bug affects the 8.5.x(LTS) versions.component/computenextgenIndicates that the Issue or PR belongs to the nextgen kernel architecture.severity/majortype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions