luoyuxia commented on code in PR #19182:
URL: https://github.com/apache/flink/pull/19182#discussion_r877711250


##########
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/planner/delegation/hive/copy/HiveParserSqlFunctionConverter.java:
##########
@@ -415,24 +425,73 @@ public static SqlOperator getCalciteFn(
                                 OperandTypes.PLUS_OPERATOR);
                 break;
             default:
-                calciteOp = HIVE_TO_CALCITE.get(hiveUdfName);
-                if (null == calciteOp) {
-                    calciteOp =
-                            new CalciteSqlFn(
-                                    uInf.udfName,
-                                    uInf.identifier,
-                                    SqlKind.OTHER_FUNCTION,
-                                    uInf.returnTypeInference,
-                                    uInf.operandTypeInference,
-                                    uInf.operandTypeChecker,
-                                    SqlFunctionCategory.USER_DEFINED_FUNCTION,
-                                    deterministic);
+                // some functions should be handled as Hive UDF for
+                // the Hive specific logic
+                if (shouldHandleAsHiveUDF(uInf) && canHandledAsHiveUDF(uInf, 
functionConverter)) {
+                    calciteOp = asCalciteSqlFn(uInf, deterministic);
+                } else {
+                    calciteOp = HIVE_TO_CALCITE.get(hiveUdfName);

Review Comment:
   But about the comments, I think it's fine to not to change it for some some 
comments in this file are started with a capital letter and some are not.



-- 
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]

Reply via email to