lucasfang commented on code in PR #286:
URL: https://github.com/apache/paimon-cpp/pull/286#discussion_r3975030551


##########
include/paimon/reader/file_batch_reader.h:
##########
@@ -63,6 +63,23 @@ class PAIMON_EXPORT FileBatchReader : public BatchReader {
 
     /// Get whether or not support read precisely while bitmap pushed down.
     virtual bool SupportPreciseBitmapSelection() const = 0;
+
+    /// Starts whatever background work this reader would otherwise start on 
its first read, so a
+    /// caller that knows this reader is next can pay that startup while still 
consuming the
+    /// previous one.
+    ///
+    /// This is an optional hint and never changes what the reader returns: 
ordering, filtering and
+    /// metrics are the same with or without it. A reader with nothing to 
start, or one that is not
+    /// yet ready to start it, does nothing. Calling it before the reader is 
configured (for example
+    /// before `SetReadSchema()`), or after `Close()`, is such a no-op.
+    ///
+    /// It reports no error on purpose: the caller may warm up a reader it 
never ends up reading,
+    /// and a hint about a file nobody reads must not fail the read in 
progress. An implementation
+    /// that cannot start its work leaves it to be started by the first read, 
which reports the
+    /// failure itself.
+    /// @warning The call starts background work owned by this reader, so it 
must be made from the
+    /// same thread that reads this reader, and not concurrently with any 
other call on it.

Review Comment:
   Good catch — that wording described one implementation's behavior as if it 
were the base-class contract. Plugins are free to define what Warmup() starts, 
including doing nothing at all.



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