use of org.apache.tinkerpop.gremlin.process.traversal.step.map.CountGlobalStep in project janusgraph by JanusGraph.
the class JanusGraphStep method buildGraphCentricQuery.
private GraphCentricQuery buildGraphCentricQuery(JanusGraphQuery query, final QueryProfiler queryProfiler) {
Preconditions.checkArgument(query instanceof GraphCentricQueryBuilder);
final QueryProfiler optProfiler = queryProfiler.addNested(QueryProfiler.CONSTRUCT_GRAPH_CENTRIC_QUERY);
optProfiler.startTimer();
final GraphCentricQueryBuilder centricQueryBuilder = ((GraphCentricQueryBuilder) query);
if (traversal.getEndStep() instanceof CountGlobalStep) {
centricQueryBuilder.disableSmartLimit();
}
final GraphCentricQuery graphCentricQuery = centricQueryBuilder.constructQueryWithoutProfile(Vertex.class.isAssignableFrom(this.returnClass) ? ElementCategory.VERTEX : ElementCategory.EDGE);
optProfiler.stopTimer();
return graphCentricQuery;
}
Aggregations