You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@s2graph.apache.org by "Daewon Jeong (JIRA)" <ji...@apache.org> on 2018/06/15 02:18:00 UTC

[jira] [Commented] (S2GRAPH-222) Support Not logical operator in WhereParser.

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

Daewon Jeong commented on S2GRAPH-222:
--------------------------------------

[~steamshon] I'm interested in the issue.
Is it okay to assign this issue to me?

> Support Not logical operator in  WhereParser.
> ---------------------------------------------
>
>                 Key: S2GRAPH-222
>                 URL: https://issues.apache.org/jira/browse/S2GRAPH-222
>             Project: S2Graph
>          Issue Type: New Feature
>          Components: s2core
>            Reporter: DOYUNG YOON
>            Assignee: DOYUNG YOON
>            Priority: Minor
>
> `And/Or` operator is implemented as a logical operator, but `Not` is not implemented in WhereParser.
> This is illustrated by following examples.
> Following query works only because we added hardcoded implementation on `not in` as predicates.
> {noformat}
> query {
>   s2graph { 
>     User(id: 1) {
>       id
>       Friends(limit: 10, filter: "friend_name not in ('steamshon')") {
>         User { 
>           id
>         }
>       }
>     }
>   }
> }
> {noformat}
> I believe implementing `Not` as a logical operator is more general, so below is my suggestion.
> {noformat}
> query {
>   s2graph { 
>     User(id: 1) {
>       id
>       Friends(limit: 10, filter: "NOT (friend_name in ('steamshon'))") {
>         User { 
>           id
>         }
>       }
>     }
>   }
> }
> {noformat}
> In this way, we don't need to implement not case for all predicates, such as `in`, `between`, `contains`, `eq`.



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