dawidwys commented on a change in pull request #10960: [FLINK-15487][table]
Update code generation for new type inference
URL: https://github.com/apache/flink/pull/10960#discussion_r373534145
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/CodeGenUtils.scala
##########
@@ -118,6 +119,17 @@ object CodeGenUtils {
*/
def className[T](implicit m: Manifest[T]): String =
m.runtimeClass.getCanonicalName
+ /**
+ * Returns a term for representing the given class in Java code.
+ */
+ def typeTerm(clazz: Class[_]): String = {
Review comment:
Hmm, I am also in favor of @JingsongLi suggestion. As per the javadoc of
`getCanonicalName` I think if it gives us null, we cannot use the term anyway.
We could add a check here that throws exception that given class does not
have a canonical representation and thus we cannot use it for code generation.
----------------------------------------------------------------
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]
With regards,
Apache Git Services