Skip to content

Commit

Permalink
Moved compiled_runtime to runtime.compiled
Browse files Browse the repository at this point in the history
  • Loading branch information
systay committed Jun 28, 2017
1 parent 29022c2 commit 0c5fb58
Show file tree
Hide file tree
Showing 102 changed files with 319 additions and 318 deletions.
Expand Up @@ -19,7 +19,7 @@
*/
package org.neo4j.cypher.internal.v3_3.codegen;

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.QueryExecutionEvent;
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.QueryExecutionEvent;
import org.neo4j.cypher.internal.compiler.v3_3.planDescription.Id;

public interface QueryExecutionTracer
Expand Down
Expand Up @@ -22,7 +22,7 @@
import java.util.HashMap;
import java.util.Map;

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.QueryExecutionEvent;
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.QueryExecutionEvent;
import org.neo4j.cypher.internal.compiler.v3_3.planDescription.Id;
import org.neo4j.cypher.internal.compiler.v3_3.spi.KernelStatisticProvider;
import org.neo4j.cypher.internal.v3_3.codegen.QueryExecutionTracer;
Expand Down
Expand Up @@ -19,7 +19,7 @@
*/
package org.neo4j.cypher.internal

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.EnterpriseRuntimeContextCreator
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.EnterpriseRuntimeContextCreator
import org.neo4j.cypher.internal.compatibility.v3_3.{Compatibility, CostCompatibility}
import org.neo4j.cypher.internal.compatibility.{v2_3, v3_1, v3_2}
import org.neo4j.cypher.internal.compiler.v3_3._
Expand Down
Expand Up @@ -19,38 +19,39 @@
*/
package org.neo4j.cypher.internal

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.{BuildCompiledExecutionPlan, EnterpriseRuntimeContext}
import org.neo4j.cypher.internal.compatibility.v3_3.runtime._
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.{BuildCompiledExecutionPlan, EnterpriseRuntimeContext}
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.phases.CompilationState
import org.neo4j.cypher.internal.compiler.v3_3.phases.LogicalPlanState
import org.neo4j.cypher.internal.frontend.v3_3.InvalidArgumentException
import org.neo4j.cypher.internal.frontend.v3_3.notification.RuntimeUnsupportedNotification
import org.neo4j.cypher.internal.frontend.v3_3.phases.{Do, If, Transformer}

object EnterpriseRuntimeBuilder extends RuntimeBuilder[Transformer[EnterpriseRuntimeContext, LogicalPlanState, CompilationState]] {
def create(runtimeName: Option[RuntimeName], useErrorsOverWarnings: Boolean): Transformer[EnterpriseRuntimeContext, LogicalPlanState, CompilationState] = runtimeName match {
case None =>
BuildCompiledExecutionPlan andThen
If[EnterpriseRuntimeContext, LogicalPlanState, CompilationState](_.maybeExecutionPlan.isEmpty) {
BuildInterpretedExecutionPlan
}
def create(runtimeName: Option[RuntimeName], useErrorsOverWarnings: Boolean): Transformer[EnterpriseRuntimeContext, LogicalPlanState, CompilationState] =
runtimeName match {
case None =>
BuildCompiledExecutionPlan andThen
If[EnterpriseRuntimeContext, LogicalPlanState, CompilationState](_.maybeExecutionPlan.isEmpty) {
BuildInterpretedExecutionPlan
}

case Some(InterpretedRuntimeName) =>
BuildInterpretedExecutionPlan
case Some(InterpretedRuntimeName) =>
BuildInterpretedExecutionPlan

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

case Some(CompiledRuntimeName) =>
BuildCompiledExecutionPlan andThen
If[EnterpriseRuntimeContext, LogicalPlanState, CompilationState](_.maybeExecutionPlan.isEmpty)(
Do((_: EnterpriseRuntimeContext).notificationLogger.log(RuntimeUnsupportedNotification)) andThen
BuildInterpretedExecutionPlan
)
case Some(CompiledRuntimeName) =>
BuildCompiledExecutionPlan andThen
If[EnterpriseRuntimeContext, LogicalPlanState, CompilationState](_.maybeExecutionPlan.isEmpty)(
Do((_: EnterpriseRuntimeContext).notificationLogger.log(RuntimeUnsupportedNotification)) andThen
BuildInterpretedExecutionPlan
)

case Some(x) => throw new InvalidArgumentException(s"This version of Neo4j does not support requested runtime: $x")
}
case Some(x) => throw new InvalidArgumentException(s"This version of Neo4j does not support requested runtime: $x")
}
}
Expand Up @@ -17,10 +17,10 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.ExecutionPlanBuilder.DescriptionProvider
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen._
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.ExecutionPlanBuilder.DescriptionProvider
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen._
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.executionplan._
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.phases.CompilationState
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.{TaskCloser, _}
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled

import java.util

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled

import org.neo4j.cypher.internal.compatibility.v3_3.runtime.phases.CompilationState
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.{CompiledRuntimeName, _}
Expand Down
Expand Up @@ -17,12 +17,12 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled

import java.time.Clock

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.spi.CodeStructure
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.CommunityRuntimeContext
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.spi.CodeStructure
import org.neo4j.cypher.internal.compiler.v3_3.planner.logical.{ExpressionEvaluator, Metrics, MetricsFactory, QueryGraphSolver}
import org.neo4j.cypher.internal.compiler.v3_3.spi.PlanContext
import org.neo4j.cypher.internal.compiler.v3_3.{ContextCreator, CypherCompilerConfiguration, SyntaxExceptionCreator, UpdateStrategy}
Expand Down Expand Up @@ -71,4 +71,4 @@ case class EnterpriseRuntimeContextCreator(codeStructure: CodeStructure[Generate
new EnterpriseRuntimeContext(exceptionCreator, tracer, notificationLogger, planContext,
monitors, metrics, config, queryGraphSolver, updateStrategy, debugOptions, clock, codeStructure)
}
}
}
Expand Up @@ -17,9 +17,9 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.ExecutionPlanBuilder.DescriptionProvider
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.ExecutionPlanBuilder.DescriptionProvider
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.executionplan.{InternalExecutionResult, PeriodicCommitInfo, PlanFingerprint, Provider}
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.{ExecutionMode, ProfileMode, TaskCloser}
import org.neo4j.cypher.internal.compiler.v3_3.planDescription.InternalPlanDescription
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen

import java.nio.file.{Path, Paths}

Expand Down
Expand Up @@ -17,10 +17,10 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir.JoinData
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir.expressions.CodeGenType
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir.JoinData
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir.expressions.CodeGenType
import org.neo4j.cypher.internal.compiler.v3_3.planDescription.Id
import org.neo4j.cypher.internal.compiler.v3_3.planner.logical.plans.LogicalPlan
import org.neo4j.cypher.internal.frontend.v3_3.SemanticTable
Expand Down
Expand Up @@ -17,10 +17,10 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir.Instruction
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.spi.JoinTableType
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir.Instruction
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.spi.JoinTableType
import org.neo4j.cypher.internal.compiler.v3_3.planner.logical.plans.LogicalPlan

trait CodeGenPlan {
Expand Down
Expand Up @@ -17,15 +17,15 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen

import java.time.Clock
import java.util

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.ExecutionPlanBuilder.DescriptionProvider
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir._
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.spi.{CodeStructure, CodeStructureResult}
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.{CompiledExecutionResult, CompiledPlan, RunnablePlan}
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.ExecutionPlanBuilder.DescriptionProvider
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir._
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.spi.{CodeStructure, CodeStructureResult}
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.{CompiledExecutionResult, CompiledPlan, RunnablePlan}
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.executionplan.{InternalExecutionResult, PlanFingerprint, Provider}
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.{ExecutionMode, TaskCloser}
import org.neo4j.cypher.internal.compiler.v3_3.planDescription.{Id, InternalPlanDescription}
Expand Down
Expand Up @@ -17,12 +17,12 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir._
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir.aggregation.AggregationConverter.aggregateExpressionConverter
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir.expressions._
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.spi.SortItem
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir._
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir.aggregation.AggregationConverter.aggregateExpressionConverter
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir.expressions._
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.spi.SortItem
import org.neo4j.cypher.internal.compiler.v3_3.helpers.{One, ZeroOneOrMany}
import org.neo4j.cypher.internal.compiler.v3_3.planner.logical.plans._
import org.neo4j.cypher.internal.compiler.v3_3.planner.logical.{SortDescription, plans}
Expand All @@ -33,7 +33,7 @@ import org.neo4j.cypher.internal.frontend.v3_3.{InternalException, ast, symbols}
import org.neo4j.cypher.internal.frontend.v3_3.Foldable._
import org.neo4j.cypher.internal.ir.v3_3.IdName
import ExpressionConverter.createExpression
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir.aggregation.Distinct
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir.aggregation.Distinct

object LogicalPlanConverter {

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen

import java.util.concurrent.atomic.AtomicInteger

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen;
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen;

public interface QueryExecutionEvent extends AutoCloseable
{
Expand Down
Expand Up @@ -17,11 +17,11 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.CodeGenContext
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir.expressions.CodeGenExpression
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.spi.MethodStructure
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.CodeGenContext
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir.expressions.CodeGenExpression
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.spi.MethodStructure

case class AcceptVisitor(produceResultOpName: String, columns: Map[String, CodeGenExpression])
extends Instruction {
Expand Down
Expand Up @@ -17,11 +17,11 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.CodeGenContext
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir.aggregation.AggregateExpression
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.spi.MethodStructure
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.CodeGenContext
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir.aggregation.AggregateExpression
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.spi.MethodStructure

case class AggregationInstruction(opName: String, aggregationFunctions: Iterable[AggregateExpression])
extends Instruction {
Expand Down
Expand Up @@ -17,10 +17,10 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen._
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.spi._
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen._
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.spi._

sealed trait BuildProbeTable extends Instruction {

Expand Down
Expand Up @@ -17,11 +17,11 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen._
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir.expressions.CodeGenExpression
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.spi._
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen._
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir.expressions.CodeGenExpression
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.spi._

case class BuildSortTable(opName: String, tableName: String, columnVariables: Map[String, Variable],
sortItems: Iterable[SortItem], estimateCardinality: Double)
Expand Down
Expand Up @@ -17,10 +17,10 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.ir
package org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.ir

import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.CodeGenContext
import org.neo4j.cypher.internal.compatibility.v3_3.compiled_runtime.codegen.spi.MethodStructure
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.CodeGenContext
import org.neo4j.cypher.internal.compatibility.v3_3.runtime.compiled.codegen.spi.MethodStructure

case class CartesianProductInstruction(id: String, instruction: Instruction) extends Instruction {

Expand Down

0 comments on commit 0c5fb58

Please sign in to comment.