You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "xxchan (via GitHub)" <gi...@apache.org> on 2025/02/23 14:07:05 UTC

[PR] chore: fix edition 2024 compile errors [iceberg-rust]

xxchan opened a new pull request, #998:
URL: https://github.com/apache/iceberg-rust/pull/998

   (no comment)


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [PR] chore: fix edition 2024 compile errors [iceberg-rust]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #998:
URL: https://github.com/apache/iceberg-rust/pull/998


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [PR] chore: fix edition 2024 compile errors [iceberg-rust]

Posted by "xxchan (via GitHub)" <gi...@apache.org>.
xxchan commented on code in PR #998:
URL: https://github.com/apache/iceberg-rust/pull/998#discussion_r1966792744


##########
crates/iceberg/src/arrow/record_batch_transformer.rs:
##########
@@ -140,8 +140,8 @@ impl RecordBatchTransformer {
         Ok(match &self.batch_transform {
             Some(BatchTransform::PassThrough) => record_batch,
             Some(BatchTransform::Modify {
-                ref target_schema,
-                ref operations,
+                target_schema,
+                operations,

Review Comment:
   See: https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html
   
   



-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [PR] chore: fix edition 2024 compile errors [iceberg-rust]

Posted by "xxchan (via GitHub)" <gi...@apache.org>.
xxchan commented on code in PR #998:
URL: https://github.com/apache/iceberg-rust/pull/998#discussion_r1966793025


##########
crates/iceberg/src/scan.rs:
##########
@@ -733,7 +733,7 @@ impl PlanContext {
         manifest_list: Arc<ManifestList>,
         tx_data: Sender<ManifestEntryContext>,
         delete_file_idx_and_tx: Option<(DeleteFileIndex, Sender<ManifestEntryContext>)>,
-    ) -> Result<Box<impl Iterator<Item = Result<ManifestFileContext>>>> {
+    ) -> Result<Box<impl Iterator<Item = Result<ManifestFileContext>> + 'static>> {

Review Comment:
   https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html#edition-specific-rules-when-no-use-bound-is-present
   
   In edition 2024, the RPIT will capture `'self`
   
   And causing error at `spawn`:
   ```rust
   error[E0521]: borrowed data escapes outside of method
      --> crates/iceberg/src/scan.rs:402:9
       |
   365 |       pub async fn plan_files(&self) -> Result<FileScanTaskStream> {
       |                               -----
       |                               |
       |                               `self` is a reference that is only valid in the method body
       |                               let's call the lifetime of this reference `'1`
   ...
   402 | /         spawn(async move {
   403 | |             let result = futures::stream::iter(manifest_file_contexts)
   404 | |                 .try_for_each_concurrent(concurrency_limit_manifest_files, |ctx| async move {
   405 | |                     ctx.fetch_manifest_and_stream_manifest_entries().await
   ...   |
   412 | |         });
       | |          ^
       | |          |
       | |__________`self` escapes the method body here
       |            argument requires that `'1` must outlive `'static`
   
   ```



-- 
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-unsubscribe@iceberg.apache.org

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


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