jbonofre commented on code in PR #12897:
URL: https://github.com/apache/iceberg/pull/12897#discussion_r2060214278
##########
api/src/main/java/org/apache/iceberg/PartitionSpec.java:
##########
@@ -601,17 +601,26 @@ public Builder alwaysNull(String sourceName) {
// add a partition field with an auto-increment partition field id
starting from
// PARTITION_DATA_ID_START
+ Builder add(List<Integer> sourceIds, String name, Transform<?, ?>
transform) {
+ return add(sourceIds, nextFieldId(), name, transform);
+ }
+
Builder add(int sourceId, String name, Transform<?, ?> transform) {
- return add(sourceId, nextFieldId(), name, transform);
+ return add(List.of(sourceId), name, transform);
}
- Builder add(int sourceId, int fieldId, String name, Transform<?, ?>
transform) {
- checkAndAddPartitionName(name, sourceId);
- fields.add(new PartitionField(sourceId, fieldId, name, transform));
+ Builder add(List<Integer> sourceIds, int fieldId, String name,
Transform<?, ?> transform) {
+ // we use the first entry in the source-ids list here
+ checkAndAddPartitionName(name, sourceIds.get(0));
Review Comment:
For now, I'm using the first element. I can update
`checkAndAddPartitionName` to consider all elements in source ids.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]