liming30 commented on code in PR #1350:
URL: https://github.com/apache/incubator-paimon/pull/1350#discussion_r1227968329


##########
paimon-common/src/main/java/org/apache/paimon/format/FormatWriter.java:
##########
@@ -60,4 +60,27 @@ public interface FormatWriter {
      * @throws IOException Thrown if the finalization fails.
      */
     void finish() throws IOException;
+
+    /**
+     * Returns the number of bytes that were currently written by this writer.
+     *
+     * <p>NOTE: This is an estimated value.
+     *
+     * @return the number of written bytes
+     * @throws IOException Thrown if calculating the length fails.
+     */
+    long length() throws IOException;
+
+    /**
+     * Check if the writer has reached the <code>targetSize</code>.
+     *
+     * @param suggestedCheck Whether it needs to be checked, but subclasses 
can also decide whether
+     *     to check it themselves.
+     * @param targetSize The size of the target.
+     * @return true if the target size was reached, otherwise false.
+     * @throws IOException Thrown if calculating the length fails.
+     */
+    default boolean reachTargetSize(boolean suggestedCheck, long targetSize) 
throws IOException {

Review Comment:
   Removed the default method.



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