-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62679/#review186674
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/util/SearchPredicateUtil.java
Lines 563 (patched)
<https://reviews.apache.org/r/62679/#comment263469>

    For IS_NULL and IS_NOT_NULL operators, the given 'attrVal' should be 
ignored - as they are unary operators. The result should be based on the value 
read from vertex attribute - like:
    
        if (attrName == null || attrClass == null) {
            ret = ALWAYS_FALSE;
        } else {
            ret = new VertexAttributePredicate(attrName, attrClass, true) {
                @Override
                protected boolean compareValue(final Object value) {
                    return value == null;
                }
            };
        }


- Madhan Neethiraj


On Sept. 29, 2017, 2:05 p.m., Apoorv Naik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62679/
> -----------------------------------------------------------
> 
> (Updated Sept. 29, 2017, 2:05 p.m.)
> 
> 
> Review request for atlas and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-2184
>     https://issues.apache.org/jira/browse/ATLAS-2184
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Search parameters in basic search now include is_null, not_null operators 
> which can prove useful in scenarios where user is interested in checking the 
> presence/absence of certain entity attributes
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java 
> a7a71b78 
>   repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
> b380e1e4 
>   repository/src/main/java/org/apache/atlas/util/SearchPredicateUtil.java 
> 18d77ee7 
> 
> 
> Diff: https://reviews.apache.org/r/62679/diff/2/
> 
> 
> Testing
> -------
> 
> Tested using various combinations of attributes and IS_NULL/NOT_NULL operator 
> via REST client/ curl
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>

Reply via email to