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

[PR] feat(iceberg-datafusion): make IcebergTableScan public [iceberg-rust]

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

   DataFusion `ExecutionPlan` implementations are generally public, so that they can be inspected and munged by optimization rules.
   
   Our specific use case is to use `IcebergTableProvider` to plan files, and then pass those files (assuming no deletes) to DataFusion`s `ListingTable`.


-- 
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] feat(iceberg-datafusion): make IcebergTableScan public [iceberg-rust]

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


##########
crates/integrations/datafusion/src/physical_plan/scan.rs:
##########
@@ -79,6 +79,22 @@ impl IcebergTableScan {
         }
     }
 
+    pub fn table(&self) -> &Table {
+        &self.table
+    }
+
+    pub fn snapshot_id(&self) -> Option<i64> {
+        self.snapshot_id
+    }
+
+    pub fn projection(&self) -> Option<Vec<String>> {

Review Comment:
   Do you prefer `Option<&Vec<String>>` or `Option<&[String]>` or `Option<&[impl AsRef<str>]>`? 😄 



-- 
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] feat(iceberg-datafusion): make IcebergTableScan public [iceberg-rust]

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


##########
crates/integrations/datafusion/src/physical_plan/scan.rs:
##########
@@ -79,6 +79,22 @@ impl IcebergTableScan {
         }
     }
 
+    pub fn table(&self) -> &Table {
+        &self.table
+    }
+
+    pub fn snapshot_id(&self) -> Option<i64> {
+        self.snapshot_id
+    }
+
+    pub fn projection(&self) -> Option<Vec<String>> {

Review Comment:
   `Option<&[String]>` seems better to me.



-- 
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] feat(iceberg-datafusion): make IcebergTableScan public [iceberg-rust]

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


##########
crates/integrations/datafusion/src/physical_plan/scan.rs:
##########
@@ -79,6 +79,22 @@ impl IcebergTableScan {
         }
     }
 
+    pub fn table(&self) -> &Table {
+        &self.table
+    }
+
+    pub fn snapshot_id(&self) -> Option<i64> {
+        self.snapshot_id
+    }
+
+    pub fn projection(&self) -> Option<Vec<String>> {

Review Comment:
   Do you prefer `Option<&Vec<String>>` or `Option<&[String]>` or `Option<&[impl AsRef<str>]>`? 😄 
   
   I did `Option<&Vec<String>>` for now.



-- 
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] feat(iceberg-datafusion): make IcebergTableScan public [iceberg-rust]

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


-- 
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] feat(iceberg-datafusion): make IcebergTableScan public [iceberg-rust]

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


##########
crates/integrations/datafusion/src/physical_plan/scan.rs:
##########
@@ -79,6 +79,22 @@ impl IcebergTableScan {
         }
     }
 
+    pub fn table(&self) -> &Table {
+        &self.table
+    }
+
+    pub fn snapshot_id(&self) -> Option<i64> {
+        self.snapshot_id
+    }
+
+    pub fn projection(&self) -> Option<Vec<String>> {

Review Comment:
   Same as following.



##########
crates/integrations/datafusion/src/physical_plan/scan.rs:
##########
@@ -79,6 +79,22 @@ impl IcebergTableScan {
         }
     }
 
+    pub fn table(&self) -> &Table {
+        &self.table
+    }
+
+    pub fn snapshot_id(&self) -> Option<i64> {
+        self.snapshot_id
+    }
+
+    pub fn projection(&self) -> Option<Vec<String>> {
+        self.projection.clone()
+    }
+
+    pub fn predicate(&self) -> Option<Predicate> {

Review Comment:
   ```suggestion
       pub fn predicate(&self) -> Option<&Predicate> {
   ```
   
   I prefer to return a reference only and leave it to user to clone if necessary.



-- 
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] feat(iceberg-datafusion): make IcebergTableScan public [iceberg-rust]

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


##########
crates/integrations/datafusion/src/physical_plan/scan.rs:
##########
@@ -79,6 +79,22 @@ impl IcebergTableScan {
         }
     }
 
+    pub fn table(&self) -> &Table {
+        &self.table
+    }
+
+    pub fn snapshot_id(&self) -> Option<i64> {
+        self.snapshot_id
+    }
+
+    pub fn projection(&self) -> Option<Vec<String>> {

Review Comment:
   Do you prefer `Option<&Vec<String>>` or `Option<&[String]>` or `Option<&[impl AsRef<str>]>`? 😄 
   
   I did `Option <&Vec<String>>` for now.



-- 
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] feat(iceberg-datafusion): make IcebergTableScan public [iceberg-rust]

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


##########
crates/integrations/datafusion/src/physical_plan/scan.rs:
##########
@@ -79,6 +79,22 @@ impl IcebergTableScan {
         }
     }
 
+    pub fn table(&self) -> &Table {
+        &self.table
+    }
+
+    pub fn snapshot_id(&self) -> Option<i64> {
+        self.snapshot_id
+    }
+
+    pub fn projection(&self) -> Option<Vec<String>> {

Review Comment:
   Done and done.



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