ftsrg / trainbenchmark

The Train Benchmark framework for evaluating incremental model validation performance
https://ftsrg.mit.bme.hu/trainbenchmark/
Eclipse Public License 1.0
12 stars 19 forks source link

Use WITH $param to pass nodes in Neo4j implementation #119

Closed szarnyasg closed 7 years ago

szarnyasg commented 7 years ago

Our current Neo4j transformations get the ids of the selected nodes and first run a MATCH to get hold of these nodes:

https://github.com/FTSRG/trainbenchmark/blob/6603ce16d8dd41573cfb882e6d1ba21b05577ffe/trainbenchmark-tool-neo4j/src/main/resources/transformations/PosLengthRepairRhs.cypher#L1-L2

Instead, it would be probably more efficient to use WITH and pass the nodes themselves:

WITH $segment
SET segment.length = -segment.length + 1

And the corresponding Java code would look something like this:

Map<String,Object> params = ImmutableMap.of("segment", segmentNode);
gds.execute(query, params);