perf(core): add AdjacentEdgesQuery by javeme · Pull Request #2864 · apache/hugegraph

Pull Request Overview

This PR introduces a performance optimization by adding the AdjacentEdgesQuery class to improve edge querying for adjacent vertices. The change refactors the existing condition-based edge querying to use a more specialized and optimized query implementation.

Key changes:

  • Introduces the new AdjacentEdgesQuery class with specialized query handling for edge traversal
  • Refactors method signatures to consistently use Id[] instead of mixed array/list types
  • Updates query construction to utilize the new specialized query type when appropriate

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
AdjacentEdgesQuery.java New specialized query class for optimized adjacent edge queries
GraphTransaction.java Updated query construction logic to use AdjacentEdgesQuery and simplified method signatures
ConditionQuery.java Added flatten capability interface and improved query relation handling
ConditionQueryFlatten.java Enhanced flattening logic with better condition handling
Condition.java Changed return types from Condition to Relation for better type safety
HugeVertexStep.java Updated to use mapElName2Id instead of mapElName2El
HugeTraverser.java Simplified array conversion in edge query construction
EdgesQueryIterator.java Removed unnecessary array conversion
PerfExampleBase.java Simplified edge query construction using new GraphTransaction method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.