You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@tsfile.apache.org by "ColinLeeo (via GitHub)" <gi...@apache.org> on 2026/07/30 06:51:40 UTC

[PR] fix(cpp): preserve Gorilla sentinel values in aligned reads [tsfile]

ColinLeeo opened a new pull request, #883:
URL: https://github.com/apache/tsfile/pull/883

   ## Description
   
   Fixes data loss when reading aligned `DOUBLE` columns with parallel reading enabled.
   
   Gorilla encoding uses the canonical NaN bit pattern as its stream terminator. When the same bit pattern appears as a legitimate value, the regular batch decoder stops early. The parallel aligned-reader path previously treated the remaining predecoded buffer as valid, causing the NaN and subsequent values to be returned incorrectly.
   
   ## Changes
   
   - Use the aligned page bitmap as the authoritative non-null value count.
   - Continue decoding when a batch stops at an embedded Gorilla sentinel value.
   - Preserve legitimate NaN values and all values following them.
   - Apply the same count-aware behavior to fixed-width aligned read and skip paths.
   - Keep the normal batch decoding fast path unchanged.
   
   ## Tests
   
   Added a regression test covering an aligned `DOUBLE/GORILLA` page containing a NaN before the end of the page. It verifies that:
   
   - Reading returns `E_OK`.
   - The NaN value is preserved.
   - All subsequent values are returned correctly.
   - No rows are lost or replaced with zero values.
   
   Validation:
   
   - `TsFileReaderTest.*`: 18 tests passed
   - `*Gorilla*`: 25 tests passed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@tsfile.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(cpp): preserve Gorilla sentinel values in batch reads [tsfile]

Posted by "ColinLeeo (via GitHub)" <gi...@apache.org>.
ColinLeeo merged PR #883:
URL: https://github.com/apache/tsfile/pull/883


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@tsfile.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org