Class DeclaredSchemaValidator

java.lang.Object
org.elasticsearch.xpack.esql.datasources.DeclaredSchemaValidator

public final class DeclaredSchemaValidator extends Object
Shape-only validation of a dataset's DatasetMapping at PUT time — no file I/O.

What is checked here:

  • every declared type resolves to a type the external readers can actually produce (the DECLARABLE_TYPES whitelist — declaring geo_point/version/etc. is rejected until the readers grow them);
  • under strict mode (dynamic: false) the _id.path column 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 (e.g. unsigned_long is Parquet-only) — the producing format is authoritative at read time.

  • Method Details