Jacopo Gobbi
06/26/2026, 7:57 AMRocky
06/26/2026, 7:58 AMSHOW ALTER TABLE COLUMN; to see if any migration jobs are still in RUNNING or FINISHED states from that timeframe.
* Check Table Health: Use SHOW TABLE STATUS; or check the _statistics_.column_statistics table to see if any columns have stale or failed stats.
* Manual Trigger: If statistics for that table are missing, you can manually re-trigger collection to ensure everything is now consistent:
sql
ANALYZE TABLE <table_name>;
Summary: Since the error stopped occurring, it was almost certainly a transient state caused by a schema migration. If the table is performing normally and ANALYZE jobs are now succeeding (check via SHOW ANALYZE JOB), no further action is action is no further action is required.
References
• administration/management/monitoring/metrics.md
• administration/management/monitoring/Monitor_and_Alert.md
• using_starrocks/Cost_based_optimizer.mdRocky
06/26/2026, 8:00 AMSELECT COUNT(*), MIN(col)...). Like any other query, these tasks rely on the FE and BE agreeing on the table's schema.
2. Metadata vs. Data Synchronization: When you perform a schema change (such as ALTER TABLE), the FE updates its metadata immediately. However, the physical segments on the BEs may take time to update their local tablet schema caches or finish versioning. If a statistics task is triggered during this window, the FE may request a column type (the "new" type) that the BE still sees as the "old" type, triggering the column type mismatch.
3. Light Schema Change (LSC): StarRocks often uses LSC to avoid full data rewrites. During this process, different versions of the data may exist across different replicas or rowsets. If the statistics job—which often uses *sampled scanning*—hits a replica or tablet that hasn't fully synchronized the schema update, the error occurs.
4. Intermittent Nature: The error is intermittent because it depends on which specific BE or tablet replica the statistics query happens to target. Once all replicas and BE caches are updated, the error disappears.
Why it "stopped happening"
The error usually resolves itself automatically once:
* The schema change job fully completes (status FINISHED in SHOW ALTER TABLE COLUMN;).
* The BEs refresh their internal schema caches.
* The FE and BE reach a consistent state regarding the column definitions.
Recommended Actions
Since the error has stopped, the system has likely reached consistency. However, you can verify the following:
* Check Schema Change Status: Run SHOW ALTER TABLE COLUMN; to confirm that all recent migrations are finished and didn't leave any tablets in an error state.
* Verify Statistics: Check if the statistics were actually collected for that table:
sql
SHOW ANALYZE STATUS WHERE table_name = 'your_table_name';
* Manual Trigger: If you find that statistics are missing or "Stale," you can manually re-trigger a full collection now that the schema is stable:
sql
ANALYZE TABLE <table_name>;
If this happens frequently after every schema change, you may want to check if you are on an older version of StarRocks (pre-3.x), as newer versions have improved the synchronization of schema metadata during background tasks.
References
• administration/management/monitoring/metrics.md
• using_starrocks/Cost_based_optimizer.md
• sql-reference/information_schema/statistics.md
• knowledge/usage/best-practice.md
• loading/minio.md