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 there should be only one page in use at any time. And 
user shouldn't access one chunk reader 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: github-unsubscr...@arrow.apache.org

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

Reply via email to