WZhuo commented on code in PR #801:
URL: https://github.com/apache/iceberg-cpp/pull/801#discussion_r3689133786


##########
src/iceberg/inspect/metadata_table.h:
##########
@@ -46,6 +60,27 @@ class ICEBERG_EXPORT MetadataTable {
 
   virtual Kind kind() const noexcept = 0;
 
+  /// \brief Whether this metadata table supports time-travel queries.
+  ///
+  /// The currently supported snapshots and history metadata tables do not
+  /// support time travel.
+  bool supports_time_travel() const noexcept;
+
+  /// \brief Scan the metadata table using the current snapshot.
+  ///
+  /// Convenience overload — delegates to Scan(std::nullopt).
+  Result<ArrowArray> Scan() { return Scan(std::nullopt); }
+
+  /// \brief Scan the metadata table and return all rows as an Arrow struct 
array.
+  ///
+  /// The returned ArrowArray is a struct array where each element is one row.
+  /// The caller takes ownership and must call ArrowArrayRelease when done.
+  ///
+  /// The default implementation returns NotSupported. Subclasses override this
+  /// to materialize their data.
+  virtual Result<ArrowArray> Scan(
+      const std::optional<SnapshotSelection>& snapshot_selection);

Review Comment:
   Done. The outer `std::optional` has been removed. A default 
`SnapshotSelection` uses `std::monostate` and an empty ref to represent the 
current snapshot on the main branch.



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