Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
c6cac030
Commit
c6cac030
authored
5 years ago
by
mayanknj
Committed by
nixonrodrigues
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3647: Fix System attribute search when IsIncomplete Attribute has 1,null as values.
Signed-off-by:
nixonrodrigues
<
nixon@apache.org
>
parent
6ecad6e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
SearchProcessor.java
...main/java/org/apache/atlas/discovery/SearchProcessor.java
+36
-2
No files found.
repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java
View file @
c6cac030
...
...
@@ -222,9 +222,43 @@ public abstract class SearchProcessor {
processSearchAttributes
(
structType
,
criteria
,
indexFiltered
,
graphFiltered
,
allAttributes
);
}
}
else
if
(
StringUtils
.
isNotEmpty
(
filterCriteria
.
getAttributeName
()))
{
try
{
String
attributeName
=
filterCriteria
.
getAttributeName
();
String
attributeName
=
filterCriteria
.
getAttributeName
();
if
(
StringUtils
.
equals
(
attributeName
,
Constants
.
IS_INCOMPLETE_PROPERTY_KEY
))
{
// when entity is incomplete (i.e. shell entity):
// vertex property IS_INCOMPLETE_PROPERTY_KEY will be set to INCOMPLETE_ENTITY_VALUE
// when entity is not incomplete (i.e. not a shell entity):
// vertex property IS_INCOMPLETE_PROPERTY_KEY will not be set
String
attributeValue
=
filterCriteria
.
getAttributeValue
();
switch
(
filterCriteria
.
getOperator
())
{
case
EQ:
if
(
attributeValue
==
null
||
StringUtils
.
equals
(
attributeValue
,
"0"
)
||
StringUtils
.
equalsIgnoreCase
(
attributeValue
,
"false"
))
{
filterCriteria
.
setOperator
(
SearchParameters
.
Operator
.
IS_NULL
);
}
else
{
filterCriteria
.
setOperator
(
SearchParameters
.
Operator
.
EQ
);
filterCriteria
.
setAttributeValue
(
Constants
.
INCOMPLETE_ENTITY_VALUE
.
toString
());
}
break
;
case
NEQ:
if
(
attributeValue
==
null
||
StringUtils
.
equals
(
attributeValue
,
"0"
)
||
StringUtils
.
equalsIgnoreCase
(
attributeValue
,
"false"
))
{
filterCriteria
.
setOperator
(
SearchParameters
.
Operator
.
EQ
);
filterCriteria
.
setAttributeValue
(
Constants
.
INCOMPLETE_ENTITY_VALUE
.
toString
());
}
else
{
filterCriteria
.
setOperator
(
SearchParameters
.
Operator
.
IS_NULL
);
}
break
;
case
NOT_NULL:
filterCriteria
.
setOperator
(
SearchParameters
.
Operator
.
EQ
);
filterCriteria
.
setAttributeValue
(
Constants
.
INCOMPLETE_ENTITY_VALUE
.
toString
());
break
;
}
}
try
{
if
(
isIndexSearchable
(
filterCriteria
,
structType
))
{
indexFiltered
.
add
(
attributeName
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment