Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public List<ClickHouseColumnInfo> getColumns() {
return this.columns;
}

public int readUnsignedLeb128() throws IOException {
return Utils.readUnsignedLeb128(in);
}

public void readBytes(byte[] bytes) throws IOException {
readBytes(bytes, 0, bytes.length);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ public void testFixedString() throws Exception {
assertEquals(inputZeroPaddedString.readFixedString(10), "hello\0\0\0\0\0");
}

@Test
public void testUnsignedLeb128() throws Exception {
ClickHouseRowBinaryInputStream input = prepareStream(new byte[] { -128, -62, -41, 47 });
assertEquals(input.readUnsignedLeb128(), 100000000);
}

@Test
public void testOne() throws Exception {
ClickHouseRowBinaryInputStream input = prepareStream(new byte[]{5, 97, 46, 98, 46, 99, 123, 20, -82, 71, -31, 26, 69, 64, 34, 87, -13, 88, 120, 67, 48, 116, -13, 88});
Expand Down