Class FileMetadataColumns
java.lang.Object
org.elasticsearch.xpack.esql.datasources.FileMetadataColumns
Registry of well-known file metadata virtual columns for external data sources.
Uses dot-namespaced names under
_file.* to avoid collisions with
Hive partition columns (which cannot contain dots).
Separate from MetadataAttribute.ATTRIBUTES_MAP which covers ES index metadata.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionextractValues(FileList fileList, int index) Index-based accessor forFileList, which exposes file metadata as primitives.extractValues(StoragePath path, long length, Instant lastModified) Object-typed entry point.extractValues(StorageEntry entry) Convenience overload for callers that already hold aStorageEntry.static booleanisFileMetadataColumn(String name)
-
Field Details
-
PATH
- See Also:
-
NAME
- See Also:
-
DIRECTORY
- See Also:
-
SIZE
- See Also:
-
MODIFIED
- See Also:
-
RECORD_REF
Opaque, stable, per-record reference. Unlike the other_file.*columns (per-file constants viaextractValues(org.elasticsearch.xpack.esql.datasources.spi.StoragePath, long, java.time.Instant)), this one varies per record and is sourced from the reader's row-position channel (ColumnExtractor.ROW_POSITION_COLUMN). Shape is format-defined and opaque to consumers — equality is the only defined relation, independent of split layout. Deliberately excluded fromextractValues(org.elasticsearch.xpack.esql.datasources.spi.StoragePath, long, java.time.Instant).- See Also:
-
COLUMNS
-
NAMES
-
-
Method Details
-
isFileMetadataColumn
-
extractValues
Object-typed entry point. PasslastModified == nullfor SQLNULL; any non-nullInstant(includingInstant.EPOCH) is rendered as the corresponding epoch-millis timestamp. Callers that hold a primitive epoch-millis with0Las the "unknown" sentinel (e.g.FileList) should normalise tonullbefore calling this method, or useextractValues(FileList, int). -
extractValues
Convenience overload for callers that already hold aStorageEntry. Note thatStorageEntrynormalises anulllastModifiedtoInstant.EPOCHat construction time, so this overload cannot distinguish "modified at the epoch" from "unknown mtime". For SQL-NULLsemantics, useextractValues(FileList, int). -
extractValues
-