lxy-9602 commented on code in PR #269:
URL: https://github.com/apache/paimon-cpp/pull/269#discussion_r3924206994


##########
src/paimon/core/realtime/realtime_primary_key_writer.cpp:
##########
@@ -245,15 +235,15 @@ Result<CommitIncrement> 
RealtimePrimaryKeyWriter::PrepareCommit(bool wait_compac
     return increment;
 }
 
-Status RealtimePrimaryKeyWriter::FlushSegment(const 
std::shared_ptr<RealtimeSegmentHandle>& segment,
-                                              const OffsetRange& 
sealed_offsets) {
+Status RealtimePrimaryKeyWriter::FlushSegment(
+    const std::shared_ptr<RealtimeSegmentHandle>& segment) {
+    // TODO(xinyu.lxy): Validate row count from commit readers.

Review Comment:
   This is similar to one comments above. We should clearly define the plugin 
contract and trust the results returned by the plugin. For example, when 
reading through ORC/Parquet format readers, we do not re-validate the returned 
row count against the value recorded in metadata.
   
   Also, for MOR, the row count during the process does not necessarily match 
the final file result, since further merging happens later. Verifying the row 
count in that case would require more extensive changes, and I’m not sure such 
changes are worthwhile if they are only for row-count validation. So I left a 
TODO here as a follow-up item for now.



-- 
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]

Reply via email to