Skip to content

Commit 515bd86

Browse files
author
shuxu.li
committed
feat: metadata access support for table
1 parent d95bd4b commit 515bd86

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/iceberg/table.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const std::unordered_map<std::string, std::string>& Table::properties() const {
9898

9999
const std::string& Table::location() const { return metadata_->location; }
100100

101-
std::shared_ptr<Snapshot> Table::CurrentSnapshot() const {
101+
std::shared_ptr<Snapshot> Table::current_snapshot() const {
102102
std::call_once(init_snapshot_once_, [this]() {
103103
auto snapshot = metadata_->Snapshot();
104104
if (snapshot.has_value()) {

src/iceberg/table.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class ICEBERG_EXPORT Table {
8484
const std::string& location() const;
8585

8686
/// \brief Return the table's current snapshot, return null if not found
87-
std::shared_ptr<Snapshot> CurrentSnapshot() const;
87+
std::shared_ptr<Snapshot> current_snapshot() const;
8888

8989
/// \brief Get the snapshot of this table with the given id, or null if there is no
9090
/// matching snapshot

test/table_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ TEST(Table, TableV2) {
105105
// Check snapshot
106106
auto snapshots = table.snapshots();
107107
ASSERT_EQ(2UL, snapshots.size());
108-
auto snapshot = table.CurrentSnapshot();
108+
auto snapshot = table.current_snapshot();
109109
ASSERT_TRUE(snapshot != nullptr);
110110
auto invalid_snapshot_id = 9999;
111111
snapshot = table.SnapshotById(invalid_snapshot_id);

0 commit comments

Comments
 (0)