Commit 71e0e09b by Shwetha GS

ATLAS-1155 Errors in Eclipse when I bring in the latest code (davidrad via shwethags)

parent c1081a49
...@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al ...@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai) ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES: ALL CHANGES:
ATLAS-1155 Errors in Eclipse when I bring in the latest code (davidrad via shwethags)
ATLAS-1098 Atlas allows creation of tag with name "isa" which causes exceptions during search (apoorvnaik via shwethags) ATLAS-1098 Atlas allows creation of tag with name "isa" which causes exceptions during search (apoorvnaik via shwethags)
ATLAS-1142 Lineage UI Improvement (kevalbhatt via shwethags) ATLAS-1142 Lineage UI Improvement (kevalbhatt via shwethags)
ATLAS-712 Support getTrait() API (svimal2106 via shwethags) ATLAS-712 Support getTrait() API (svimal2106 via shwethags)
......
...@@ -150,8 +150,7 @@ public class GraphBackedDiscoveryService implements DiscoveryService { ...@@ -150,8 +150,7 @@ public class GraphBackedDiscoveryService implements DiscoveryService {
//If the final limit is 0, don't launch the query, return with 0 rows //If the final limit is 0, don't launch the query, return with 0 rows
if (validatedExpression instanceof Expressions.LimitExpression if (validatedExpression instanceof Expressions.LimitExpression
&& ((Integer)((Expressions.LimitExpression) validatedExpression).limit().rawValue()) == 0) { && ((Integer)((Expressions.LimitExpression) validatedExpression).limit().rawValue()) == 0) {
return new GremlinQueryResult(dslQuery, validatedExpression.dataType(), return new GremlinQueryResult(dslQuery, validatedExpression.dataType());
scala.collection.immutable.List.empty());
} }
GremlinQuery gremlinQuery = new GremlinTranslator(validatedExpression, graphPersistenceStrategy).translate(); GremlinQuery gremlinQuery = new GremlinTranslator(validatedExpression, graphPersistenceStrategy).translate();
......
...@@ -33,6 +33,10 @@ import org.apache.atlas.query.Expressions._ ...@@ -33,6 +33,10 @@ import org.apache.atlas.query.Expressions._
case class GremlinQueryResult(query: String, case class GremlinQueryResult(query: String,
resultDataType: IDataType[_], resultDataType: IDataType[_],
rows: List[_]) { rows: List[_]) {
def this(query: String,resultDataType: IDataType[_]) {
this(query,resultDataType,List.empty)
}
def toJson = JsonHelper.toJson(this) def toJson = JsonHelper.toJson(this)
} }
......
...@@ -188,7 +188,7 @@ public class GraphBackedMetadataRepositoryTest { ...@@ -188,7 +188,7 @@ public class GraphBackedMetadataRepositoryTest {
private boolean assertEdge(String id, String typeName) throws Exception { private boolean assertEdge(String id, String typeName) throws Exception {
TitanGraph graph = graphProvider.get(); TitanGraph graph = graphProvider.get();
Vertex vertex = graph.query().has(Constants.GUID_PROPERTY_KEY, id).vertices().iterator().next(); Vertex vertex = (Vertex)graph.query().has(Constants.GUID_PROPERTY_KEY, id).vertices().iterator().next();
Iterable<Edge> edges = vertex.getEdges(Direction.OUT, Constants.INTERNAL_PROPERTY_KEY_PREFIX + typeName + ".ref"); Iterable<Edge> edges = vertex.getEdges(Direction.OUT, Constants.INTERNAL_PROPERTY_KEY_PREFIX + typeName + ".ref");
if (!edges.iterator().hasNext()) { if (!edges.iterator().hasNext()) {
ITypedReferenceableInstance entity = repositoryService.getEntityDefinition(id); ITypedReferenceableInstance entity = repositoryService.getEntityDefinition(id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment