Interface NoConfigFormatReader
- All Superinterfaces:
AutoCloseable,Closeable,FormatReader
FormatReader for readers that recognise no per-query configuration keys.
Supplies the standard "no keys claimed" override of withConfigTrackingConsumedKeys(java.util.Map<java.lang.String, java.lang.Object>)
so the dozen-plus test fixtures and stateless production readers (ORC, JMH benchmark stubs)
do not each repeat the same return Configured.empty(this) body.
Implement this in place of FormatReader when the reader genuinely has no per-query
keys today. Readers that do claim keys must still implement FormatReader directly
— the abstract contract there is the forcing function preventing silent acceptance of unknown
configuration keys.
Symmetric to StorageProviderFactory.noConfigKeys(java.util.function.Supplier) on the
storage side: both expose a single explicit opt-in point for the "no per-query options" case.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.datasources.spi.FormatReader
FormatReader.SchemaResolution -
Field Summary
Fields inherited from interface org.elasticsearch.xpack.esql.datasources.spi.FormatReader
DEFAULT_SCHEMA_RESOLUTION, NO_LIMIT -
Method Summary
Modifier and TypeMethodDescriptiondefault Configured<FormatReader> withConfigTrackingConsumedKeys(Map<String, Object> config) Returns a reader configured from the input config map, paired with the keys consumed from it.Methods inherited from interface org.elasticsearch.xpack.esql.datasources.spi.FormatReader
aggregatePushdownSupport, defaultErrorPolicy, defaultSchemaResolution, fileExtensions, filterPushdownSupport, formatName, metadata, metadataAsync, read, read, readAsync, rowPositionStrategy, schema, statusSnapshot, supportsNativeAsync, supportsWholeFileCompression, withConfig, withDeclaredDateFormats, withDeclaredTypeColumns, withPushedFilter, withSchema
-
Method Details
-
withConfigTrackingConsumedKeys
Description copied from interface:FormatReaderReturns a reader configured from the input config map, paired with the keys consumed from it.Required override. Every reader must explicitly declare which keys it claims, even if the answer is "none" (return
Configured.empty(this)). The previousdefaultsilently dropped any unknown keys; that footgun is the reason this is no longer optional. Implementations that read configuration from the map should override this method (notFormatReader.withConfig(Map)); the consumed-keys set is required byConfigKeyValidatorfor unknown-key rejection at planning time.- Specified by:
withConfigTrackingConsumedKeysin interfaceFormatReader
-