joechenrh commented on code in PR #485:
URL: https://github.com/apache/arrow-go/pull/485#discussion_r2305989166


##########
parquet/file/page_reader.go:
##########
@@ -574,7 +588,7 @@ func (p *serializedPageReader) GetDictionaryPage() 
(*DictionaryPage, error) {
 
                return &DictionaryPage{
                        page: page{
-                               buf:      memory.NewBufferBytes(data),
+                               buf:      buf,

Review Comment:
   I understand your meaning, but I think there should be no concurrency, or, 
data race here.
   - First, dictionary page is only read once for each column chunk reader, 
either reading it at first, or reading it after we skip some rows and find it's 
not initialized. 
   - Second, the page read by `serializedPageReader` is stored in the 
`columnChunkReader`. So the case "the data is being overwritten when it's in 
use" should not happen, unless user access one chunk reader in different 
goroutine in parallel, which I think is an incorrect usage.
   
   
https://github.com/apache/arrow-go/blob/321159468711a8fac9a6c52a956424a390274da2/parquet/file/column_reader.go#L326-L345



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