leonardBang commented on a change in pull request #16020:
URL: https://github.com/apache/flink/pull/16020#discussion_r671707964



##########
File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java
##########
@@ -283,6 +283,26 @@
                     
.outputTypeStrategy(nullable(explicit(DataTypes.BOOLEAN())))
                     .build();
 
+    public static final BuiltInFunctionDefinition GREATEST =
+            BuiltInFunctionDefinition.newBuilder()
+                    .name("greatest")
+                    .kind(SCALAR)
+                    .inputTypeStrategy(
+                            comparable(ConstantArgumentCount.from(1), 
StructuredComparision.FULL))
+                    .outputTypeStrategy(nullable(TypeStrategies.COMMON))

Review comment:
       IIUC, ` nullable(TypeStrategy initialStrategy)` has done for this? 
   ```
     /**
        * A type strategy that can be used to make a result type nullable if 
any of the input arguments
        * is nullable. Otherwise the type will be not null.
        */
       public static TypeStrategy nullable(TypeStrategy initialStrategy) {
           return nullable(ConstantArgumentCount.any(), initialStrategy);
       }
   ```




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