Re: [PR] feat: Reassign field ids for schema [iceberg-rust]

2024-09-25 Thread via GitHub
c-thiel commented on PR #615: URL: https://github.com/apache/iceberg-rust/pull/615#issuecomment-2373882838 Ok, java does not allow this. It's easy to test with the `testNestedStructSchemaToMapping` java test. I fixed the rusts test that failed due to duplicate nested IDs. @liurenji

Re: [PR] feat: Reassign field ids for schema [iceberg-rust]

2024-09-25 Thread via GitHub
c-thiel commented on PR #615: URL: https://github.com/apache/iceberg-rust/pull/615#issuecomment-2373795823 @liurenjie1024 I addressed all of your comments. I also noticed that I didn't handle a potential field_id overflow error which I also fixed. Regarding your uniqueness of id co

Re: [PR] feat: Reassign field ids for schema [iceberg-rust]

2024-09-25 Thread via GitHub
c-thiel commented on code in PR #615: URL: https://github.com/apache/iceberg-rust/pull/615#discussion_r1774975537 ## crates/iceberg/src/spec/schema.rs: ## @@ -86,6 +87,16 @@ impl SchemaBuilder { self } +/// Reassign all field-ids (nested) on build. +/// I

Re: [PR] feat: Reassign field ids for schema [iceberg-rust]

2024-09-25 Thread via GitHub
c-thiel commented on code in PR #615: URL: https://github.com/apache/iceberg-rust/pull/615#discussion_r1774983362 ## crates/iceberg/src/spec/schema.rs: ## @@ -105,7 +116,16 @@ impl SchemaBuilder { } /// Builds the schema. -pub fn build(self) -> Result { +pub

Re: [PR] feat: Reassign field ids for schema [iceberg-rust]

2024-09-25 Thread via GitHub
c-thiel commented on code in PR #615: URL: https://github.com/apache/iceberg-rust/pull/615#discussion_r1774977970 ## crates/iceberg/src/spec/schema.rs: ## @@ -943,6 +965,122 @@ impl SchemaVisitor for PruneColumn { } } +struct ReassignFieldIds { +next_field_id: i32, +

Re: [PR] feat: Reassign field ids for schema [iceberg-rust]

2024-09-24 Thread via GitHub
liurenjie1024 commented on code in PR #615: URL: https://github.com/apache/iceberg-rust/pull/615#discussion_r1774372777 ## crates/iceberg/src/spec/schema.rs: ## @@ -943,6 +965,122 @@ impl SchemaVisitor for PruneColumn { } } +struct ReassignFieldIds { +next_field_id:

Re: [PR] feat: Reassign field ids for schema [iceberg-rust]

2024-09-24 Thread via GitHub
liurenjie1024 commented on PR #615: URL: https://github.com/apache/iceberg-rust/pull/615#issuecomment-2372832599 > cc @liurenjie1024 would you like to take a look too? Thanks for pinging me, I'll take a review. -- This is an automated message from the Apache Git Service. To respond

Re: [PR] feat: Reassign field ids for schema [iceberg-rust]

2024-09-09 Thread via GitHub
Xuanwo commented on PR #615: URL: https://github.com/apache/iceberg-rust/pull/615#issuecomment-2339690333 cc @liurenjie1024 would you like to take a look too? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL abo

Re: [PR] feat: Reassign field ids for schema [iceberg-rust]

2024-09-09 Thread via GitHub
c-thiel commented on code in PR #615: URL: https://github.com/apache/iceberg-rust/pull/615#discussion_r1749940779 ## crates/iceberg/src/spec/schema.rs: ## @@ -86,6 +87,16 @@ impl SchemaBuilder { self } +/// Reassign all field-ids (nested) on build. +/// I

Re: [PR] feat: Reassign field ids for schema [iceberg-rust]

2024-09-08 Thread via GitHub
Fokko commented on code in PR #615: URL: https://github.com/apache/iceberg-rust/pull/615#discussion_r1749313279 ## crates/iceberg/src/spec/schema.rs: ## @@ -86,6 +87,16 @@ impl SchemaBuilder { self } +/// Reassign all field-ids (nested) on build. +/// If

[PR] Feat: Reassign field ids for schema [iceberg-rust]

2024-09-08 Thread via GitHub
c-thiel opened a new pull request, #615: URL: https://github.com/apache/iceberg-rust/pull/615 Required for `TableMetadataBuilder` (https://github.com/apache/iceberg-rust/pull/587). When new TableMetadata is created, field ids should be reassign to ensure that field numbering is norma