Skip to content

The result of max(time) group by a constant value is wrong #1796

@lilinghai

Description

@lilinghai

Mini reproduce:

create table t1(a timestamp,b int);
alter table t1 set tiflash replica 1;
insert into t1 values("2018-11-22 16:55:24",1);
insert into t1 values("2018-11-23 00:55:24",1);
select max(a) from t1 group by "a";  -- expect 2018-11-23 00:55:24 ; but got 2018-11-22 16:55:24

TiFlash
Release Version: v5.0.0-nightly-53-g37740f794
Edition: Community
Git Commit Hash: 37740f7
Git Branch: master
UTC Build Time: 2021-04-15 10:16:48
Profile: RELWITHDEBINFO

Raft Proxy
Git Commit Hash: 3bb85b07bb9d9a5da2a3595457c3587183ff36d9
Git Commit Branch: HEAD
UTC Build Time: 2021-04-15 09:56:37
Rust Version: rustc 1.51.0-nightly (bc39d4d9c 2021-01-15)
Storage Engine: tiflash
Prometheus Prefix: tiflash_proxy_
Profile: release

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions