lirui-apache commented on a change in pull request #14534:
URL: https://github.com/apache/flink/pull/14534#discussion_r551103643
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
##########
@@ -1375,23 +1367,19 @@ public boolean functionExists(ObjectPath functionPath)
throws CatalogException {
private static Function instantiateHiveFunction(
ObjectPath functionPath, CatalogFunction function) {
-
- boolean isGeneric = function.isGeneric();
-
// Hive Function does not have properties map
- // thus, use a prefix in class name to distinguish Flink and Hive
functions
+ // thus, use a prefix in class name to distinguish Java/Scala and
Python functions
String functionClassName;
- if (function.getFunctionLanguage().equals(FunctionLanguage.JAVA)) {
- functionClassName =
- isGeneric
- ? FLINK_FUNCTION_PREFIX + function.getClassName()
- : function.getClassName();
+ if (function.getFunctionLanguage() == FunctionLanguage.JAVA) {
+ functionClassName = function.getClassName();
+ } else if (function.getFunctionLanguage() == FunctionLanguage.SCALA) {
Review comment:
Yes, and we should. I'll change all of them to `==` since we're
comparing enum values.
----------------------------------------------------------------
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]