This is an automated email from the ASF dual-hosted git repository.
sarath pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 83aa1f4 ATLAS-4211: DSL Search: Regression: When fetching string
attribute with null value returns null , earlier versions returned empty
83aa1f4 is described below
commit 83aa1f45b9aebea50c9e6c0847d16a821978ddd5
Author: Pinal <pinal-shah>
AuthorDate: Tue Mar 16 21:54:54 2021 +0530
ATLAS-4211: DSL Search: Regression: When fetching string attribute with
null value returns null , earlier versions returned empty
Signed-off-by: Sarath Subramanian <[email protected]>
---
.../org/apache/atlas/query/executors/SelectClauseProjections.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/repository/src/main/java/org/apache/atlas/query/executors/SelectClauseProjections.java
b/repository/src/main/java/org/apache/atlas/query/executors/SelectClauseProjections.java
index 7018c15..8305477 100644
---
a/repository/src/main/java/org/apache/atlas/query/executors/SelectClauseProjections.java
+++
b/repository/src/main/java/org/apache/atlas/query/executors/SelectClauseProjections.java
@@ -24,6 +24,7 @@ import org.apache.atlas.query.GremlinQuery;
import org.apache.atlas.query.SelectClauseComposer;
import org.apache.atlas.repository.graphdb.AtlasVertex;
import org.apache.atlas.repository.store.graph.v2.EntityGraphRetriever;
+import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -130,8 +131,8 @@ public class SelectClauseProjections {
} else {
if (selectClauseComposer.isPrimitiveAttribute(idx)) {
String propertyName =
selectClauseComposer.getAttribute(idx);
-
- row.add(vertex.getProperty(propertyName,
Object.class));
+ Object value = vertex.getProperty(propertyName,
Object.class);
+ row.add(value != null ? value : StringUtils.EMPTY);
} else {
row.add(entityRetriever.toAtlasEntityHeaderWithClassifications(vertex));
}