AlanConfluent commented on code in PR #23975: URL: https://github.com/apache/flink/pull/23975#discussion_r1451023480
########## flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/extraction/ExtractionUtils.java: ########## @@ -348,6 +350,53 @@ public static Optional<Class<?>> extractSimpleGeneric( } } + /** Resolves a variable type while accepting a context for resolution. */ + public static Type resolveVariableWithClassContext(@Nullable Type contextType, Type type) { + final List<Type> typeHierarchy; + if (contextType != null) { + typeHierarchy = collectTypeHierarchy(contextType); + } else { + typeHierarchy = Collections.emptyList(); + } + if (!containsTypeVariable(type)) { Review Comment: I did exclude that intentionally. I don't think it would be easy to call back on the future with a concrete type even if such a `CompletableFuture<? extends Number>` were a parameter since I think this is a compile time error. I tried some examples of weird method overriding to allow calling back on that future and got one that worked, but it's awkward (and throws a reasonable error when you run it anyhow). Will add a comment in containsTypeVariable about not supporting wildcards. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org