Skip to content

Commit 6ace772

Browse files
committed
added temp check to debug cloud tests
1 parent 37ec609 commit 6ace772

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

client-v2/src/main/java/com/clickhouse/client/api/data_formats/internal/BinaryStreamReader.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.clickhouse.client.api.data_formats.internal;
22

33
import com.clickhouse.client.api.ClientException;
4+
import com.clickhouse.client.api.DataTransferException;
45
import com.clickhouse.data.ClickHouseColumn;
56
import com.clickhouse.data.ClickHouseDataType;
67
import com.clickhouse.data.ClickHouseEnum;
@@ -1207,6 +1208,9 @@ private Map<String, Object> readJsonData(InputStream input, ClickHouseColumn col
12071208
for (int i = 0; i < numOfPaths; i++) {
12081209
String path = readString(input);
12091210
ClickHouseColumn dataColumn = i < predefinedPaths ? predefinedColumns.get(i) : JSON_PLACEHOLDER_COL;
1211+
if (dataColumn != JSON_PLACEHOLDER_COL && !dataColumn.getColumnName().equals(path)) {
1212+
throw new DataTransferException("Wrong column at position " + i + " where path " + path + " expected");
1213+
}
12101214
Object value = readValue(dataColumn);
12111215
obj.put(path, value);
12121216
}

client-v2/src/test/java/com/clickhouse/client/datatypes/DataTypeTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ public void testJSONBinaryFormat(String jsonDef) throws Exception {
898898
ClickHouseBinaryFormatReader reader = client.newBinaryFormatReader(queryResponse);
899899
Map<String, Object> row = reader.next();
900900
Object value = row.get("value");
901-
System.out.println(value);
901+
Assert.assertNotNull(value);
902902
}
903903
}
904904

0 commit comments

Comments
 (0)