You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by am...@apache.org on 2019/08/19 20:24:25 UTC

[atlas] branch master updated: ATLAS-3379: Relationship API inadvertently uses getQualifiedName.

This is an automated email from the ASF dual-hosted git repository.

amestry 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 8c136a8  ATLAS-3379: Relationship API inadvertently uses getQualifiedName.
8c136a8 is described below

commit 8c136a86fc125672e054bc5bcfdd65f8230ae07c
Author: Ashutosh Mestry <am...@hortonworks.com>
AuthorDate: Mon Aug 19 12:21:34 2019 -0700

    ATLAS-3379: Relationship API inadvertently uses getQualifiedName.
---
 .../java/org/apache/atlas/discovery/EntityDiscoveryService.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java b/repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
index c67e347..f667aa3 100644
--- a/repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
+++ b/repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
@@ -77,6 +77,7 @@ import static org.apache.atlas.util.AtlasGremlinQueryProvider.AtlasGremlinQuery.
 public class EntityDiscoveryService implements AtlasDiscoveryService {
     private static final Logger LOG = LoggerFactory.getLogger(EntityDiscoveryService.class);
     private static final String DEFAULT_SORT_ATTRIBUTE_NAME = "name";
+    private static final String SORT_ATTRIBUTE_NAME = "sortAttributeName";
 
     private final AtlasGraph                      graph;
     private final EntityGraphRetriever            entityRetriever;
@@ -594,7 +595,7 @@ public class EntityDiscoveryService implements AtlasDiscoveryService {
             sortByAttributeName = null;
             sortOrder           = null;
         } else {
-            sortByAttributeName = sortByAttribute.getQualifiedName();
+            sortByAttributeName = sortByAttribute.getVertexPropertyName();
 
             if (sortOrder == null) {
                 sortOrder = ASCENDING;
@@ -613,11 +614,11 @@ public class EntityDiscoveryService implements AtlasDiscoveryService {
 
         if (sortOrder == ASCENDING) {
             relatedEntitiesQuery += gremlinQueryProvider.getQuery(RELATIONSHIP_SEARCH_ASCENDING_SORT);
-            bindings.put("sortAttributeName", sortByAttributeName);
+            bindings.put(SORT_ATTRIBUTE_NAME, sortByAttributeName);
 
         } else if (sortOrder == DESCENDING) {
             relatedEntitiesQuery += gremlinQueryProvider.getQuery(RELATIONSHIP_SEARCH_DESCENDING_SORT);
-            bindings.put("sortAttributeName", sortByAttributeName);
+            bindings.put(SORT_ATTRIBUTE_NAME, sortByAttributeName);
         }
 
         relatedEntitiesQuery += gremlinQueryProvider.getQuery(TO_RANGE_LIST);