hcrosse opened a new pull request, #1594:
URL: https://github.com/apache/arrow-go/pull/1594

   ### Rationale for this change
   
   `SeekToRow` uses the wrong page header AAD on encrypted dictionary columns.
   
   I reproduced this on v18.9.0 and main, with Go 1.26.10 on macOS arm64.
   
   ### What changes are included in this PR?
   
   `SeekToPageWithRow` clears `StartDecryptWithDictionaryPage` when it skips 
the dictionary page. `GetDictionaryPage`, which the column reader calls next, 
sets the flag for its header read and restores it.
   
   When `dictionary_page_offset` equals `data_page_offset`, a seek without an 
offset index goes back to the dictionary page, but an earlier read has already 
cleared the flag. The seek sets it again. `dictionaryAtDataOffset`, which #1588 
added, also returns true for encrypted chunks that record a dictionary offset, 
so the seek skips that page as it does for plaintext chunks.
   
   ### Are these changes tested?
   
   - `TestSeekToRowEncryptedDictionary` seeks with and without an offset index.
   - `TestGetDictionaryPageOnEncryptedChunk` reads the dictionary before and 
after `Next` does.
   - `TestReseekOnEncryptedChunkWithSharedPageOffset` reseeks after a read.
   - `TestRecordReaderSeekToRowEncryptedDictionary` covers `pqarrow`.
   - `TestSeekToRowEncryptedTestData` seeks in an Arrow C++ file.
   
   All five fail on main and pass with this change.
   
   Full `go test -race -tags assert,test ./parquet/...` and `golangci-lint` 
2.13.2 passed on linux/amd64 with pinned test data, and focused tests passed on 
macOS arm64.
   
   ### Are there any user-facing changes?
   
   Yes. Seeking encrypted dictionary columns succeeds. There is no API change.
   
   Closes #1593
   


-- 
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]

Reply via email to