File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222#include < memory>
2323
2424#include " iceberg/catalog.h"
25+ #include " iceberg/location_provider.h"
2526#include " iceberg/partition_spec.h"
2627#include " iceberg/result.h"
2728#include " iceberg/schema.h"
@@ -140,6 +141,10 @@ const std::shared_ptr<TableMetadata>& Table::metadata() const { return metadata_
140141
141142const std::shared_ptr<Catalog>& Table::catalog () const { return catalog_; }
142143
144+ Result<std::unique_ptr<LocationProvider>> Table::location_provider () const {
145+ return LocationProvider::Make (metadata_->location , metadata_->properties );
146+ }
147+
143148Result<std::unique_ptr<TableScanBuilder>> Table::NewScan () const {
144149 return TableScanBuilder::Make (metadata_, io_);
145150}
Original file line number Diff line number Diff line change @@ -116,6 +116,9 @@ class ICEBERG_EXPORT Table : public std::enable_shared_from_this<Table> {
116116 // / \brief Returns the catalog that this table belongs to
117117 const std::shared_ptr<Catalog>& catalog () const ;
118118
119+ // / \brief Return a LocationProvider for this table
120+ Result<std::unique_ptr<LocationProvider>> location_provider () const ;
121+
119122 // / \brief Refresh the current table metadata
120123 virtual Status Refresh ();
121124
You can’t perform that action at this time.
0 commit comments