Skip to content

Commit 3df206d

Browse files
committed
updated examples
1 parent 42670f8 commit 3df206d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

examples/client-v2/src/main/java/com/clickhouse/examples/client_v2/BigDatasetExamples.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private long[] doReadNumbersSet(Client client, int limit) {
102102
ArrayList<com.clickhouse.demo_service.data.NumbersRecord> result = new ArrayList<>();
103103

104104
// iterable approach is more efficient for large datasets because it doesn't load all records into memory
105-
ClickHouseBinaryFormatReader reader = Client.newBinaryFormatReader(response);
105+
ClickHouseBinaryFormatReader reader = client.newBinaryFormatReader(response);
106106

107107
long start = System.nanoTime();
108108
while (reader.next() != null) {

examples/client-v2/src/main/java/com/clickhouse/examples/client_v2/SimpleReader.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ public void readDataUsingBinaryFormat() {
5959
try (QueryResponse response = client.query(sql).get(3, TimeUnit.SECONDS);) {
6060

6161
// Create a reader to access the data in a convenient way
62-
ClickHouseBinaryFormatReader reader = new RowBinaryWithNamesAndTypesFormatReader(response.getInputStream(),
63-
response.getSettings());
62+
ClickHouseBinaryFormatReader reader = client.newBinaryFormatReader(response);
6463

6564
while (reader.hasNext()) {
6665
reader.next(); // Read the next record from stream and parse it

0 commit comments

Comments
 (0)