RyanSkraba commented on a change in pull request #1097:
URL: https://github.com/apache/avro/pull/1097#discussion_r612380027
##########
File path: lang/java/avro/src/main/java/org/apache/avro/LogicalType.java
##########
@@ -89,4 +91,36 @@ public void validate(Schema schema) {
}
}
+ /**
+ * Utility function to resolve the logical type from the given Schema
+ *
+ * @param schema a Schema representing a logical type
+ * @return the logical type represented by the schema, or null if the schema
+ * doesn't represent a logical type, or if the logical type is
ambiguous
+ */
+ public static LogicalType resolveLogicalType(Schema schema) {
Review comment:
There's some utility methods
[here](https://github.com/apache/avro/blob/ccbbb8353fcc168563c567580cb773d5fe442704/lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java#L64)
for example. Perhaps this would be appropriately grouped with them, with a
name like `fromSchemaIncludingNullable`?
--
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]