Skip to content

Commit 584d1f2

Browse files
committed
[~] allow ordering list properties via index
1 parent ff9c795 commit 584d1f2

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

janusgraph-core/src/main/java/org/janusgraph/graphdb/query/graph/GraphCentricQueryBuilder.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,6 @@ public GraphCentricQueryBuilder orderBy(String keyName, org.apache.tinkerpop.gr
201201
Preconditions.checkArgument(key!=null && order!=null,"Need to specify and key and an order");
202202
Preconditions.checkArgument(Comparable.class.isAssignableFrom(key.dataType()),
203203
"Can only order on keys with comparable data type. [%s] has datatype [%s]", key.name(), key.dataType());
204-
// TODO: test commit
205-
Preconditions.checkArgument(key.cardinality()== Cardinality.SINGLE,
206-
"Ordering is undefined on multi-valued key [%s]", key.name());
207204
Preconditions.checkArgument(!orders.containsKey(key), "orders [%s] already contains key [%s]", orders, key);
208205
orders.add(key, Order.convert(order));
209206
return this;

janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/optimize/step/HasStepFolder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ static boolean validJanusGraphOrder(OrderGlobalStep orderGlobalStep, Traversal r
121121
final PropertyKey pKey = tx.getPropertyKey(key);
122122
// TODO: test commit
123123
if (pKey == null
124-
|| !(Comparable.class.isAssignableFrom(pKey.dataType()))
125-
|| (isVertexOrder && pKey.cardinality() != Cardinality.SINGLE)) {
124+
|| !(Comparable.class.isAssignableFrom(pKey.dataType()))) {
126125
return false;
127126
}
128127
}

0 commit comments

Comments
 (0)