分区表查询排序异常UnionExec chunk column count mismatch

【 TiDB 使用环境】Poc/测试
【 TiDB 版本】
【复现路径】由v6.1.1 升级到V7.1.0 出现问题
【遇到的问题:问题现象及影响】
range分区表,使用过滤条件的字段排序时出现 Error Code 1105 Inter error: UnionExec chunk column count mismatch req: 14 , result: 15 的错误
详细如下:
select * from part_t where id between 1 and 100 正常
select * from part_t where id between 1 and 100 order by name 正常
select * from part_t where id between 1 and 100 order by id 出错

select * from part_t where name between ‘aaaa’ and ‘bbb’ 正常
select * from part_t where name between ‘aaaa’ and ‘bbb’ order by id 正常
select * from part_t where name between ‘aaaa’ and ‘bbb’ order by name 出错

PS:

  1. part_t 是一个用时间字段分区表 range 分区
  2. 出错的前提筛选条件能够查询到数据
    3.尝试升级到v7.1.1,问题还在

https://asktug.com/uploads/default/original/4X/5/6/3/5633063a71b3d67ccc37b98319697b657dd0be1b.jpeg
【资源配置】
【附件:截图/日志/监控】

已经有对应的bug了,只在7.1.*有
UnionExec reports error with static pruning · Issue #45757 · pingcap/tidb · GitHub

多谢,看了前面的帖子,验证了一下, 通过设置 tidb_partition_prune_mode=‘dynamic’ 确实可以绕过这个问题

此话题已在最后回复的 60 天后被自动关闭。不再允许新回复。