Skip to content

Commit

Permalink
Remove support for cypher compilers 2.0 and 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
davidegrohmann committed Apr 21, 2015
1 parent 9b5aea4 commit ccd4565
Show file tree
Hide file tree
Showing 25 changed files with 82 additions and 1,320 deletions.
85 changes: 6 additions & 79 deletions community/cypher/cypher/pom.xml
Expand Up @@ -160,6 +160,11 @@
<artifactId>neo4j-graphviz</artifactId> <artifactId>neo4j-graphviz</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<scope>test</scope>
</dependency>


<!-- neo4j-cypher --> <!-- neo4j-cypher -->
<dependency> <dependency>
Expand Down Expand Up @@ -193,84 +198,6 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-compiler-2.0</artifactId>
<version>2.0.4</version>
<exclusions>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
</exclusion>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-lucene-index</artifactId>
</exclusion>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-graph-matching</artifactId>
</exclusion>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-graph-algo</artifactId>
</exclusion>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-commons</artifactId>
</exclusion>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
<exclusion>
<groupId>org.parboiled</groupId>
<artifactId>parboiled-scala_2.10</artifactId>
</exclusion>
<exclusion>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-compiler-2.1</artifactId>
<version>2.1.7</version>
<exclusions>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
</exclusion>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-lucene-index</artifactId>
</exclusion>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-graph-matching</artifactId>
</exclusion>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-graph-algo</artifactId>
</exclusion>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-commons</artifactId>
</exclusion>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
<exclusion>
<groupId>org.parboiled</groupId>
<artifactId>parboiled-scala_2.10</artifactId>
</exclusion>
<exclusion>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency> <dependency>
<groupId>org.neo4j</groupId> <groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-compiler-2.2</artifactId> <artifactId>neo4j-cypher-compiler-2.2</artifactId>
Expand Down Expand Up @@ -310,7 +237,7 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.neo4j</groupId> <groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-compiler-2.3</artifactId> <artifactId>neo4j-cypher-compiler-2.3</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
Expand Down
Expand Up @@ -30,8 +30,6 @@ object CypherVersionName {
object CypherVersion { object CypherVersion {


case object v1_9 extends CypherVersion("1.9") case object v1_9 extends CypherVersion("1.9")
case object v2_0 extends CypherVersion("2.0")
case object v2_1 extends CypherVersion("2.1")
case object v2_2 extends CypherVersion("2.2") case object v2_2 extends CypherVersion("2.2")
case object v2_3 extends CypherVersion("2.3") case object v2_3 extends CypherVersion("2.3")


Expand All @@ -42,5 +40,5 @@ object CypherVersion {
def findVersionByExactName(versionName: String) = allVersions.find( _.name == versionName ) def findVersionByExactName(versionName: String) = allVersions.find( _.name == versionName )


val vDefault = v2_3 val vDefault = v2_3
val allVersions = Seq(v1_9, v2_0, v2_1, v2_2, v2_3) val allVersions = Seq(v1_9, v2_2, v2_3)
} }
Expand Up @@ -71,10 +71,6 @@ class CypherCompiler(graph: GraphDatabaseService,


private val compatibilityFor1_9 = CompatibilityFor1_9(graph, queryCacheSize, kernelMonitors) private val compatibilityFor1_9 = CompatibilityFor1_9(graph, queryCacheSize, kernelMonitors)


private val compatibilityFor2_0 = CompatibilityFor2_0(graph, queryCacheSize, kernelMonitors)

private val compatibilityFor2_1 = CompatibilityFor2_1(graph, queryCacheSize, kernelMonitors, kernelAPI)

private val compatibilityFor2_2Rule = CompatibilityFor2_2Rule(graph, queryCacheSize, STATISTICS_DIVERGENCE_THRESHOLD, queryPlanTTL, CLOCK, kernelMonitors, kernelAPI) private val compatibilityFor2_2Rule = CompatibilityFor2_2Rule(graph, queryCacheSize, STATISTICS_DIVERGENCE_THRESHOLD, queryPlanTTL, CLOCK, kernelMonitors, kernelAPI)
private val compatibilityFor2_2Cost = CompatibilityFor2_2Cost(graph, queryCacheSize, STATISTICS_DIVERGENCE_THRESHOLD, queryPlanTTL, CLOCK, kernelMonitors, kernelAPI, log, CostPlanner2_2) private val compatibilityFor2_2Cost = CompatibilityFor2_2Cost(graph, queryCacheSize, STATISTICS_DIVERGENCE_THRESHOLD, queryPlanTTL, CLOCK, kernelMonitors, kernelAPI, log, CostPlanner2_2)
private val compatibilityFor2_2IDP = CompatibilityFor2_2Cost(graph, queryCacheSize, STATISTICS_DIVERGENCE_THRESHOLD, queryPlanTTL, CLOCK, kernelMonitors, kernelAPI, log, IDPPlanner2_2) private val compatibilityFor2_2IDP = CompatibilityFor2_2Cost(graph, queryCacheSize, STATISTICS_DIVERGENCE_THRESHOLD, queryPlanTTL, CLOCK, kernelMonitors, kernelAPI, log, IDPPlanner2_2)
Expand All @@ -92,8 +88,8 @@ class CypherCompiler(graph: GraphDatabaseService,


private val compatibilityFor2_3 = CompatibilityFor2_3Cost(graph, queryCacheSize, STATISTICS_DIVERGENCE_THRESHOLD, queryPlanTTL, CLOCK, kernelMonitors, kernelAPI, log, ConservativePlannerName, InterpretedRuntimeName) private val compatibilityFor2_3 = CompatibilityFor2_3Cost(graph, queryCacheSize, STATISTICS_DIVERGENCE_THRESHOLD, queryPlanTTL, CLOCK, kernelMonitors, kernelAPI, log, ConservativePlannerName, InterpretedRuntimeName)


private final val VERSIONS_WITH_FIXED_PLANNER: Set[CypherVersion] = Set(v1_9, v2_0, v2_1) private final val VERSIONS_WITH_FIXED_PLANNER: Set[CypherVersion] = Set(v1_9)
private final val VERSIONS_WITH_FIXED_RUNTIME: Set[CypherVersion] = Set(v1_9, v2_0, v2_1, v2_2) private final val VERSIONS_WITH_FIXED_RUNTIME: Set[CypherVersion] = Set(v1_9, v2_2)


private final val ILLEGAL_PLANNER_RUNTIME_COMBINATIONS: Set[(PlannerName, RuntimeName)] = Set((RulePlannerName, CompiledRuntimeName)) private final val ILLEGAL_PLANNER_RUNTIME_COMBINATIONS: Set[(PlannerName, RuntimeName)] = Set((RulePlannerName, CompiledRuntimeName))


Expand Down Expand Up @@ -129,8 +125,6 @@ class CypherCompiler(graph: GraphDatabaseService,
case (CypherVersion.v2_2, DPPlannerName, _) => compatibilityFor2_2DP.produceParsedQuery(statementAsText) case (CypherVersion.v2_2, DPPlannerName, _) => compatibilityFor2_2DP.produceParsedQuery(statementAsText)
case (CypherVersion.v2_2, RulePlannerName, _) => compatibilityFor2_2Rule.produceParsedQuery(statementAsText) case (CypherVersion.v2_2, RulePlannerName, _) => compatibilityFor2_2Rule.produceParsedQuery(statementAsText)
case (CypherVersion.v2_2, _, _) => compatibilityFor2_2.produceParsedQuery(statementAsText) case (CypherVersion.v2_2, _, _) => compatibilityFor2_2.produceParsedQuery(statementAsText)
case (CypherVersion.v2_1, _, _) => compatibilityFor2_1.parseQuery(preParsedQuery.statement)
case (CypherVersion.v2_0, _, _) => compatibilityFor2_0.parseQuery(preParsedQuery.statement)
case (CypherVersion.v1_9, _, _) => compatibilityFor1_9.parseQuery(preParsedQuery.statement) case (CypherVersion.v1_9, _, _) => compatibilityFor1_9.parseQuery(preParsedQuery.statement)
} }
} }
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit ccd4565

Please sign in to comment.