[ 
https://issues.apache.org/jira/browse/FLINK-9928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16556834#comment-16556834
 ] 

ASF GitHub Bot commented on FLINK-9928:
---------------------------------------

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:
[email protected]


> Add LOG2 function for table/sql API
> -----------------------------------
>
>                 Key: FLINK-9928
>                 URL: https://issues.apache.org/jira/browse/FLINK-9928
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: vinoyang
>            Assignee: vinoyang
>            Priority: Minor
>              Labels: pull-request-available
>
> refer to : 
> https://dev.mysql.com/doc/refman/8.0/en/mathematical-functions.html#function_log2



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to