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

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

Github user snuyanzin commented on the issue:

    https://github.com/apache/flink/pull/6223
  
    @fhueske @hequn8128 @yanghua thank you very much for your review and 
comments
    I did almost all the corrections except one related to atan2 description
    So I have a question:
    as @hequn8128 wrote
    > I checked the [wiki](https://en.wikipedia.org/wiki/Atan2) about atan2, it 
said: The atan2 function calculates one unique arc tangent value from two 
variables y and x. So, would it be better of two variables? atan2(y,x) can be 
the arc tangent of (x,y) or (nx, ny).
    
    At the same time I checked [Calcite's 
definition](https://calcite.apache.org/docs/reference.html) of it: 
_ATAN2(numeric, numeric) | Returns the arc tangent of the numeric coordinates._ 
    What do you think what is more suitable?


> ATAN2 Sql Function support
> --------------------------
>
>                 Key: FLINK-9688
>                 URL: https://issues.apache.org/jira/browse/FLINK-9688
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: Sergey Nuyanzin
>            Assignee: Sergey Nuyanzin
>            Priority: Minor
>              Labels: pull-request-available
>
> simple query fails {code}
> ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
> BatchTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env, 
> config());
> DataSet<Tuple3<Integer, Long, String>> ds = 
> CollectionDataSets.get3TupleDataSet(env);
> tableEnv.registerDataSet("t1", ds, "x, y, z");
> String sqlQuery = "SELECT atan2(1,2)";
> Table result = tableEnv.sqlQuery(sqlQuery);
> {code}
> while at the same time Calcite supports it and in Calcite's sqlline it works 
> like {noformat}
> 0: jdbc:calcite:model=target/test-classes/mod> select atan2(1,2);
> +-----------------+
> |     EXPR$0      |
> +-----------------+
> | 0.4636476090008061 |
> +-----------------+
> 1 row selected (0.173 seconds)
> {noformat}



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

Reply via email to