Skip to content
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 31 commits into from
Oct 20, 2023

Conversation

liulx20
Copy link
Collaborator

@liulx20 liulx20 commented Oct 18, 2023

What do these changes do?

oid support string_view

Related issue number

Fixes

@liulx20 liulx20 changed the title feat(Flex):oid support string_view feat (Flex):oid support string_view Oct 18, 2023
@zhanglei1949 zhanglei1949 changed the title feat (Flex):oid support string_view feat(flex) : Support using property of string type as primary key for vertex Oct 18, 2023
label_t src_label, dst_label, edge_label;
arc >> src_label;
arc.GetBytes(sizeof(oid_t));
arc >> temp;
// arc.GetBytes(sizeof(PropertyType) + sizeof(int64_t));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments can be removed?

@@ -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) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the result of vit.GetId() must be int64(), do the check first?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked inside the AsXX() function

@@ -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();
Copy link
Collaborator

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 in flex/storages/rt_mutable_graph/types.h should be removed, and we shall ensure can remove all usage of oid_t is this PR?

@liulx20 liulx20 changed the title feat(flex) : Support using property of string type as primary key for vertex feat(flex): Support using property of string type as primary key for vertex Oct 19, 2023
luoxiaojian
luoxiaojian previously approved these changes Oct 20, 2023
@liulx20 liulx20 assigned liulx20 and unassigned liulx20 Oct 20, 2023
Copy link
Collaborator

@zhanglei1949 zhanglei1949 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhanglei1949 zhanglei1949 merged commit 2d19869 into alibaba:main Oct 20, 2023
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants