Commit 11d51710 authored by Louise Söderström's avatar Louise Söderström
Browse files

Fixed error message for multiple relationship types

Now identical with old error message
parent 5bce2390
4.4 3.1 3.2 3.3 3.3-report-costs 3.4 3.5 3.5-compiled-expression 3.5-no-more-longarray-hashing 4.0 4.1 4.2 4.2-pipelined 4.3 5.0 5.1 5.2 akollegger-patch-1 issue-management-update revert-12892-feature/upd testwin/3.3-ref-from-slot-name testwin/3.4-failing-windows 5.2.0 5.1.0 5.0.0 4.4.14 4.4.13 4.4.12 4.4.11 4.4.10 4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.4.0-alpha01 4.3.21 4.3.20 4.3.19 4.3.18 4.3.17 4.3.16 4.3.15 4.3.14 4.3.13 4.3.12 4.3.11 4.3.10 4.3.9 4.3.8 4.3.7 4.3.6 4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.19 4.2.18 4.2.17 4.2.16 4.2.15 4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.1.7 4.1.6 4.1.5 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-alpha01 4.0.12 4.0.11 4.0.10 4.0.9 4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 4.0.0-rc01 4.0.0-beta03mr03 4.0.0-beta02 4.0.0-beta01 4.0.0-alpha10 4.0.0-alpha09mr02 4.0.0-alpha08 4.0.0-alpha07mr01 4.0.0-alpha06 4.0.0-alpha05 4.0.0-alpha04 4.0.0-alpha03 4.0.0-alpha02 4.0.0-alpha01 3.5.35 3.5.34 3.5.33 3.5.32 3.5.31 3.5.30 3.5.29 3.5.28 3.5.27 3.5.26 3.5.25 3.5.24 3.5.23 3.5.22 3.5.21 3.5.20 3.5.19 3.5.18 3.5.17 3.5.16 3.5.15 3.5.14 3.5.13 3.5.12 3.5.11 3.5.9 3.5.8 3.5.7 3.5.6 3.5.5 3.5.4 3.5.3 3.5.2 3.5.1 3.5.0 3.5.0-rc01 3.5.0-beta03 3.5.0-beta02 3.5.0-beta01 3.5.0-alpha09 3.5.0-alpha08 3.5.0-alpha07 3.5.0-alpha06 3.5.0-alpha05 3.5.0-alpha04 3.5.0-alpha02 3.5.0-alpha01 3.4.18 3.4.17 3.4.16 3.4.15 3.4.14 3.4.13 3.4.12 3.4.11 3.4.10 3.4.9 3.4.8 3.4.7 3.4.6 3.4.5 3.4.4 3.4.2 3.4.1 3.4.0 3.4.0-rc02 3.4.0-rc01 3.4.0-beta02 3.4.0-beta01 3.4.0-alpha10 3.4.0-alpha09 3.4.0-alpha08 3.4.0-alpha07 3.4.0-alpha06 3.4.0-alpha05 3.4.0-alpha04 3.4.0-alpha03 3.4.0-alpha02 3.4.0-alpha01 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 3.2.14 3.2.13 3.2.12 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 3.1.9 3.1.8
No related merge requests found
Showing with 5 additions and 5 deletions
+5 -5
......@@ -62,7 +62,7 @@ class HelpfulErrorMessagesTest extends ExecutionEngineFunSuite with NewPlannerTe
test("should provide sensible error message when trying to add multiple relationship types on create") {
withEachPlanner { execute =>
val exception = intercept[SyntaxException] (execute("CREATE (a)-[:ASSOCIATED_WITH|:KNOWS]->(b)", Seq.empty))
exception.getMessage should include("A single relationship type must be specified for CREATE.")
exception.getMessage should include("A single relationship type must be specified for CREATE")
}
}
......@@ -77,7 +77,7 @@ class HelpfulErrorMessagesTest extends ExecutionEngineFunSuite with NewPlannerTe
test("should provide sensible error message when trying to add multiple relationship types on merge") {
withEachPlanner { execute =>
val exception = intercept[SyntaxException] (execute("MERGE (a)-[:ASSOCIATED_WITH|:KNOWS]->(b)", Seq.empty))
exception.getMessage should include("A single relationship type must be specified for MERGE.")
exception.getMessage should include("A single relationship type must be specified for MERGE")
}
}
}
......@@ -217,7 +217,7 @@ case class Merge(pattern: Pattern, actions: Seq[MergeAction])(val position: Inpu
pattern.patternParts.foldSemanticCheck {
case EveryPath(RelationshipChain(_, rel, _)) if rel.types.size != 1 =>
if (rel.types.size > 1) {
SemanticError("A single relationship type must be specified for MERGE.", rel.position)
SemanticError("A single relationship type must be specified for MERGE", rel.position)
} else {
SemanticError("Exactly one relationship type must be specified for MERGE. Did you forget to prefix your relationship type with a ':'?", rel.position)
}
......@@ -235,7 +235,7 @@ case class Create(pattern: Pattern)(val position: InputPosition) extends UpdateC
pattern.patternParts.foldSemanticCheck {
case EveryPath(RelationshipChain(_, rel, _)) if rel.types.size != 1 =>
if (rel.types.size > 1) {
SemanticError("A single relationship type must be specified for CREATE.", rel.position)
SemanticError("A single relationship type must be specified for CREATE", rel.position)
} else {
SemanticError("Exactly one relationship type must be specified for CREATE. Did you forget to prefix your relationship type with a ':'?", rel.position)
}
......
......@@ -145,7 +145,7 @@ case class SpecSuiteErrorHandler(typ: String, phase: String, detail: String) ext
detail should equal(NON_CONSTANT_EXPRESSION)
else if (msg.matches("Can't use non-deterministic \\(random\\) functions inside of aggregate functions\\."))
detail should equal(NON_CONSTANT_EXPRESSION)
else if (msg.matches(semanticError("A single relationship type must be specified for ((CREATE)|(MERGE))\\.")) ||
else if (msg.matches(semanticError("A single relationship type must be specified for ((CREATE)|(MERGE))\\")) ||
msg.matches(semanticError("Exactly one relationship type must be specified for ((CREATE)|(MERGE))\\. " +
"Did you forget to prefix your relationship type with a \\'\\:\\'\\?")))
detail should equal(NO_SINGLE_RELATIONSHIP_TYPE)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment