Skip to content

Commit

Permalink
Clean up from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusmelke committed Dec 1, 2015
1 parent f902d23 commit 9a8d278
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Expand Up @@ -40,7 +40,7 @@ case class PlanSingleQuery(planPart: (PlannerQuery, LogicalPlanningContext, Opti
val alwaysEager = context.config.updateStrategy.alwaysEager

val planWithEffect =
if (alwaysEager ||conflicts(partPlan, in))
if (alwaysEager || conflicts(partPlan, in))
context.logicalPlanProducer.planEager(partPlan)
else partPlan
val planWithUpdates = planUpdates(in, planWithEffect)(context)
Expand Down
Expand Up @@ -58,7 +58,7 @@ case object CypherPreParser extends Parser with Base {
)

def StrategyOption = rule("strategy option")(
option("strategy", "eager") ~ push(EagerOption)
option("updateStrategy", "eager") ~ push(EagerOption)
)

def VersionNumber = rule("Version") {
Expand Down
Expand Up @@ -26,6 +26,6 @@ class EagerStrategyAcceptanceTest extends ExecutionEngineFunSuite {
}

test("should use eagerness when option is provided ") {
execute("CYPHER strategy=eager MATCH () CREATE ()") should use("Eager")
execute("CYPHER updateStrategy=eager MATCH () CREATE ()") should use("Eager")
}
}
Expand Up @@ -171,7 +171,7 @@ trait NewPlannerTestSupport extends CypherTestSupport {
*/
def updateWithBothPlanners(queryText: String, params: (String, Any)*): InternalExecutionResult = {
val ruleResult = graph.rollback(innerExecute(s"CYPHER planner=rule $queryText", params: _*))
val eagerCostResult = graph.rollback(innerExecute(s"CYPHER strategy=eager $queryText", params: _*))
val eagerCostResult = graph.rollback(innerExecute(s"CYPHER updateStrategy=eager $queryText", params: _*))
val costResult = executeWithCostPlannerOnly(queryText, params: _*)
assertResultsAreSame(ruleResult, costResult, queryText, "Diverging results between rule and cost planners")
assertResultsAreSame(eagerCostResult, costResult, queryText,
Expand Down
Expand Up @@ -61,7 +61,7 @@ class CypherPreParserTest extends CypherFunSuite with TableDrivenPropertyChecks
("CYPHER 2.3 runtime=compiled planner=greedy RETURN", PreParsedStatement("RETURN", Seq(ConfigurationOptions(
Some(VersionOption("2.3")), Seq(CompiledRuntimeOption, GreedyPlannerOption))), (1, 48, 47))),
("explainmatch", PreParsedStatement("explainmatch", Seq.empty, (1, 1, 0))),
("CYPHER strategy=eager RETURN", PreParsedStatement("RETURN", Seq(ConfigurationOptions(None, Seq(EagerOption))), (1, 23, 22)))
("CYPHER updateStrategy=eager RETURN", PreParsedStatement("RETURN", Seq(ConfigurationOptions(None, Seq(EagerOption))), (1, 29, 28)))
)

test("run the tests") {
Expand Down

0 comments on commit 9a8d278

Please sign in to comment.