Madhan Neethiraj created RANGER-4571:
----------------------------------------

             Summary: update handling of expressions that return null
                 Key: RANGER-4571
                 URL: https://issues.apache.org/jira/browse/RANGER-4571
             Project: Ranger
          Issue Type: Improvement
          Components: plugins
            Reporter: Madhan Neethiraj
            Assignee: Madhan Neethiraj


Expressions used in policy-conditions/row-filters might evaluate to null value 
i.e., like when the attribute referenced doesn't exist. In such cases, the 
evaluator returns string 'null'. Instead, an empty string would be a better 
return value in such case. This would also enable use of variables in 
sub-expressions, like:

 
{code:java}
${{var d = USER.deptCode;}} dept == ${{d}}
{code}
 

With the current implementation, following value is returned for above 
expression, assuming USER.deptCode is 10:

 
{code:java}
null dept == 10
{code}
This is caused by the first expression, {{{}${\{var d = USER.deptCode}}{}}}, 
returning {{{}null{}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to