lxy-9602 commented on code in PR #213:
URL: https://github.com/apache/paimon-cpp/pull/213#discussion_r3804258626
##########
src/paimon/core/table/source/append_count_reader.cpp:
##########
@@ -35,6 +36,23 @@ Result<int64_t> AppendCountReader::CountRows() {
}
Result<int64_t> AppendCountReader::CountSingleSplit(const
std::shared_ptr<Split>& split) const {
+ std::shared_ptr<RealtimeSplit> realtime_split =
std::dynamic_pointer_cast<RealtimeSplit>(split);
+ if (realtime_split) {
+ if (realtime_split->Version() != RealtimeSplit::kCurrentVersion) {
+ return Status::Invalid("unsupported real-time split version");
+ }
+ if (realtime_split->MemoryEndOffset() <
realtime_split->CommittedEndOffset()) {
+ return Status::Invalid("real-time memory upper offset is behind
committed offset");
+ }
+
Review Comment:
No need to check again.
##########
src/paimon/core/operation/file_store_commit_impl.cpp:
##########
@@ -929,6 +929,19 @@ Result<int64_t> FileStoreCommitImpl::CommitWithProgress(
commit_messages.push_back(realtime_commit.commit_message);
}
+ PAIMON_ASSIGN_OR_RAISE(std::optional<Snapshot> latest_snapshot,
+ snapshot_manager_->LatestSnapshot());
Review Comment:
Opening a small file should not be very expensive. We can address any
performance issues together when we do performance testing.
##########
src/paimon/core/core_options.h:
##########
@@ -107,6 +108,8 @@ class PAIMON_EXPORT CoreOptions {
std::optional<int64_t> GetScanSnapshotId() const;
std::optional<int64_t> GetScanTimestampMillis() const;
int64_t GetRealtimeReadViewTtlMillis() const;
+ /// Returns the statistics mode used by real-time memory indexers.
+ StatisticsMode GetRealtimeStoreStatisticsMode() const;
Review Comment:
real-time store.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]