Skip to content

Commit e8ea380

Browse files
committed
fix: remove unused helper functions in global system tables
1 parent 00ce9cb commit e8ea380

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

src/paimon/core/table/system/global_system_tables.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,6 @@ VariantType StringValue(const std::string& value) {
8686
return BinaryString::FromString(value, GetDefaultPool().get());
8787
}
8888

89-
VariantType OptionalStringValue(const std::optional<std::string>& value) {
90-
if (!value) {
91-
return NullType();
92-
}
93-
return StringValue(value.value());
94-
}
95-
96-
VariantType OptionalInt64Value(const std::optional<int64_t>& value) {
97-
if (!value) {
98-
return NullType();
99-
}
100-
return value.value();
101-
}
102-
10389
} // namespace
10490

10591
// =============================================================================
@@ -298,7 +284,9 @@ Result<std::vector<GenericRow>> TablesSystemTable::BuildRows() const {
298284
auto snapshot_result = snapshot_manager.LatestSnapshot();
299285
if (snapshot_result.ok() && snapshot_result.ValueUnsafe()) {
300286
const auto& snapshot = *snapshot_result.ValueUnsafe();
301-
row.SetField(5, OptionalInt64Value(snapshot.TotalRecordCount()));
287+
auto total_count = snapshot.TotalRecordCount();
288+
row.SetField(5, total_count ? VariantType(total_count.value())
289+
: VariantType(NullType()));
302290
// file_size and file_count not available from Snapshot alone;
303291
// leave as null for now
304292
row.SetField(6, NullType());

0 commit comments

Comments
 (0)