Interface ClickHouseTextFormatReader
- All Superinterfaces:
AutoCloseable,ClickHouseFormatReader
- All Known Implementing Classes:
JSONEachRowFormatReader
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 (includingJSONEachRow) as their string label, never as the underlying numeric value. As a result, the inheritedgetEnum8/getEnum16accessors are not usable for real enum data and are expected to throw aRuntimeException. Callers should read enum columns withgetStringinstead.- Temporal and other parse-on-read accessors
(
getLocalDate,getLocalTime,getLocalDateTime,getOffsetDateTime,getUUID) parse the value out of its textual representation, so they fail with aRuntimeExceptionwhen 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
TableSchemamay report a coarser type than a binary reader would for the same column.
-
Method Summary
Methods inherited from interface java.lang.AutoCloseable
closeMethods inherited from interface com.clickhouse.client.api.data_formats.ClickHouseFormatReader
getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBooleanArray, getBooleanArray, getByte, getByte, getByteArray, getByteArray, getClickHouseBitmap, getClickHouseBitmap, getDouble, getDouble, getDoubleArray, getDoubleArray, getDuration, getDuration, getEnum16, getEnum16, getEnum8, getEnum8, getFloat, getFloat, getFloatArray, getFloatArray, getGeoMultiPolygon, getGeoMultiPolygon, getGeoPoint, getGeoPoint, getGeoPolygon, getGeoPolygon, getGeoRing, getGeoRing, getInet4Address, getInet4Address, getInet6Address, getInet6Address, getInstant, getInstant, getIntArray, getIntArray, getInteger, getInteger, getList, getList, getLocalDate, getLocalDate, getLocalDateTime, getLocalDateTime, getLocalTime, getLocalTime, getLong, getLong, getLongArray, getLongArray, getObjectArray, getObjectArray, getOffsetDateTime, getOffsetDateTime, getSchema, getShort, getShort, getShortArray, getShortArray, getString, getString, getStringArray, getStringArray, getTemporalAmount, getTemporalAmount, getTuple, getTuple, getUUID, getUUID, getZonedDateTime, getZonedDateTime, hasNext, hasValue, hasValue, next, readValue, readValue