danielcweeks commented on code in PR #18252:
URL: https://github.com/apache/iceberg/pull/18252#discussion_r4540074185
##########
api/src/main/java/org/apache/iceberg/types/TypeUtil.java:
##########
@@ -753,6 +817,15 @@ public T variant(Types.VariantType variant) {
throw new UnsupportedOperationException("Unsupported type: variant");
}
+ /**
+ * Handles a file type, by default as the struct of its nested fields.
+ *
+ * <p>Override this to distinguish a file from a struct.
Review Comment:
Isn't this an issue though? We're saying we want to distinguish from a
struct, but we're actually returning it in a way that all visitors will just
navigate it by default like a struct. Shouldn't we throw like we do in variant?
This just feels problematic since all visitors need to know ahead of time
how to handle this as opposed to needing to override to get the correct
behavior.
--
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]