You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/07/26 03:21:54 UTC

[GitHub] xccui commented on a change in pull request #6404: [FLINK-9928] Add LOG2 function for table/sql API

xccui commented on a change in pull request #6404: [FLINK-9928] Add LOG2 function for table/sql API
URL: https://github.com/apache/flink/pull/6404#discussion_r205319343
 
 

 ##########
 File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/sql/ScalarSqlFunctions.scala
 ##########
 @@ -67,6 +67,15 @@ object ScalarSqlFunctions {
       OperandTypes.family(SqlTypeFamily.NUMERIC, SqlTypeFamily.NUMERIC)),
     SqlFunctionCategory.NUMERIC)
 
+  val LOG2 = new SqlFunction(
+    "LOG2",
+    SqlKind.OTHER_FUNCTION,
+    ReturnTypes.DOUBLE_NULLABLE,
+    null,
+    OperandTypes.or(OperandTypes.NUMERIC, OperandTypes.family(SqlTypeFamily.NUMERIC)),
 
 Review comment:
   The `OperandTypes.NUMERIC` and `OperandTypes.family(SqlTypeFamily.NUMERIC)` are equivalent. Just use `OperandTypes.NUMERIC` here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services