Class DeclaredSchemaValidator
java.lang.Object
org.elasticsearch.xpack.esql.datasources.DeclaredSchemaValidator
Shape-only validation of a dataset's
DatasetMapping at PUT time — no file I/O.
What is checked here:
- every declared
typeresolves to a type the external readers can actually produce (theDECLARABLE_TYPESwhitelist — declaringgeo_point/version/etc. is rejected until the readers grow them); - under strict mode (
dynamic: false) the_id.pathcolumn must be declared — nothing is inferred to satisfy it.
What is deliberately not checked here (deferred to first-query mapping resolution, because PUT does no
I/O and the files may not exist yet): that the _id.path column exists when it is inferred rather than declared; that
a declared path/type matches the physical file; per-format narrowing, should a format ever be unable to
read a declarable type — the producing format is authoritative at read time.
-
Method Summary
Modifier and TypeMethodDescriptionThe types a user may declare on a dataset mapping.static voidvalidate(DatasetMapping mapping)
-
Method Details
-
declarableTypes
The types a user may declare on a dataset mapping. Exposed so a format reader's tests can pin that the reader actually builds every declarable type with the shapeDeclaredTypeCoercions.elementTypeFor(org.elasticsearch.xpack.esql.core.type.DataType)prescribes — the drift that let a declaredunsigned_longpass validation and then fail at read. -
validate
-