lsyldliu commented on code in PR #21608:
URL: https://github.com/apache/flink/pull/21608#discussion_r1068898283


##########
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/module/hive/HiveModule.java:
##########
@@ -178,4 +182,19 @@ public Optional<FunctionDefinition> 
getFunctionDefinition(String name) {
     public String getHiveVersion() {
         return hiveVersion;
     }
+
+    private Optional<FunctionDefinition> getFlinkBuiltInFunction(

Review Comment:
   ```suggestion
       private Optional<FunctionDefinition> getBuiltInNativeAggFunction(
   ```



##########
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/module/hive/HiveModule.java:
##########
@@ -178,4 +182,19 @@ public Optional<FunctionDefinition> 
getFunctionDefinition(String name) {
     public String getHiveVersion() {
         return hiveVersion;
     }
+
+    private Optional<FunctionDefinition> getFlinkBuiltInFunction(
+            String name, FunctionDefinitionFactory.Context context) {
+        switch (name) {
+            case "sum":
+                // We override Hive's sum function by native implementation to 
supports hash-agg
+                return Optional.of(new HiveSumAggFunction());
+            case "min":
+                // We override Hive's min function by native implementation to 
supports hash-agg
+                return Optional.of(new HiveMinAggFunction());
+            default:
+                throw new UnsupportedOperationException(
+                        "flink built-in hive function not support " + name + " 
yet!");

Review Comment:
   ```suggestion
                           String.format("Built-in hive aggregate function 
doesn't support %s yet!", name);
   ```



##########
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/module/hive/HiveModule.java:
##########
@@ -81,6 +82,9 @@ public class HiveModule implements Module {
                                     "tumble_rowtime",
                                     "tumble_start")));
 
+    static final Set<String> FLINK_BUILT_IN_FUNC_FOR_HIVE =

Review Comment:
   ```suggestion
       static final Set<String> BUILTIN_NATIVE_AGG_FUNC =
   ```



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