apache / apache/doris

[Bug] 执行 analyze 后 show column stats hot_values 信息丢失

Open
#60,857 3 comments 0 reactions 0 assignees View on GitHub
Stale
Dominant language
Java
Stars
15.9k
Forks
3.9k
Avg merge
2d 23h
Merged PRs (30d)
520

Description

### Search before asking

- [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.

### Version

Git : git://vm-80@30d2df045941c55c57ce7cc67314d06216b1a9de

Version : doris-4.0.2-rc02

BuildInfo : vm-80

Features : -TDE,-HDFS_STORAGE_VAULT,+UI,+AZURE_BLOB,+AZURE_STORAGE_VAULT,+HIVE_UDF,+BE_JAVA_EXTENSIONS

BuildTime : Wed, 10 Dec 2025 16:33:17 CST

### What's Wrong?

1. 对应用表执行 analyze table 后,发现 hot_values 列值信息丢失
执行 analyze 前,show column stats table 信息如下:
+-------------+----------------------------------+
| column_name | hot_values |
+-------------+----------------------------------+
| DataSource | 'GLBalance':0.98 |
+-------------+----------------------------------+

2. 执行 analyze 后,show column stats table 显示如下:
+-------------+----------------------------------+
| column_name | hot_values |
+-------------+----------------------------------+
| DataSource | null |
+-------------+----------------------------------+

3. 在多表 JOIN 情况下,执行 analyze 后发现查询计划发生变化,查询变慢,通过 drop stats 删除统计信息后,重新查询,查询计划与 analyze 之前保持一致,查询变快;

4. 查询官方文档没有 hot_values 列相关的参数说明,怀疑是个 BUG;

### What You Expected?

1. 执行 analyze 后,show column stats table 的信息应该保持不变(没有写入新数据情况下):
+-------------+----------------------------------+
| column_name | hot_values |
+-------------+----------------------------------+
| DataSource | 'GLBalance':0.98 |
+-------------+----------------------------------+

### How to Reproduce?

_No response_

### Anything Else?

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.