rdblue commented on a change in pull request #922:
URL: https://github.com/apache/iceberg/pull/922#discussion_r450352736
##########
File path: api/src/test/java/org/apache/iceberg/TestPartitionSpecValidation.java
##########
@@ -38,6 +38,9 @@
public void testMultipleTimestampPartitions() {
AssertHelpers.assertThrows("Should not allow year(ts) and year(ts)",
IllegalArgumentException.class, "Cannot use partition name more than
once",
+ () -> PartitionSpec.builderFor(SCHEMA).year("ts",
"year").year("another_ts", "year").build());
Review comment:
The context, `Should not allow year(ts) and year(ts)` isn't correct
because the call uses two different source columns, `ts` and `another_ts`. It
should be `Should not allow partition fields with the same name`.
And since this is passing in the partition name, you can change it to avoid
hitting the wrong error case. You could move this to a new test for name
collisions, and update this to avoid the name collision by removing the
explicit partition field name.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]