[ 
https://issues.apache.org/jira/browse/FLINK-6891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

sunjincheng updated FLINK-6891:
-------------------------------
    Description: 
LOG(X), LOG(B,X)

If called with one parameter, this function returns the natural logarithm of X. 
If X is less than or equal to 0.0E0, the function returns NULL and (as of MySQL 
5.7.4) a warning “Invalid argument for logarithm” is reported.
The inverse of this function (when called with a single argument) is the EXP() 
function.

If called with two parameters, this function returns the logarithm of X to the 
base B. If X is less than or equal to 0, or if B is less than or equal to 1, 
then NULL is returned.
* Example:
 LOG(2) -> 0.69314718055995
 LOG(-2) -> NULL
 LOG(2,65536) -> 16
 LOG(10,100) -> 2
 LOG(1,100) -> NULL

* See more:
** [MySQL| 
https://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_log]



  was:
LONG (N) A single parameter version of the function returns the natural 
logarithm of N, and if two arguments are called, it returns any radix of the 
logarithm of N. 
* Syntax:
LOG ( float_expression [, base ] )  

* Arguments
**float_expression:  Is an expression of type float or of a type that can be 
implicitly converted to float.
**base: Optional integer argument that sets the base for the logarithm.

* Return Types
  float

* Example:
  LOG(10) -> 2.30

* See more:
** [MSQL|https://docs.microsoft.com/en-us/sql/t-sql/functions/log-transact-sql]
** [MySQL| 
https://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_log]




> Add LOG supported in SQL
> ------------------------
>
>                 Key: FLINK-6891
>                 URL: https://issues.apache.org/jira/browse/FLINK-6891
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>    Affects Versions: 1.4.0
>            Reporter: sunjincheng
>            Assignee: sunjincheng
>
> LOG(X), LOG(B,X)
> If called with one parameter, this function returns the natural logarithm of 
> X. If X is less than or equal to 0.0E0, the function returns NULL and (as of 
> MySQL 5.7.4) a warning “Invalid argument for logarithm” is reported.
> The inverse of this function (when called with a single argument) is the 
> EXP() function.
> If called with two parameters, this function returns the logarithm of X to 
> the base B. If X is less than or equal to 0, or if B is less than or equal to 
> 1, then NULL is returned.
> * Example:
>  LOG(2) -> 0.69314718055995
>  LOG(-2) -> NULL
>  LOG(2,65536) -> 16
>  LOG(10,100) -> 2
>  LOG(1,100) -> NULL
> * See more:
> ** [MySQL| 
> https://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_log]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to