Skip to content

Commit f843ad8

Browse files
committed
self review
1 parent 707f8b2 commit f843ad8

1 file changed

Lines changed: 19 additions & 16 deletions

File tree

core/src/test/java/io/questdb/client/test/cutlass/qwp/client/QwpResultBatchDecoderHardeningTest.java

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -238,22 +238,25 @@ public void testStringColumnValidTotalBytesIsAccepted() throws Exception {
238238
});
239239
}
240240

241-
// -----------------------------------------------------------------------
242-
// Wire-format helpers: write a minimal RESULT_BATCH frame to native memory.
243-
// Layout (matches QwpResultBatchDecoder.decodePayload + parseStringColumn):
244-
// header (12 bytes)
245-
// msg_kind (0x11)
246-
// request_id (8 bytes)
247-
// batch_seq (varint)
248-
// table-block:
249-
// name_len (varint), name bytes (none)
250-
// row_count (varint)
251-
// column_count (varint)
252-
// schema_mode (1 byte) + schema_id (varint)
253-
// [if FULL] per column: name_len varint, name bytes, wire_type byte
254-
// per column: null_flag byte (+optional bitmap), then column body
255-
// -----------------------------------------------------------------------
256-
241+
/**
242+
* Writes a single byte and returns the advanced position. Part of the
243+
* wire-format helper set used to hand-craft a minimal RESULT_BATCH frame
244+
* in native memory, matching {@code QwpResultBatchDecoder.decodePayload +
245+
* parseStringColumn}:
246+
* <pre>
247+
* header (12 bytes)
248+
* msg_kind (0x11)
249+
* request_id (8 bytes)
250+
* batch_seq (varint)
251+
* table-block:
252+
* name_len (varint), name bytes (none)
253+
* row_count (varint)
254+
* column_count (varint)
255+
* schema_mode (1 byte) + schema_id (varint)
256+
* [if FULL] per column: name_len varint, name bytes, wire_type byte
257+
* per column: null_flag byte (+optional bitmap), then column body
258+
* </pre>
259+
*/
257260
private static long putByte(long p, byte v) {
258261
Unsafe.getUnsafe().putByte(p, v);
259262
return p + 1;

0 commit comments

Comments
 (0)