File tree Expand file tree Collapse file tree
src/paimon/core/table/system Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ());
You can’t perform that action at this time.
0 commit comments