You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "nbdevos25 (via GitHub)" <gi...@apache.org> on 2025/10/27 20:21:21 UTC
[PR] Add unit test for duplicate ID in schema [iceberg]
nbdevos25 opened a new pull request, #14429:
URL: https://github.com/apache/iceberg/pull/14429
Add unit test for duplicate ID in schema
- No code change
- Added missing unit test for duplicate ID in schema
- Java already handles https://github.com/apache/iceberg-go/issues/593. I will publish a PR to fix the issue in iceberg-go repo
--
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] Add unit test for duplicate ID in schema [iceberg]
Posted by "nbdevos25 (via GitHub)" <gi...@apache.org>.
nbdevos25 closed pull request #14429: Add unit test for duplicate ID in schema
URL: https://github.com/apache/iceberg/pull/14429
--
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] Add unit test for duplicate ID in schema [iceberg]
Posted by "ebyhr (via GitHub)" <gi...@apache.org>.
ebyhr commented on code in PR #14429:
URL: https://github.com/apache/iceberg/pull/14429#discussion_r2467602689
##########
api/src/test/java/org/apache/iceberg/TestSchema.java:
##########
@@ -120,6 +138,13 @@ public void testUnsupportedTypes(Type type, int unsupportedVersion) {
MIN_FORMAT_VERSIONS.get(type.typeId()));
}
+ @Test
+ public void testDuplicateIDs() {
+ assertThatThrownBy(() -> Schema.checkCompatibility(generateTypeSchemaDuplicateID(), 2))
Review Comment:
The exception happens in `generateTypeSchemaDuplicateID`, not in `checkCompatibility`, right? This test seems a bit misleading since the outer method is redundant.
Also, we already have `TestNameMapping#testFailsDuplicateId` to test duplicate ID from `Schema` constructor.
--
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] Add unit test for duplicate ID in schema [iceberg]
Posted by "nbdevos25 (via GitHub)" <gi...@apache.org>.
nbdevos25 commented on code in PR #14429:
URL: https://github.com/apache/iceberg/pull/14429#discussion_r2467774610
##########
api/src/test/java/org/apache/iceberg/TestSchema.java:
##########
@@ -120,6 +138,13 @@ public void testUnsupportedTypes(Type type, int unsupportedVersion) {
MIN_FORMAT_VERSIONS.get(type.typeId()));
}
+ @Test
+ public void testDuplicateIDs() {
+ assertThatThrownBy(() -> Schema.checkCompatibility(generateTypeSchemaDuplicateID(), 2))
Review Comment:
thx. closing the PR
--
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