tinkerpop icon indicating copy to clipboard operation
tinkerpop copied to clipboard

TINKERPOP-3023 Expand type syntax in grammar in 3.8 - Remove Vertex

Open EchoNullify opened this issue 7 months ago • 3 comments

Feat: Remove Vertex support from grammar, and for places where a vertex is required, pass in the vertex id instead at traversal construction.

  • The grammar currently includes inconsistencies, particularly around "type constructors" like ReferenceVertex(), which are being re-evaluated.

  • ReferenceVertex should be renamed simply to Vertex, as the distinction (e.g., between ReferenceVertex and DetachedVertex) is no longer meaningful or guaranteed.

  • The keyword new should be removed from the grammar rule for structureVertex, as it's syntactically unnecessary.

  • The Vertex constructor should only require an id, not a label. Labels are not utilized in practice (e.g., in g.V(Vertex)), and can default to an empty string.

Resolves: 3023,

For reference...

https://lists.apache.org/thread/ptq81160z4y4vddg4lxz2nv244x2yzhq

EchoNullify avatar Jun 11 '25 16:06 EchoNullify

Codecov Report

Attention: Patch coverage is 79.59184% with 10 lines in your changes missing coverage. Please review.

Please upload report for BASE (3.8-dev@9c7a54c). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...remlin/process/traversal/step/map/AddEdgeStep.java 64.70% 4 Missing and 2 partials :warning:
...in/language/grammar/DefaultGremlinBaseVisitor.java 0.00% 2 Missing :warning:
...n/process/traversal/step/map/AddEdgeStartStep.java 87.50% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             3.8-dev    #3133   +/-   ##
==========================================
  Coverage           ?   76.52%           
  Complexity         ?    13829           
==========================================
  Files              ?     1109           
  Lines              ?    69787           
  Branches           ?     7545           
==========================================
  Hits               ?    53404           
  Misses             ?    13617           
  Partials           ?     2766           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar Jun 11 '25 16:06 codecov-commenter

I've pushed some changes into the branch which updates the docs a bit and strips out the vertex -> id sugar in GraphTraversal as it's not required for bytecode. (to be added to master in a separate PR)

My vote is VOTE +1

Cole-Greer avatar Jun 19 '25 00:06 Cole-Greer

Note: Followup PR for master: https://github.com/apache/tinkerpop/pull/3138

Cole-Greer avatar Jun 20 '25 00:06 Cole-Greer