wgtmac commented on code in PR #47: URL: https://github.com/apache/iceberg-cpp/pull/47#discussion_r2011291165
########## src/iceberg/table.h: ########## @@ -19,17 +19,91 @@ #pragma once +#include <map> #include <string> +#include <vector> +#include "iceberg/expected.h" #include "iceberg/iceberg_export.h" +#include "iceberg/type_fwd.h" namespace iceberg { -/// \brief The metadata of an Iceberg table. +/// \brief Represents an Iceberg table class ICEBERG_EXPORT Table { public: virtual ~Table() = default; - virtual std::string print() const = 0; + + /// \brief Return the full name for this table + virtual std::string name() const = 0; + + /// \brief Returns the UUID of the table + virtual std::string uuid() const = 0; + + /// \brief Refresh the current table metadata + virtual void Refresh() = 0; Review Comment: To @lidavidm: > Hmm, do we want a table to be able to do I/O, or should it effectively be a POD (albeit not actually a POD)? I believe we have to support I/O at least to parse metadata file. See my comment at https://github.com/apache/iceberg-cpp/pull/30#pullrequestreview-2710525598. > I was thinking Table would be a wrapper around already-parsed data, and so to refresh the table, you'd just load the table again I think we can still define an abstract `Table` class. A subclass `StaticTable` accepts a deserialized `TableMetadata` and `StaticTable::Refresh()` is a no-op. We still need the Table abstraction for catalog-backed tables and metadata tables. To @Fokko: > In PyIceberg, the Table also has a reference back to the catalog, which makes it easier to refresh the underlying TableMetadata. That makes sense! We can add a `CatalogTable` to implement a catalog-backed table. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org