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

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

GitHub user wuchong opened a pull request:

    https://github.com/apache/flink/pull/2173

    [FLINK-4109] [tableAPI] Change the name of ternary condition operator

    It's better to use "?" than "eval()" for ternary condition operator in 
Table API since most people comming from Java/C/C++ know what it does. However, 
"eval()" is ambiguous.
    
    The condition operator looks like this now:
    
    ```
    (42 > 5).?("A", "B")
    (42 > 5) ? ("A", "B")
    ```
    
    The document has been updated too. 
    
    As it is a public API, I hope it can be reviewed soon and merged before 
release.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/wuchong/flink FLINK-4109

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2173.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2173
    
----
commit 8c689ccf269e706895e26e8eb3638e226d2c783b
Author: Jark Wu <[email protected]>
Date:   2016-06-28T04:37:12Z

    [FLINK-4109] [tableAPI] Change the name of ternary condition operator 
'eval' to '?'

----


> Change the name of ternary condition operator  'eval' to  '?'  
> ---------------------------------------------------------------
>
>                 Key: FLINK-4109
>                 URL: https://issues.apache.org/jira/browse/FLINK-4109
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>    Affects Versions: 1.1.0
>            Reporter: Jark Wu
>            Assignee: Jark Wu
>             Fix For: 1.1.0
>
>
> The ternary condition operator in Table API is named {{eval}}, for example: 
> {{(42 > 5).eval("A", "B")}} leads to "A".  IMO, the eval function is not well 
> understood. Instead the "?" is a better choice I think, which is used in Java 
> for condition operator. 
> It will be clearer and more literal understood, e.g.
> {{(42 > 5).?("A", "B")}} or {{(42 > 5) ? ("A", "B")}}
> If it make sense, I will pull a request.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to