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


##########
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/planner/delegation/hive/HiveParserUtils.java:
##########
@@ -641,6 +644,62 @@ public static GenericUDAFEvaluator getGenericUDAFEvaluator(
         return result;
     }
 
+    public static boolean isBridgingSqlFunction(SqlOperator sqlOperator) {
+        if (sqlOperator != null) {
+            Class<?> clazz = 
HiveReflectionUtils.tryGetClass(BRIDGING_SQL_FUNCTION_CLZ_NAME);
+            if (clazz == null) {
+                throw new FlinkHiveException(
+                        String.format(
+                                "Fail to get class %s for the class can't be 
found.",
+                                BRIDGING_SQL_FUNCTION_CLZ_NAME));
+            }
+            return clazz.isInstance(sqlOperator);
+        }
+        return false;
+    }
+
+    private static boolean isBridgingSqlAggFunction(SqlOperator sqlOperator) {
+        if (sqlOperator != null) {
+            Class<?> clazz = 
HiveReflectionUtils.tryGetClass(bridgingSqlAggFunctionClzName);
+            if (clazz == null) {
+                throw new FlinkHiveException(
+                        String.format(
+                                "Fail to get class %s for the class can't be 
found",
+                                bridgingSqlAggFunctionClzName));
+            }
+            return clazz.isInstance(sqlOperator);
+        }
+        return false;
+    }
+
+    private static FunctionDefinition 
getBridgingSqlFunctionDefinition(SqlOperator sqlOperator) {

Review Comment:
   Good suggestion.



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