Class CsvFixtureParser
java.lang.Object
org.elasticsearch.xpack.esql.datasource.csv.CsvFixtureParser
Standalone CSV parser for fixture generation. Parses CSV files with bracket-aware
multi-value support, matching the behavior of
CsvFormatReader.
Used by OrcFixtureGenerator and ParquetFixtureGenerator to read CSV fixtures
with correct multi-value handling (e.g. [a,b,c] as a list, not just first element).
Minimal dependencies: only java.util, java.io, java.nio. No esql-core or server.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Method Summary
Modifier and TypeMethodDescriptionparseCsvFile(Path path) Parse a CSV file and return schema plus rows with proper multi-value handling.parseCsvFile(Path path, char delimiter, char quote, char escape, String commentPrefix) Parse a CSV file with custom delimiter, quote, escape, and comment prefix.
-
Method Details
-
parseCsvFile
Parse a CSV file and return schema plus rows with proper multi-value handling. Header must be incolumn:typeformat. Types: integer, long, double, keyword, boolean, date, ip, etc.- Throws:
IOException
-
parseCsvFile
public static CsvFixtureParser.CsvFixtureResult parseCsvFile(Path path, char delimiter, char quote, char escape, String commentPrefix) throws IOException Parse a CSV file with custom delimiter, quote, escape, and comment prefix.- Throws:
IOException
-