Skip to content

Commit

Permalink
Renaming 'enterprise interpreted' to 'slotted' runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
craigtaverner authored and alexaverbuch committed Sep 1, 2017
1 parent ee4078b commit 78c9ee9
Show file tree
Hide file tree
Showing 21 changed files with 38 additions and 38 deletions.
Expand Up @@ -25,8 +25,8 @@ case object CypherRuntime extends CypherOptionCompanion[CypherRuntime] {

case object default extends CypherRuntime("default")
case object interpreted extends CypherRuntime("interpreted")
case object registerInterpreted extends CypherRuntime("enterprise-interpreted")
case object slotted extends CypherRuntime("slotted")
case object compiled extends CypherRuntime("compiled")

val all: Set[CypherRuntime] = Set(interpreted, compiled, registerInterpreted)
val all: Set[CypherRuntime] = Set(interpreted, compiled, slotted)
}
Expand Up @@ -55,7 +55,7 @@ case object CypherPreParser extends Parser with Base {
def RuntimeOption: Rule1[RuntimePreParserOption] = rule("runtime option")(
option("runtime", "interpreted") ~ push(InterpretedRuntimeOption)
| option("runtime", "compiled") ~ push(CompiledRuntimeOption)
| option("runtime", "enterprise-interpreted") ~ push(RegisterInterpretedRuntimeOption)
| option("runtime", "slotted") ~ push(SlottedRuntimeOption)
)

def StrategyOption: Rule1[UpdateStrategyOption] = rule("strategy option")(
Expand Down
Expand Up @@ -34,7 +34,7 @@ case object GreedyPlannerOption extends PlannerPreParserOption("greedy")
case object IDPPlannerOption extends PlannerPreParserOption("idp")
case object DPPlannerOption extends PlannerPreParserOption("dp")
case object InterpretedRuntimeOption extends RuntimePreParserOption("interpreted")
case object RegisterInterpretedRuntimeOption extends RuntimePreParserOption("enterprise-interpreted")
case object SlottedRuntimeOption extends RuntimePreParserOption("slotted")
case object CompiledRuntimeOption extends RuntimePreParserOption("compiled")
case object EagerOption extends UpdateStrategyOption("eager")
case class DebugOption(key: String) extends PreParserOption
Expand Down
Expand Up @@ -62,7 +62,7 @@ case class CostCompatibility[CONTEXT <: CommunityRuntimeContext,
override val maybeRuntimeName: Option[RuntimeName] = runtime match {
case CypherRuntime.default => None
case CypherRuntime.interpreted => Some(InterpretedRuntimeName)
case CypherRuntime.registerInterpreted => Some(EnterpriseInterpretedRuntimeName)
case CypherRuntime.`slotted` => Some(SlottedRuntimeName)
case CypherRuntime.compiled => Some(CompiledRuntimeName)
}

Expand Down
Expand Up @@ -28,8 +28,8 @@ case object InterpretedRuntimeName extends RuntimeName {
override val name = "INTERPRETED"
}

case object EnterpriseInterpretedRuntimeName extends RuntimeName {
override val name = "ENTERPRISE-INTERPRETED"
case object SlottedRuntimeName extends RuntimeName {
override val name = "SLOTTED"
}

case object CompiledRuntimeName extends RuntimeName {
Expand Down
Expand Up @@ -186,7 +186,7 @@ public class GraphDatabaseSettings implements LoadableConfig
@Internal
public static final Setting<String> cypher_runtime = setting(
"unsupported.cypher.runtime",
options( "INTERPRETED", "COMPILED", "ENTERPRISE-INTERPRETED" , DEFAULT ), DEFAULT );
options( "INTERPRETED", "COMPILED", "SLOTTED" , DEFAULT ), DEFAULT );

@Description( "Enable tracing of compilation in cypher." )
@Internal
Expand Down
Expand Up @@ -118,17 +118,17 @@ public static class CostCompiledSourceCode
@RunWith( Cucumber.class )
@CucumberOptions(
plugin = {
DB_CONFIG + "cost-interpreted-enterprise.json",
HTML_REPORT + SUITE_NAME + "/cost-interpreted-enterprise",
JSON_REPORT + SUITE_NAME + "/cost-interpreted-enterprise",
BLACKLIST_PLUGIN + "cost-interpreted-enterprise.txt"
DB_CONFIG + "cost-slotted.json",
HTML_REPORT + SUITE_NAME + "/cost-slotted",
JSON_REPORT + SUITE_NAME + "/cost-slotted",
BLACKLIST_PLUGIN + "cost-slotted.txt"
},
glue = { GLUE_PATH },
features = { FEATURE_PATH + FEATURE_TO_RUN },
tags = { "~@pending" },
strict = true
)
public static class CostEnterpriseInterpreted
public static class CostSlotted
{
}

Expand Down

This file was deleted.

@@ -0,0 +1,4 @@
{
"planner" : "cost",
"runtime" : "slotted"
}
Expand Up @@ -76,8 +76,8 @@ class CreateAcceptanceTest extends ExecutionEngineFunSuite with QueryStatisticsT
result.toList should equal(List(Map("type(r)" -> typ)))
}

test("should create nodes with label and property with enterprise interpreted") {
//TODO: Remove this test once we can create relationships in enterprise interpreted
test("should create nodes with label and property with slotted runtime") {
//TODO: Remove this test once we can create relationships in slotted runtime
val createdNumber = 1

val query = "CREATE" + List.fill(createdNumber)("(:Bar{prop: 1})").mkString(", ")
Expand Down
Expand Up @@ -97,15 +97,15 @@ class ExpressionAcceptanceTest extends ExecutionEngineFunSuite with CypherCompar
test("prepending item to a list should behave correctly in all runtimes") {
val query = "CYPHER WITH {a:[1,2,3]} AS x RETURN 'a:' + x.a AS r"

val result = succeedWith(Configs.All - Configs.SlottedInterpreted, query)
val result = succeedWith(Configs.AllExceptSlotted, query)

result.toList.head("r") should equal(List("a:", 1, 2, 3))
}

test("appending item to a list should behave correctly in all runtimes") {
val query = "CYPHER WITH {a:[1,2,3]} AS x RETURN x.a + 'a:' AS r"

val result = succeedWith(Configs.All - Configs.SlottedInterpreted, query)
val result = succeedWith(Configs.AllExceptSlotted, query)

result.toList.head("r") should equal(List(1, 2, 3, "a:"))
}
Expand Down
Expand Up @@ -134,7 +134,7 @@ class UniqueIndexAcceptanceTest extends ExecutionEngineFunSuite with CypherCompa
graph should haveConstraints(s"${constraintCreator.typeName}:Person(name)")

//WHEN
val result = updateWithAndExpectPlansToBeSimilar(Configs.Interpreted - Configs.Cost2_3, "MERGE (n:Person {name: 'Andres'}) RETURN n.name")
val result = updateWithAndExpectPlansToBeSimilar(Configs.CommunityInterpreted - Configs.Cost2_3, "MERGE (n:Person {name: 'Andres'}) RETURN n.name")

//THEN
result shouldNot use("NodeIndexSeek")
Expand Down
Expand Up @@ -34,7 +34,7 @@ class VarLengthExpandQueryPlanAcceptanceTest extends ExecutionEngineFunSuite wit
|
|Planner COST
|
|Runtime ENTERPRISE-INTERPRETED
|Runtime SLOTTED
|
|+-----------------------+----------------+------+---------+-----------------+-------------------+----------------------+------------------+----------------------------------+
|| Operator | Estimated Rows | Rows | DB Hits | Page Cache Hits | Page Cache Misses | Page Cache Hit Ratio | Variables | Other |
Expand Down Expand Up @@ -62,7 +62,7 @@ class VarLengthExpandQueryPlanAcceptanceTest extends ExecutionEngineFunSuite wit
|
|Planner COST
|
|Runtime ENTERPRISE-INTERPRETED
|Runtime SLOTTED
|
|+-----------------------+----------------+------+---------+-----------------+-------------------+----------------------+------------------+--------------------------------+
|| Operator | Estimated Rows | Rows | DB Hits | Page Cache Hits | Page Cache Misses | Page Cache Hit Ratio | Variables | Other |
Expand Down
Expand Up @@ -118,10 +118,10 @@ public static class CostCompiledSourceCode
@RunWith( Cucumber.class )
@CucumberOptions(
plugin = {
DB_CONFIG + "cost-interpreted-enterprise.json",
HTML_REPORT + SUITE_NAME + "/cost-interpreted-enterprise",
JSON_REPORT + SUITE_NAME + "/cost-interpreted-enterprise",
BLACKLIST_PLUGIN + "cost-interpreted-enterprise.txt",
DB_CONFIG + "cost-slotted.json",
HTML_REPORT + SUITE_NAME + "/cost-slotted",
JSON_REPORT + SUITE_NAME + "/cost-slotted",
BLACKLIST_PLUGIN + "cost-slotted.txt",
},
glue = { GLUE_PATH },
features = { FEATURE_PATH + FEATURE_TO_RUN },
Expand Down

This file was deleted.

@@ -0,0 +1,4 @@
{
"planner" : "cost",
"runtime" : "slotted"
}
Expand Up @@ -71,7 +71,7 @@ object BuildEnterpriseInterpretedExecutionPlan extends Phase[EnterpriseRuntimeCo
val func = BuildInterpretedExecutionPlan.getExecutionPlanFunction(periodicCommitInfo, from.queryText, updating,
resultBuilderFactory,
context.notificationLogger,
EnterpriseInterpretedRuntimeName)
SlottedRuntimeName)
val fingerprint = context.createFingerprintReference(fp)
val periodicCommit = periodicCommitInfo.isDefined
val indexes = logicalPlan.indexUsage
Expand Down Expand Up @@ -106,7 +106,7 @@ object BuildEnterpriseInterpretedExecutionPlan extends Phase[EnterpriseRuntimeCo
override def isStale(lastTxId: () => Long, statistics: GraphStatistics): Boolean = fingerprint
.isStale(lastTxId, statistics)

override def runtimeUsed: RuntimeName = EnterpriseInterpretedRuntimeName
override def runtimeUsed: RuntimeName = SlottedRuntimeName

override def notifications(planContext: PlanContext): Seq[InternalNotification] =
BuildInterpretedExecutionPlan.checkForNotifications(pipe, planContext, config)
Expand Down
Expand Up @@ -46,13 +46,13 @@ object EnterpriseRuntimeBuilder extends RuntimeBuilder[Transformer[EnterpriseRun
case Some(InterpretedRuntimeName) =>
BuildInterpretedExecutionPlan

case Some(EnterpriseInterpretedRuntimeName) if useErrorsOverWarnings =>
case Some(SlottedRuntimeName) if useErrorsOverWarnings =>
BuildEnterpriseInterpretedExecutionPlan andThen
If[EnterpriseRuntimeContext, LogicalPlanState, CompilationState](_.maybeExecutionPlan.isEmpty) {
Do((_, _) => throw new InvalidArgumentException("The given query is not currently supported in the selected runtime"))
}

case Some(EnterpriseInterpretedRuntimeName) =>
case Some(SlottedRuntimeName) =>
BuildEnterpriseInterpretedExecutionPlan andThen
If[EnterpriseRuntimeContext, LogicalPlanState, CompilationState](_.maybeExecutionPlan.isEmpty) {
Do((_: EnterpriseRuntimeContext).notificationLogger.log(RuntimeUnsupportedNotification)) andThen
Expand Down
Expand Up @@ -19,7 +19,7 @@
*/
package org.neo4j.cypher

import org.neo4j.cypher.internal.compatibility.v3_3.runtime.{CompiledRuntimeName, EnterpriseInterpretedRuntimeName, InterpretedRuntimeName, RuntimeName}
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.{CompiledRuntimeName, SlottedRuntimeName, InterpretedRuntimeName, RuntimeName}
import org.neo4j.cypher.internal.compiler.v3_3._
import org.neo4j.cypher.internal.frontend.v3_3.PlannerName
import org.neo4j.cypher.internal.javacompat.PlanDescription
Expand All @@ -39,7 +39,7 @@ class RootPlanAcceptanceTest extends ExecutionEngineFunSuite {
.withCypherVersion(CypherVersion.v3_3)
.withRuntime(CompiledRuntimeName)
.shouldHaveCypherVersion(CypherVersion.v3_3)
.shouldHaveRuntime(EnterpriseInterpretedRuntimeName)
.shouldHaveRuntime(SlottedRuntimeName)
}

test("query that should go through the compiled runtime") {
Expand Down

0 comments on commit 78c9ee9

Please sign in to comment.