laraschmidt commented on a change in pull request #16875:
URL: https://github.com/apache/beam/pull/16875#discussion_r813430056
##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/Schema.java
##########
@@ -579,6 +579,16 @@ public boolean isSupertypeOf(TypeName other) {
/** Convert the Java type used by the base {@link FieldType} to the input
type. */
@NonNull
InputT toInputType(@NonNull BaseT base);
+
+ /** Convert the Java type used by the base {@link FieldType} to the input
type. */
+ default BaseT toBaseTypeGeneric(Object input) {
+ return toBaseType((InputT) input);
+ }
+
+ /** Convert the Java type used by the base {@link FieldType} to the input
type. */
+ default InputT toInputTypeGeneric(Object base) {
+ return toInputType((BaseT) base);
+ }
Review comment:
Got something working.
--
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]