flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Shoshin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2118) Table API fails on composite filter conditions
Date Fri, 21 Oct 2016 13:05:58 GMT

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

Alexander Shoshin commented on FLINK-2118:
------------------------------------------

I agree with [~RenkaiGe].

{{'name \!== "Pete" && 'name \!== "Bob"}} expression will not work correctly without
brackets because scala marks {{\!==}} as assignment operator which has the lowest compare
to other operators precedence.

At the moment scala hasn't an opportunity to set the infix operations presedence manualy.
The only way is to change {{\!==}} to something like {{<>}} or {{=\!=}} as written in
previous comment but it might become not so intuitive. Moreover that will change the public
API which is not a good idea.

Shouldn't we close this issue?

> Table API fails on composite filter conditions
> ----------------------------------------------
>
>                 Key: FLINK-2118
>                 URL: https://issues.apache.org/jira/browse/FLINK-2118
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>    Affects Versions: 0.9
>            Reporter: Fabian Hueske
>            Assignee: Alexander Shoshin
>
> Having a composite filter conditions such as 
> {code}
> myTable.filter('name !== "Pete" && 'name !== "Bob")
> {code}
> fails with the following error message:
> {code}
> ExpressionException: Non-boolean operand types String and String in Pete && 'name
> {code}
> whereas 
> {code}
> myTable.filter( ('name !== "Pete") && ('name !== "Bob") )
> {code}
> works.



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

Mime
View raw message