ZENOTME commented on code in PR #79:
URL: https://github.com/apache/iceberg-rust/pull/79#discussion_r1357921009


##########
crates/iceberg/src/spec/partition.rs:
##########
@@ -54,6 +56,24 @@ impl PartitionSpec {
     pub fn builder() -> PartitionSpecBuilder {
         PartitionSpecBuilder::default()
     }
+
+    /// Construct the partition type from schema
+    pub fn partition_type(&self, schema: &Schema) -> Result<StructType, Error> 
{
+        let mut fields = Vec::with_capacity(self.fields.len());
+        for field in &self.fields {
+            let field = schema.field_by_id(field.source_id).ok_or_else(|| {

Review Comment:
   Yes. My bad.🥵



##########
crates/iceberg/src/spec/partition.rs:
##########
@@ -54,6 +56,24 @@ impl PartitionSpec {
     pub fn builder() -> PartitionSpecBuilder {
         PartitionSpecBuilder::default()
     }
+
+    /// Construct the partition type from schema
+    pub fn partition_type(&self, schema: &Schema) -> Result<StructType, Error> 
{
+        let mut fields = Vec::with_capacity(self.fields.len());
+        for field in &self.fields {
+            let field = schema.field_by_id(field.source_id).ok_or_else(|| {

Review Comment:
   Yes. My bad.🥵



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