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

add option vertex.check_adjacent_vertex_exist #837

Merged
merged 2 commits into from
Mar 20, 2020

Conversation

javeme
Copy link
Contributor

@javeme javeme commented Jan 17, 2020

when check_adjacent_vertex_exist=true:
throw exception: "vertex does not exist" if not exist adjacent vertex

when check_adjacent_vertex_exist=false:
return vertex with "~undefined" label if not exist adjacent vertex

fix: #835
Change-Id: I30ce32ae358d0483888895a0017b77d55f346491

@codecov
Copy link

codecov bot commented Jan 17, 2020

Codecov Report

Merging #837 into master will increase coverage by 0.00%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #837   +/-   ##
=========================================
  Coverage     72.25%   72.26%           
- Complexity     4487     4498   +11     
=========================================
  Files           287      287           
  Lines         21412    21430   +18     
  Branches       3017     3022    +5     
=========================================
+ Hits          15472    15487   +15     
- Misses         4428     4431    +3     
  Partials       1512     1512           
Impacted Files Coverage Δ Complexity Δ
...n/java/com/baidu/hugegraph/schema/VertexLabel.java 94.11% <75.00%> (-5.89%) 11.00 <4.00> (+3.00) ⬇️
...m/baidu/hugegraph/backend/tx/GraphTransaction.java 83.02% <88.23%> (+0.07%) 241.00 <14.00> (+5.00)
...n/java/com/baidu/hugegraph/config/CoreOptions.java 98.75% <100.00%> (+0.04%) 2.00 <0.00> (ø)
...ava/com/baidu/hugegraph/structure/HugeElement.java 67.56% <100.00%> (ø) 50.00 <0.00> (ø)
...java/com/baidu/hugegraph/structure/HugeVertex.java 79.05% <100.00%> (+0.36%) 78.00 <2.00> (+2.00)
...om/baidu/hugegraph/api/filter/ExceptionFilter.java 62.36% <0.00%> (-4.31%) 0.00% <0.00%> (ø%)
...n/java/com/baidu/hugegraph/task/TaskScheduler.java 83.52% <0.00%> (+0.37%) 62.00% <0.00%> (ø%)
...a/com/baidu/hugegraph/backend/query/Condition.java 79.66% <0.00%> (+0.82%) 31.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9a7c9b...6fce93b. Read the comment docs.

query.mustSortByInput(false);
Iterator<HugeVertex> it = this.queryVerticesFromBackend(query);
QueryResults.fillMap(it, vertices);
}

return new MapperIterator<>(ids.iterator(), id -> {
return vertices.get(id);
HugeVertex vertex = vertices.get(id);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: deal vertex with unmatch label

check_adjacent_vertex_exist=true:
 throw exception: vertex does not exist
check_adjacent_vertex_exist=false:
 return vertex with "~undefined" label if not exist adjacent vertex,

fix: #835
Change-Id: I30ce32ae358d0483888895a0017b77d55f346491
fix: #835
Change-Id: Iac7ea3c51092253f20a35a579460d8c7124c5f94
@javeme javeme force-pushed the check_adjacent_vertex_exist branch from 140ba77 to 6fce93b Compare March 19, 2020 13:13
@zhoney zhoney merged commit f856bf2 into master Mar 20, 2020
@zhoney zhoney deleted the check_adjacent_vertex_exist branch March 20, 2020 03:42
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.

当边存在,顶点不存在时,gremlin查询异常
3 participants