Interface TableCatalog
- All Superinterfaces:
AutoCloseable,Closeable,ExternalSourceFactory
Connects to table catalog systems like Iceberg, Delta Lake, or Hudi.
Provides metadata resolution and scan planning for table-based data sources.
Unlike FormatReader which reads individual files, TableCatalog
understands table structure including partitioning, snapshots, and
metadata management. It returns the same SourceMetadata type as
FormatReader for consistency in schema discovery.
Table-based sources differ from file-based sources in that the schema is
defined at the TABLE level, separate from data files. The native schema
(e.g., Iceberg Schema) must be preserved in SourceMetadata.sourceMetadata()
to avoid re-resolving the table during execution.
Implementations typically reuse a FormatReader (e.g., ParquetFormatReader) for actual data reading after planning which files to read.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleandefault FilterPushdownSupportdefault SourceOperatorFactoryProviderdefault SourceMetadataresolveMetadata(String location, Map<String, Object> config) default Stringtype()Methods inherited from interface org.elasticsearch.xpack.esql.datasources.spi.ExternalSourceFactory
splitProvider
-
Method Details
-
catalogType
String catalogType() -
canHandle
- Specified by:
canHandlein interfaceExternalSourceFactory
-
metadata
- Throws:
IOException
-
planScan
List<TableCatalog.DataFile> planScan(String tablePath, Map<String, Object> config, List<Object> predicates) throws IOException- Throws:
IOException
-
type
- Specified by:
typein interfaceExternalSourceFactory
-
resolveMetadata
- Specified by:
resolveMetadatain interfaceExternalSourceFactory
-
filterPushdownSupport
- Specified by:
filterPushdownSupportin interfaceExternalSourceFactory
-
operatorFactory
- Specified by:
operatorFactoryin interfaceExternalSourceFactory
-