Class CsvSchemaInferrer
java.lang.Object
org.elasticsearch.xpack.esql.datasource.csv.CsvSchemaInferrer
Infers column types from CSV data by sampling rows when headers lack explicit type annotations.
Each column starts at the most specific candidate type and widens on the first value that doesn't fit. Type candidates from most specific to least:
BOOLEAN— onlytrue/false(case-insensitive)INTEGER— fits inintLONG— fits inlongDOUBLE— any floating-point numberDATETIME— ISO-8601, date-only, zone-less timestampsKEYWORD— universal fallback (everything is a string)
For files smaller than the sample size, all rows are used. The inference runs in a single sequential pass over the sample.
-
Method Summary