Skip to content

Commit

Permalink
chore: improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxxoo committed Dec 22, 2022
1 parent ae7266d commit d2a494c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,6 @@ public StandardHugeGraph(HugeConfig config) {

this.taskManager = TaskManager.instance();

boolean supportsPersistence = !"memory".equals(config.get(CoreOptions.BACKEND));
this.features = new HugeFeatures(this, supportsPersistence);

this.name = config.get(CoreOptions.STORE);
this.started = false;
this.closed = false;
Expand All @@ -215,6 +212,8 @@ public StandardHugeGraph(HugeConfig config) {

try {
this.tx = new TinkerPopTransaction(this);
boolean supportsPersistence = this.backendStoreFeatures().supportsPersistence();
this.features = new HugeFeatures(this, supportsPersistence);

SnowflakeIdGenerator.init(this.params);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public static HugeGraph getGraph(Step<?, ?> step) {
}

public static HugeGraph tryGetGraph(Step<?, ?> step) {
// TODO: remove these EmptyGraph judgments when upgrading tinkerpop to a fixed version
// TODO: remove these EmptyGraph judgments when upgrading tinkerpop to a fixed version tinkerpop#1699
Optional<Graph> graph = step.getTraversal()
.getGraph()
.filter(g -> {
Expand Down Expand Up @@ -140,7 +140,7 @@ public static void trySetGraph(Step<?, ?> step, HugeGraph graph) {
return;
}

// TODO: remove these EmptyGraph judgments when upgrading tinkerpop to a fixed version
// TODO: remove these EmptyGraph judgments when upgrading tinkerpop to a fixed version tinkerpop#1699
Optional<Graph> stepGraph = step.getTraversal()
.getGraph()
.filter(g -> {
Expand Down
1 change: 1 addition & 0 deletions hugegraph-test/src/main/resources/fast-methods.filter
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest.Traversals.g_
org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest.Traversals.g_V_hasXname_not_endingWithXasXX: Unsupported predicate 'notEndingWith(as)'
org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest.Traversals.g_V_hasXage_withoutX27_29X_count: Unsupported relation 'NEQ'
org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest.Traversals.g_V_hasXname_gtXmX_andXcontainingXoXXX: Unsupported predicate 'containing(o)'
org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest.g_V_hasXp_neqXvXX: Unsupported relation 'NEQ'

# Unsupport edge label 'created': 'software' -> 'person', has existed an edgelabel (created: person -> software) in this case
org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeTest.Traversals.g_V_hasXname_markoX_asXaX_outEXcreatedX_asXbX_inV_addEXselectXbX_labelX_toXaX: Unsupport edge from inV to outV
Expand Down
1 change: 1 addition & 0 deletions hugegraph-test/src/main/resources/methods.filter
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest.Traversals.g_
org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest.Traversals.g_V_hasXname_not_endingWithXasXX: Unsupported predicate 'notEndingWith(as)'
org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest.Traversals.g_V_hasXage_withoutX27_29X_count: Unsupported relation 'NEQ'
org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest.Traversals.g_V_hasXname_gtXmX_andXcontainingXoXXX: Unsupported predicate 'containing(o)'
org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest.g_V_hasXp_neqXvXX: Unsupported relation 'NEQ'

# Unsupport edge label 'created': 'software' -> 'person', has existed an edgelabel (created: person -> software) in this case
org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeTest.Traversals.g_V_hasXname_markoX_asXaX_outEXcreatedX_asXbX_inV_addEXselectXbX_labelX_toXaX: Unsupport edge from inV to outV
Expand Down

0 comments on commit d2a494c

Please sign in to comment.