Skip to content

refactor: Unify the Edge/Vertex label resolution#355

Merged
zhanglei1949 merged 1 commit into
alibaba:mainfrom
zhanglei1949:zl/sim-up-txn
May 14, 2026
Merged

refactor: Unify the Edge/Vertex label resolution#355
zhanglei1949 merged 1 commit into
alibaba:mainfrom
zhanglei1949:zl/sim-up-txn

Conversation

@zhanglei1949
Copy link
Copy Markdown
Member

Fix #354

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors UpdateTransaction to remove duplicated vertex/edge label resolution code by extracting two static helper functions: one for resolving a vertex label and one for resolving the (src, dst, edge) triplet, both returning Status and writing label ids via out-parameters.

Changes:

  • Add static helpers resolveVertexLabel and resolveEdgeTriplet in update_transaction.cc.
  • Replace duplicated existence checks + label lookups across AddVertexProperties, AddEdgeProperties, RenameVertexProperties, RenameEdgeProperties, DeleteVertexProperties, DeleteEdgeProperties, DeleteVertexType, and DeleteEdgeType with RETURN_IF_NOT_OK calls to the new helpers.
  • Include neug/utils/result.h for RETURN_IF_NOT_OK.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/transaction/update_transaction.cc
@zhanglei1949 zhanglei1949 changed the title refactor: Remove the duplication of Edge/Vertex label resolution refactor: Unify the Edge/Vertex label resolution May 14, 2026
@zhanglei1949 zhanglei1949 merged commit bdd171b into alibaba:main May 14, 2026
22 checks passed
@lnfjpt lnfjpt mentioned this pull request May 26, 2026
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.

There are too many duplicated edge/vertex params resolving code in UpdateTransaction

3 participants