Skip to content

refactor: consolidate Schema vertex/edge label check API#393

Merged
zhanglei1949 merged 4 commits into
alibaba:mainfrom
zhanglei1949:zl/schema-label-check-consolidation
May 22, 2026
Merged

refactor: consolidate Schema vertex/edge label check API#393
zhanglei1949 merged 4 commits into
alibaba:mainfrom
zhanglei1949:zl/schema-label-check-consolidation

Conversation

@zhanglei1949
Copy link
Copy Markdown
Member

@zhanglei1949 zhanglei1949 commented May 22, 2026

Fixes #392

Summary

  • Unify the naming convention of Schema's label existence/validity checks under a single snake_case is_* family
  • Merge the weak Schema::edge_triplet_valid (tomb-bit-only) into the strong is_edge_triplet_valid (which also requires e_schemas_ presence); this fixes the prior divergence between the two PropertyGraph::edge_triplet_check overloads as a side effect
  • Remove dead PropertyGraph::edge_triplet_exist (no callers anywhere)

See #392 for the full rename table and the rationale.

The is_*_soft_deleted family is renamed (snake_case) but kept in this PR — UpdateTransaction still calls it on main. Removing the family is a separate cleanup tied to the COW Update Transaction work.

Unify the naming convention of label existence and validity checks on
Schema (and the schema-check helpers it surfaces through PropertyGraph).
The pre-existing API mixed three styles (`has_*`, `contains_*`,
`*_valid`, `exist`) and had several overlapping or misleading methods.

Renames (snake_case `is_*` family):
- contains_vertex_label / vertex_label_valid  -> is_vertex_label_valid
- contains_edge_label   / edge_label_valid    -> is_edge_label_valid
- exist(...)                                  -> is_edge_triplet_valid(...)
- has_edge_label(...)                         -> has_edge_triplet(...)
- IsVertexLabelSoftDeleted                    -> is_vertex_label_soft_deleted
- IsEdgeLabelSoftDeleted                      -> is_edge_label_soft_deleted
- IsVertexPropertySoftDeleted                 -> is_vertex_property_soft_deleted
- IsEdgePropertySoftDeleted                   -> is_edge_property_soft_deleted

Merged (semantic-preserving consolidation):
- Schema::edge_triplet_valid (weak, tomb-bit-only check) folded into
  Schema::is_edge_triplet_valid, which now inlines the tomb check
  together with the e_schemas_ presence check. This also fixes the
  prior divergence between PropertyGraph::edge_triplet_check's string
  and label_t overloads.

Removed (dead code, no callers):
- PropertyGraph::edge_triplet_exist
@zhanglei1949 zhanglei1949 requested a review from liulx20 May 22, 2026 06:21
@zhanglei1949 zhanglei1949 force-pushed the zl/schema-label-check-consolidation branch from 786309c to fbe219b Compare May 22, 2026 06:21
@zhanglei1949 zhanglei1949 merged commit 7aa62ac into alibaba:main May 22, 2026
18 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in neug May 25, 2026
@github-project-automation github-project-automation Bot moved this to In progress in neug May 25, 2026
@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

Status: Done

Development

Successfully merging this pull request may close these issues.

Refactor: consolidate Schema vertex/edge label check API

2 participants