ZENOTME opened a new issue, #398:
URL: https://github.com/apache/iceberg-rust/issues/398

   Hi, I find that in some cases our reader interface seems duplicate for me. 
   
   E.g. 
   ```
   let table_scan = table
               .scan()
               .with_batch_size(Some(self.batch_size))
               .select(self.schema.names())
               .predict(predict)
               .build()
               .map_err(BatchError::Iceberg)?;
   let file_scan_stream = table_scan.plan_files();
   
   // Create a reader here. We need the info already pass to table_scan again
   let reader =  ArrowReaderBuilder::new(self.file_io.clone(), 
self.schema.clone())
                            .with_field_id(....)
                            .wtih_predict(..)
   
   for file_scan in file_scan_stream {
       let arrow_batch_stream = reader.read(file_scan)
   }
   ```
   
   I recommend we should move the field_id, predicates info into 
[file_scan](https://github.com/apache/iceberg-rust/blob/f1ea6e137eaabf22ff7d091bfafa0a05739a6516/crates/iceberg/src/scan.rs#L468).
 Config this info again in reader is not friendly for user and is prone to 
inconsistent.


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