stevenzwu commented on code in PR #11868:
URL: https://github.com/apache/iceberg/pull/11868#discussion_r2178355208
##########
api/src/main/java/org/apache/iceberg/PartitionSpec.java:
##########
@@ -132,6 +132,12 @@ public StructType partitionType() {
for (PartitionField field : fields) {
Type sourceType = schema.findType(field.sourceId());
Type resultType = field.transform().getResultType(sourceType);
+
+ // When the source field has been dropped we cannot determine the
type
+ if (resultType == null) {
Review Comment:
@Fokko actually should the `if` condition be `if (sourceType == null)`?
`getResultType` doesn't return null. e.g. `Bucket` transform
```
public Type getResultType(Type sourceType) {
return Types.IntegerType.get();
}
```
--
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]