kou commented on code in PR #44809:
URL: https://github.com/apache/arrow/pull/44809#discussion_r1854783470


##########
cpp/src/parquet/arrow/reader.cc:
##########
@@ -1291,26 +1286,42 @@ std::shared_ptr<RowGroupReader> 
FileReaderImpl::RowGroup(int row_group_index) {
 // ----------------------------------------------------------------------
 // Public factory functions
 

Review Comment:
   The reason isn't correct. In general, we can write these definitions in 
`.h`. But we can't do it in this case. Because `arrow::RecordBatchReader` 
declaration isn't available in `reader.h`.
   
   We just have a forward declaration of `arrow::RecordBatchReader` not 
`#include <arrow/record_batch.h>`:
   
https://github.com/apache/arrow/blob/ae497bf11a4078f48b02f53b8dc843e3c0579d76/cpp/src/parquet/arrow/reader.h#L34
   
   It's a general C++ technique to reduce build time. We need the 
`arrow::RecordBatchReader` declaration here because `std::unique_ptr` requires 
it.
   
   So I wrote these definitions here instead of adding `#include 
<arrow/record_batch.h>` and writing these definitions in `reader.h`.
   
   The current definitions order is aligned with the order in `reader.h`.



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