[
https://issues.apache.org/jira/browse/FLINK-9928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16556835#comment-16556835
]
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_r205314834
##########
File path:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/mathExpressions.scala
##########
@@ -92,6 +92,18 @@ case class Log10(child: Expression) extends UnaryExpression
with InputTypeSpec {
}
}
+case class Log2(child: Expression) extends UnaryExpression with InputTypeSpec {
+ override private[flink] def expectedTypes: Seq[TypeInformation[_]] =
DOUBLE_TYPE_INFO :: Nil
+
+ override private[flink] def resultType: TypeInformation[_] = DOUBLE_TYPE_INFO
+
+ override private[flink] def toRexNode(implicit relBuilder: RelBuilder) = {
+ relBuilder.call(ScalarSqlFunctions.LOG2, children.map(_.toRexNode))
Review comment:
`relBuilder.call(ScalarSqlFunctions.LOG2, child.toRexNode)`
----------------------------------------------------------------
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)