Interface ClickHouseTextFormatReader

All Superinterfaces:
AutoCloseable, ClickHouseFormatReader
All Known Implementing Classes:
JSONEachRowFormatReader

public interface ClickHouseTextFormatReader extends ClickHouseFormatReader
Reader for ClickHouse text output formats (such as JSONEachRow).

Row navigation, schema access, and typed accessors are inherited from ClickHouseFormatReader; this interface specializes the contract for text-encoded result streams

Implementation of a reader may not support every accessor declared on ClickHouseFormatReader; unsupported accessors are expected to throw UnsupportedOperationException.

Format-specific accessor behavior

Text formats encode values as strings rather than as typed binary tokens, so a number of accessors inherited from ClickHouseFormatReader have looser or otherwise text-specific semantics:

  • Enum8 / Enum16. ClickHouse always emits enum columns in text formats (including JSONEachRow) as their string label, never as the underlying numeric value. As a result, the inherited getEnum8 / getEnum16 accessors are not usable for real enum data and are expected to throw a RuntimeException. Callers should read enum columns with getString instead.
  • Temporal and other parse-on-read accessors (getLocalDate, getLocalTime, getLocalDateTime, getOffsetDateTime, getUUID) parse the value out of its textual representation, so they fail with a RuntimeException when the underlying value is not a valid literal for the requested type.
  • Schema inference in text formats may be best-effort: when the reader cannot determine the original ClickHouse type from the wire content, the inferred TableSchema may report a coarser type than a binary reader would for the same column.