liurenjie1024 commented on PR #135:
URL: https://github.com/apache/iceberg-rust/pull/135#issuecomment-1894775565

   > Hi, I find that we can modify
   > 
   > ```
   > /// The current file status of iceberg writer. It implement for the writer 
which write a single
   > /// file.
   > pub trait CurrentFileStatus {
   >     /// Get the current file path.
   >     fn current_file_path(&self) -> String;
   >     /// Get the current file row number.
   >     fn current_row_num(&self) -> usize;
   >     /// Get the current file written size.
   >     fn current_written_size(&self) -> usize;
   > }
   > ```
   > 
   > as
   > 
   > ```
   > pub trait CurrentStatus<T> {
   >   fn current_status(&self) -> T
   > }
   > 
   > impl CurrentStatus<CurrentFileStatus> for DataFileWriter {
   >    ...
   > }
   > 
   > impl CurrentStatus<DataFileMetrics> for DataFileWriter {
   >   ...
   > }
   > ```
   > 
   > The following traits can also help export metrics in the future.
   
   Trait is usually used to abstract things and hide concrete implementation. I 
don't quite understand the goal of this trait `CurrentStatus` and when it will 
be useful?


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to