private static GraphTraversal<Vertex, ?> compile(final GraphTraversalSource g, final Query query) {
        return new SparqlToGremlinCompiler(g).compile(query);
    }
Extracts any {@code SortCondition} instances from the SPARQL query and holds them in an index of their keys
where the value is that keys sorting direction.
sparql-gremlin/src/main/java/org/apache/tinkerpop/gremlin/sparql/SparqlToGremlinCompiler.java