ffacs commented on code in PR #2144:
URL: https://github.com/apache/orc/pull/2144#discussion_r1969128800


##########
c++/src/Reader.cc:
##########
@@ -751,6 +751,20 @@ namespace orc {
     return *(contents_->schema.get());
   }
 
+  std::unique_ptr<Statistics>
+  ReaderImpl::getStripeStatisticsOnly(uint64_t stripeIndex) const {
+    if (!isMetadataLoaded) {
+      readMetadata();
+    }
+    if (contents->metadata == nullptr) {
+      throw std::logic_error("No stripe statistics in file");
+    }
+    StatContext statContext(hasCorrectStatistics());
+    return std::unique_ptr<Statistics>(new StatisticsImpl(

Review Comment:
   std::make_unique would be better



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