snuyanzin commented on code in PR #19873:
URL: https://github.com/apache/flink/pull/19873#discussion_r1153851661


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java:
##########
@@ -178,6 +179,35 @@ ANY, and(logical(LogicalTypeRoot.BOOLEAN), LITERAL)
                     .runtimeClass(
                             
"org.apache.flink.table.runtime.functions.scalar.ArrayDistinctFunction")
                     .build();
+
+    public static final BuiltInFunctionDefinition ARRAY_APPEND =
+            BuiltInFunctionDefinition.newBuilder()
+                    .name("ARRAY_APPEND")
+                    .kind(SCALAR)
+                    .inputTypeStrategy(
+                            sequence(
+                                    Arrays.asList("haystack", "element"),
+                                    Arrays.asList(
+                                            logical(LogicalTypeRoot.ARRAY), 
ARRAY_ELEMENT_ARG)))
+                    .outputTypeStrategy(nullableIfArgs(argument(0)))
+                    .runtimeClass(
+                            
"org.apache.flink.table.runtime.functions.scalar.ArrayAppendFunction")
+                    .build();

Review Comment:
   ok, postgres and spark does this, then could be done  in Flink as well



##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java:
##########
@@ -178,6 +179,35 @@ ANY, and(logical(LogicalTypeRoot.BOOLEAN), LITERAL)
                     .runtimeClass(
                             
"org.apache.flink.table.runtime.functions.scalar.ArrayDistinctFunction")
                     .build();
+
+    public static final BuiltInFunctionDefinition ARRAY_APPEND =
+            BuiltInFunctionDefinition.newBuilder()
+                    .name("ARRAY_APPEND")
+                    .kind(SCALAR)
+                    .inputTypeStrategy(
+                            sequence(
+                                    Arrays.asList("haystack", "element"),
+                                    Arrays.asList(
+                                            logical(LogicalTypeRoot.ARRAY), 
ARRAY_ELEMENT_ARG)))
+                    .outputTypeStrategy(nullableIfArgs(argument(0)))
+                    .runtimeClass(
+                            
"org.apache.flink.table.runtime.functions.scalar.ArrayAppendFunction")
+                    .build();

Review Comment:
   ok, postgres and spark do this, then could be done  in Flink as well



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