lucasfang commented on code in PR #420:
URL: https://github.com/apache/paimon-cpp/pull/420#discussion_r4225910786
##########
src/paimon/common/reader/concat_batch_reader.cpp:
##########
@@ -34,7 +36,12 @@
ConcatBatchReader::ConcatBatchReader(std::vector<std::unique_ptr<BatchReader>>&&
: arrow_pool_(arrow_pool),
finished_reader_metrics_(std::make_shared<MetricsImpl>()),
readers_(std::move(readers)),
- current_(0) {}
+ current_(0) {
+ file_readers_.reserve(readers_.size());
+ for (const auto& reader : readers_) {
+ file_readers_.push_back(dynamic_cast<FileBatchReader*>(reader.get()));
Review Comment:
dynamic_cast returns nullptr when the cast fails, but the result is pushed
into file_readers_ without any check.
--
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]