Statistics of TIMESTAMP column is stored as datetime string without timezone information
Open
affects-6.1
affects-6.5
affects-7.1
affects-7.5
affects-8.1
component/statistics
severity/moderate
sig/planner
type/bug
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)

As you can see, the type of this column is TIMESTAMP, but we store its histogram with datetime string without timezone information. And the timezone is not UTC, it's decided by the session executing the ANALYZE command.
This is not correct and will introduce an estimation error.
Contributor guide
Assessment
This issue has not been assessed yet.