dongxiao1198 commented on code in PR #143:
URL: https://github.com/apache/iceberg-cpp/pull/143#discussion_r2192189472


##########
src/iceberg/manifest_reader.h:
##########
@@ -34,19 +34,17 @@ namespace iceberg {
 /// \brief Read manifest entries from a manifest file.
 class ICEBERG_EXPORT ManifestReader {
  public:
-  virtual Result<std::span<std::unique_ptr<ManifestEntry>>> Entries() const = 
0;
+  virtual Result<std::vector<std::unique_ptr<ManifestEntry>>> Entries() const 
= 0;
 
- private:
-  std::unique_ptr<Reader> reader_;
+  static std::shared_ptr<ManifestReader> NewReader(std::unique_ptr<Reader> 
reader);

Review Comment:
   > For ReadEntries, I also think `std::vector<ManifestEntry>` looks better 
than `std::vector<std::unique_ptr<ManifestEntry>>`.
   
   Manifest list schema is almost a fixed schema, i think there is no need to 
add it to interface
     static Result<std::shared_ptr<ManifestListReader>> MakeReader(
         const std::string& manifest_list_location, std::shared_ptr<FileIO> 
file_io);
   
   
   But for manifest EnteryReader , the schema was based on partition type,  i 
think the way like this is much better:
     static Result<std::shared_ptr<ManifestReader>> MakeReader(
         const std::string& manifest_location, std::shared_ptr<FileIO> file_io,
         std::shared_ptr<Schema> partition_schema);



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to