OmBiradar commented on code in PR #50158:
URL: https://github.com/apache/arrow/pull/50158#discussion_r3400138092
##########
cpp/src/parquet/arrow/reader.cc:
##########
@@ -825,10 +824,17 @@ Status StructReader::BuildArray(int64_t
length_upper_bound,
END_PARQUET_CATCH_EXCEPTIONS
// Gather children arrays and def levels
- for (auto& child : children_) {
- std::shared_ptr<ChunkedArray> field;
- RETURN_NOT_OK(child->BuildArray(validity_io.values_read, &field));
- ARROW_ASSIGN_OR_RAISE(std::shared_ptr<ArrayData> array_data,
ChunksToSingle(*field));
+ const int num_children = static_cast<int>(children_.size());
Review Comment:
```cpp
template <class FUNCTION>
Status OptionalParallelFor(bool use_threads, int num_tasks, FUNCTION&& func,
Executor* executor =
internal::GetCpuThreadPool()) {
if (use_threads) {
return ParallelFor(num_tasks, std::forward<FUNCTION>(func), executor);
} else {
for (int i = 0; i < num_tasks; ++i) {
RETURN_NOT_OK(func(i));
}
return Status::OK();
}
}
```
At the end, it's always cast to an `int` so truncating is unavoidable.
--
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]