public void readData() {
        log.info("Reading data from table: {} using Records iterator", TABLE_NAME);
        final String sql = "select * from " + TABLE_NAME + " where title <> '' limit 10";
        try (Records records = client.queryRecords(sql).get(3, TimeUnit.SECONDS);) {

            // Get some metrics
            log.info("Data read successfully: {} ms", TimeUnit.NANOSECONDS.toMillis(records.getServerTime()));
            log.info("Total rows: {}", records.getResultRows());

            // Iterate thru records
            for (GenericRecord record : records) {
                double id = record.getDouble("id");
                String title = record.getString("title");
                String url = record.getString("url");

                log.info("id: {}, title: {}, url: {}", id, title, url);
            }
        } catch (Exception e) {
            log.error("Failed to read data", e);
        }
    }
<p>Example class showing how to read data from ClickHouse server using the new ClickHouse client.</p>
<p>Method {@link Client#query(String, QuerySettings)} returns a {@link Future} for {@link QueryResponse}. The last
one is an object providing access to query results and actual data returned by server. The data is accessible thru
an InputStream what makes it possible to be used with any data reader. Library provides most essential readers.
If response is in well known format like CSV than it is possible to use any 3rd-party library that can read from a stream.
</p>

<p>Readers may be found in the package {@code com.clickhouse.client.api.data_formats}. Here are readers for RowBinary formats:</p>
<ul>
    <li>{@link com.clickhouse.client.api.data_formats.RowBinaryFormatReader}</li>
    <li>{@link com.clickhouse.client.api.data_formats.RowBinaryWithNamesFormatReader}</li>
    <li>{@link com.clickhouse.client.api.data_formats.RowBinaryWithNamesAndTypesFormatReader}</li>
</ul>
examples/client-v2/src/main/java/com/clickhouse/examples/client_v2/SimpleReader.java