Skip to content

Commit

Permalink
Merge remote-tracking branch 'neo/3.3' into 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunterness committed Oct 4, 2018
2 parents af27519 + 0ae257c commit 0f2c818
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ case class CommunityPipeBuilder(monitors: Monitors, recurse: LogicalPlan => Pipe

case PruningVarExpand(_, from, dir, types, toName, minLength, maxLength, predicates) =>
val predicate = varLengthPredicate(predicates)
PruningVarLengthExpandPipe(source, from, toName, LazyTypes(types.toArray), dir, minLength, maxLength, predicate)()
PruningVarLengthExpandPipe(source, from, toName, LazyTypes(types.toArray), dir, minLength, maxLength, predicate)(id = id)

case Sort(_, sortItems) =>
SortPipe(source, sortItems.map(translateColumnOrder))(id = id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,26 @@ class ProfilerAcceptanceTest extends ExecutionEngineFunSuite with CreateTempFile
assertDbHits(14)(result)("Filter")
}

test("profile pruning var length expand"){
//some graph
val a = createLabeledNode("Start")
val b1 = createLabeledNode("Node")
val b2 = createLabeledNode("Node")
val b3 = createLabeledNode("Node")
val b4 = createLabeledNode("Node")
relate(a, b1, "T1")
relate(b1, b2, "T1")
relate(b2, b3, "T1")
relate(b2, b4, "T1")

val query = "profile match (b:Start)-[*3]->(d) return count(distinct d)"
val result = executeWith(Configs.Interpreted, query)

assertRows(2)(result)("VarLengthExpand(Pruning)")
assertDbHits(7)(result)("VarLengthExpand(Pruning)")

}

private def assertRows(expectedRows: Int)(result: InternalExecutionResult)(names: String*) {
getPlanDescriptions(result, names).foreach {
plan => assert(getArgument[Rows](plan).value === expectedRows, s" wrong row count for plan: ${plan.name}")
Expand Down

0 comments on commit 0f2c818

Please sign in to comment.