StarRocks Version
Component
- Fe / External Catalog (Paimon)
Environment
- Deployment: Integrated Storage and Compute Architecture (存算一体)
- External Catalog: Paimon 1.2.0
- Catalog Type: Paimon Catalog
Description
Summary
The FE background thread ConnectorTableMetadataProcessor throws a java.lang.ClassCastException while periodically refreshing Paimon Catalog metadata. Although the initial creation of the Paimon catalog and manual queries appear to work fine, the background metadata synchronization fails when encountering specific Paimon table types.
Error Log
Occurrence Time: 2026-03-24 15:28:45
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: class org.apache.paimon.table.FormatTable$FormatTableImpl cannot be cast to class org.apache.paimon.table.FileStoreTable
at com.starrocks.connector.hive.ConnectorTableMetadataProcessor.refreshPaimonCatalog(ConnectorTableMetadataProcessor.java)
...
Caused by: java.lang.ClassCastException: class org.apache.paimon.table.FormatTable$FormatTableImpl cannot be cast to class org.apache.paimon.table.FileStoreTable
Root Cause Analysis (Preliminary)
It seems that ConnectorTableMetadataProcessor in StarRocks 3.3.x assumes all tables in the Paimon Catalog are instances of FileStoreTable. However, in Paimon 1.2.0 (or when certain storage formats are used), some tables are instantiated as FormatTableImpl.
When the refresh thread iterates through the tables, the explicit cast to FileStoreTable fails, causing the background refresh task to crash.
Steps to Reproduce
- Deploy StarRocks 3.3.22 with Paimon 1.2.0.
- Create a Paimon Catalog in StarRocks.
- Ensure the Paimon metastore contains tables that might be identified as
FormatTable (e.g., specific file formats or metadata-only tables).
- Wait for the background periodic refresh (triggered by
ConnectorTableMetadataProcessor).
- Check
fe.warn.log for the ClassCastException.
Expected Behavior
The ConnectorTableMetadataProcessor should handle different implementations of the Paimon Table interface (including FormatTable) without throwing a ClassCastException, or it should skip unsupported table types gracefully.
Actual Behavior
The background thread crashes, potentially leading to stale metadata in the External Catalog.
StarRocks Version
Component
Environment
Description
Summary
The FE background thread
ConnectorTableMetadataProcessorthrows ajava.lang.ClassCastExceptionwhile periodically refreshing Paimon Catalog metadata. Although the initial creation of the Paimon catalog and manual queries appear to work fine, the background metadata synchronization fails when encountering specific Paimon table types.Error Log
Occurrence Time: 2026-03-24 15:28:45
Root Cause Analysis (Preliminary)
It seems that
ConnectorTableMetadataProcessorin StarRocks 3.3.x assumes all tables in the Paimon Catalog are instances ofFileStoreTable. However, in Paimon 1.2.0 (or when certain storage formats are used), some tables are instantiated asFormatTableImpl.When the refresh thread iterates through the tables, the explicit cast to
FileStoreTablefails, causing the background refresh task to crash.Steps to Reproduce
FormatTable(e.g., specific file formats or metadata-only tables).ConnectorTableMetadataProcessor).fe.warn.logfor theClassCastException.Expected Behavior
The
ConnectorTableMetadataProcessorshould handle different implementations of the PaimonTableinterface (includingFormatTable) without throwing aClassCastException, or it should skip unsupported table types gracefully.Actual Behavior
The background thread crashes, potentially leading to stale metadata in the External Catalog.