mbutrovich opened a new pull request, #4435:
URL: https://github.com/apache/datafusion-comet/pull/4435

   ## Which issue does this PR close?
   
   Closes #4279.
   
   ## Rationale for this change
   
   `CometDecodedVector.isNullAt` already caches the validity bitmap byte, but 
it re-resolved `valueVector.getValidityBuffer().memoryAddress()` on every 
byte-cache miss. The buffer address is stable for the vector's lifetime, so the 
lookup can be cached once.
   
   While in the file: `setNumNulls` and `setNumValues` on `CometVector` had no 
callers outside their own overrides. Removing them lets the count fields become 
`final`.
   
   ## What changes are included in this PR?
   
   - Cache `validityBufferAddress` in the `CometDecodedVector` constructor; 
drop the per-miss lookup in `isNullAt`.
   - Remove unused `setNumNulls` / `setNumValues` from `CometVector` and the 
four implementations (`CometDecodedVector`, `CometPlainVector`, 
`CometDelegateVector`, `CometSelectionVector`). I suspect these were used in 
the legacy Parquet and Iceberg code paths.
   - Mark `hasNull`, `numNulls`, `numValues`, `isUuid`, and 
`validityBufferAddress` as `final` in `CometDecodedVector`.
   
   ## How are these changes tested?
   
   New `TestCometPlainVector.testIsNullAtSequentialAcrossValidityBytes` 
exercises sequential `isNullAt` reads (forward and reverse) across multiple 
validity bytes with mixed null/non-null rows.
   
   Otherwise, existing tests.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to