-
Notifications
You must be signed in to change notification settings - Fork 447
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
feat(flex): Support using property of string type as primary key for vertex #3296
Merged
Merged
Changes from 28 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
cf3787e
support oid with type string_view
liulx20 8414342
update
liulx20 e49f887
update
liulx20 ee54c5c
fix
liulx20 06f1323
update
liulx20 c5dbbea
fix
liulx20 626ac49
fix
liulx20 78633e6
fix
liulx20 e9e6f94
fix schema.cc
liulx20 cec8469
Update basic_fragment_loader.cc
liulx20 94578b1
fix
liulx20 932f8c3
update
liulx20 3b023c5
fix
liulx20 967195f
fix
liulx20 a6f411b
update
liulx20 68243de
upd
liulx20 894d82d
fix match_query.h
zhanglei1949 fc892ff
fix grin
liulx20 259b10d
wal without oid type
liulx20 f808bdc
fix grin
liulx20 1d4fb54
merge
liulx20 b133a1e
serialize with primarykeys
liulx20 0894401
merge
liulx20 6c1ef0c
add prop name
liulx20 667922b
add serialize for plugin list
liulx20 3214f19
Merge branch 'main' into string_support
liulx20 1fa960a
fix
liulx20 c4839cf
Removed redundant comments
liulx20 d6ddbd2
Fix CI
zhanglei1949 20bd8d6
Merge branch 'string_support' of https://github.com/liulx20/GraphScop…
zhanglei1949 dfd0e8f
Merge branch 'main' into string_support
zhanglei1949 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ static uint32_t get_vertex_vid(const gs::ReadTransaction& txn, uint8_t label, | |
uint32_t vid = std::numeric_limits<uint32_t>::max(); | ||
auto vit = txn.GetVertexIterator(label); | ||
for (; vit.IsValid(); vit.Next()) { | ||
if (vit.GetId() == id) { | ||
if (vit.GetId().AsInt64() == id) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the result of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Checked inside the AsXX() function |
||
vid = vit.GetIndex(); | ||
break; | ||
} | ||
|
@@ -99,7 +99,7 @@ bool ServerApp::Query(Decoder& input, Encoder& output) { | |
uint8_t vertex_label_id = txn.schema().get_vertex_label_id(vertex_label); | ||
auto vit = txn.GetVertexIterator(vertex_label_id); | ||
for (; vit.IsValid(); vit.Next()) { | ||
if (vit.GetId() == vertex_id) { | ||
if (vit.GetId().AsInt64() == vertex_id) { | ||
output.put_int(1); | ||
int field_num = vit.FieldNum(); | ||
for (int i = 0; i < field_num; ++i) { | ||
|
@@ -233,13 +233,13 @@ bool ServerApp::Query(Decoder& input, Encoder& output) { | |
|
||
std::vector<std::tuple<int64_t, int64_t, std::string>> match_edges; | ||
for (uint32_t v = dst_range.from; v != dst_range.to; ++v) { | ||
int64_t v_oid = txn.GetVertexId(dst_label_id, v); | ||
int64_t v_oid = txn.GetVertexId(dst_label_id, v).AsInt64(); | ||
auto ieit = txn.GetInEdgeIterator(dst_label_id, v, src_label_id, | ||
edge_label_id); | ||
while (ieit.IsValid()) { | ||
uint32_t u = ieit.GetNeighbor(); | ||
if (src_range.contains(u)) { | ||
int64_t u_oid = txn.GetVertexId(src_label_id, u); | ||
int64_t u_oid = txn.GetVertexId(src_label_id, u).AsInt64(); | ||
match_edges.emplace_back(u_oid, v_oid, | ||
ieit.GetData().to_string()); | ||
} | ||
|
@@ -248,13 +248,13 @@ bool ServerApp::Query(Decoder& input, Encoder& output) { | |
} | ||
if (match_edges.empty()) { | ||
for (uint32_t u = src_range.from; u != src_range.to; ++u) { | ||
int64_t u_oid = txn.GetVertexId(src_label_id, u); | ||
int64_t u_oid = txn.GetVertexId(src_label_id, u).AsInt64(); | ||
auto oeit = txn.GetOutEdgeIterator(src_label_id, u, dst_label_id, | ||
edge_label_id); | ||
while (oeit.IsValid()) { | ||
uint32_t v = oeit.GetNeighbor(); | ||
if (dst_range.contains(v)) { | ||
int64_t v_oid = txn.GetVertexId(dst_label_id, v); | ||
int64_t v_oid = txn.GetVertexId(dst_label_id, v).AsInt64(); | ||
match_edges.emplace_back(u_oid, v_oid, | ||
oeit.GetData().to_string()); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
using oid_t = int64_t;
declared inflex/storages/rt_mutable_graph/types.h
should be removed, and we shall ensure can remove all usage of oid_t is this PR?