Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusmelke committed Jun 15, 2018
1 parent d6df008 commit f1bb11c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import org.neo4j.cypher.internal.compiler.v3_5.CypherPlannerConfiguration
import org.neo4j.cypher.internal.compiler.v3_5.planner.logical.Metrics._
import org.neo4j.cypher.internal.ir.v3_5._
import org.neo4j.cypher.internal.planner.v3_5.spi.PlanningAttributes.Cardinalities
import org.opencypher.v9_0.util.{Cardinality, Cost, CostPerRow, Multiplier}
import org.opencypher.v9_0.expressions.{HasLabels, Property}
import org.neo4j.cypher.internal.v3_5.logical.plans._
import org.opencypher.v9_0.expressions.{HasLabels, Property}
import org.opencypher.v9_0.util.{Cardinality, Cost, CostPerRow, Multiplier}

case class CardinalityCostModel(config: CypherPlannerConfiguration) extends CostModel {
def VERBOSE = java.lang.Boolean.getBoolean("CardinalityCostModel.VERBOSE")
Expand All @@ -48,7 +48,7 @@ case class CardinalityCostModel(config: CypherPlannerConfiguration) extends Cost

// Filtering on labels and properties
case Selection(predicate, _) =>
val noOfStoreAccesses = predicate.treeCount {
val noOfStoreAccesses = predicate.exprs.treeCount {
case _: Property | _: HasLabels => true
case _ => false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import org.neo4j.cypher.internal.compiler.v3_5.planner.LogicalPlanningTestSuppor
import org.neo4j.cypher.internal.compiler.v3_5.planner.logical.Metrics.QueryGraphSolverInput
import org.neo4j.cypher.internal.ir.v3_5.LazyMode
import org.neo4j.cypher.internal.planner.v3_5.spi.PlanningAttributes.Cardinalities
import org.neo4j.cypher.internal.v3_5.logical.plans._
import org.opencypher.v9_0.expressions.{Ands, HasLabels, LabelName, SemanticDirection}
import org.opencypher.v9_0.util.Cost
import org.opencypher.v9_0.util.test_helpers.CypherFunSuite
import org.opencypher.v9_0.expressions.{Ands, HasLabels, LabelName, SemanticDirection}
import org.neo4j.cypher.internal.v3_5.logical.plans._

class CardinalityCostModelTest extends CypherFunSuite with LogicalPlanningTestSupport2 {

Expand Down Expand Up @@ -101,7 +101,7 @@ class CardinalityCostModelTest extends CypherFunSuite with LogicalPlanningTestSu
val cardinalities = new Cardinalities
val cardinality = 10.0
val plan =
setC(Selection(List(propEquality("a", "prop1", 42), propEquality("a", "prop1", 42), propEquality("a", "prop1", 42)),
setC(Selection(List(propEquality("a", "prop1", 42), propEquality("a", "prop1", 43), propEquality("a", "prop1", 44)),
setC(Argument(Set("a")), cardinalities, cardinality)), cardinalities, cardinality)

val numberOfPredicates = 3
Expand Down

0 comments on commit f1bb11c

Please sign in to comment.