|
Kinetica C# API
Version 7.2.3.1
|
Wire-format pinning tests for RecordKey decimal encoding. More...
Public Member Functions | |
| void | AddDecimal_8Byte_WithSimpleValue_StoresCorrectly () |
| WIRE FORMAT TEST: Verifies 8-byte decimal encoding for positive values. More... | |
| void | AddDecimal_8Byte_WithNegativeValue_StoresCorrectly () |
| WIRE FORMAT TEST: Verifies 8-byte decimal encoding for negative values. More... | |
| void | AddDecimal_8Byte_WithNull_StoresZeros () |
| void | AddDecimal_12Byte_WithSimpleValue_StoresCorrectly () |
| void | AddDecimal_12Byte_WithNull_StoresZeros () |
| void | AddDecimal_12Byte_WithLargeValue_StoresCorrectly () |
| void | AddDecimal_12Byte_WithNegativeValue_StoresCorrectly () |
| void | AddDecimal_PrecisionBoundary_At18_Uses8Bytes () |
| WIRE FORMAT TEST: Verifies precision boundary - precision 18 uses 8-byte encoding. More... | |
| void | AddDecimal_PrecisionBoundary_At19_Uses12Bytes () |
| WIRE FORMAT TEST: Verifies precision boundary - precision 19 uses 12-byte encoding. More... | |
Wire-format pinning tests for RecordKey decimal encoding.
RecordKeys are used for shard routing in Kinetica. The binary encoding of decimal values in RecordKeys MUST remain stable across versions to ensure consistent routing of records to the correct shards.
This test suite verifies:
Wire Format Details:
Any changes to these encoding rules will break shard routing compatibility.
Definition at line 29 of file RecordKeyDecimalTests.cs.
|
inline |
Definition at line 187 of file RecordKeyDecimalTests.cs.
|
inline |
Definition at line 206 of file RecordKeyDecimalTests.cs.
|
inline |
Definition at line 168 of file RecordKeyDecimalTests.cs.
|
inline |
Definition at line 142 of file RecordKeyDecimalTests.cs.
|
inline |
WIRE FORMAT TEST: Verifies 8-byte decimal encoding for negative values.
Test vector: "-987.6543" with scale 4 Expected encoding: -9876543 as little-endian int64 (two's complement)
Negative values use standard two's complement representation. This encoding MUST remain stable for shard routing compatibility.
Definition at line 108 of file RecordKeyDecimalTests.cs.
|
inline |
Definition at line 127 of file RecordKeyDecimalTests.cs.
|
inline |
WIRE FORMAT TEST: Verifies 8-byte decimal encoding for positive values.
Test vector: "123.45" with scale 4 Expected encoding: 1234500 as little-endian int64 Bytes: 0x84, 0xD7, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00
This encoding MUST remain stable for shard routing compatibility.
Definition at line 80 of file RecordKeyDecimalTests.cs.
|
inline |
WIRE FORMAT TEST: Verifies precision boundary - precision 18 uses 8-byte encoding.
CRITICAL: Precision <= 18 MUST use 8-byte encoding (int64). This boundary is part of the wire format specification and cannot change.
Rationale: int64 can represent values up to 9,223,372,036,854,775,807 (19 digits), which is sufficient for decimal(18,x) after scaling.
Definition at line 234 of file RecordKeyDecimalTests.cs.
|
inline |
WIRE FORMAT TEST: Verifies precision boundary - precision 19 uses 12-byte encoding.
CRITICAL: Precision > 18 MUST use 12-byte encoding (96-bit integer). This boundary is part of the wire format specification and cannot change.
Rationale: Values with precision > 18 can exceed int64 range after scaling, requiring a larger storage format.
Definition at line 256 of file RecordKeyDecimalTests.cs.