-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support range sortKey feature #296
Conversation
9fafb06
to
2692c3d
Compare
hugegraph-test/src/main/java/com/baidu/hugegraph/unit/UnitTestSuite.java
Show resolved
Hide resolved
3d470cb
to
405be06
Compare
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQuery.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdPrefixQuery.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdPrefixQuery.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdRangeQuery.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdRangeQuery.java
Show resolved
Hide resolved
405be06
to
0cdbd21
Compare
int cmp1 = Bytes.compare(element.id().asBytes(), this.start.asBytes()); | ||
int cmp2 = Bytes.compare(element.id().asBytes(), this.end.asBytes()); | ||
return (this.inclusiveStart ? cmp1 >= 0 : cmp1 > 0) && | ||
(this.inclusiveEnd ? cmp2 <= 0 : cmp1 < 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this.inclusiveEnd ? cmp2 <= 0 : cmp2 < 0);
@@ -136,6 +165,17 @@ public HugeType type() { | |||
return valid; | |||
} | |||
|
|||
public <V> Object serialValue(V value) { | |||
V validValue = this.validValue(value); | |||
E.checkArgument(value != null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validValue
graph.tx().commit(); | ||
System.exit(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
0cdbd21
to
cd163d0
Compare
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/IdPrefixQuery.java
Show resolved
Hide resolved
|
||
public IdPrefixQuery(Query originQuery, | ||
Id start, boolean inclusiveStart, Id prefix) { | ||
this(originQuery.resultType(), originQuery, start, true, prefix); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true -> inclusiveStart
assert condition instanceof Condition.Relation; | ||
Condition.Relation r = (Condition.Relation) condition; | ||
Condition.Relation sys = new Condition.SyspropRelation( | ||
HugeKeys.SORT_VALUES, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjust the alignment
implement #271 Change-Id: Ib618c45bc6169a0fb7632dbbf0fb29b7ee0a08e3
cd163d0
to
171b33a
Compare
implement #271
Change-Id: Ib618c45bc6169a0fb7632dbbf0fb29b7ee0a08e3