You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by jg...@apache.org on 2021/12/22 19:46:02 UTC
[incubator-age] branch master updated: Add test for handling incorrect variable in Set Clause (#160 #165) (#167)
This is an automated email from the ASF dual-hosted git repository.
jgemignani pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-age.git
The following commit(s) were added to refs/heads/master by this push:
new 39c7af0 Add test for handling incorrect variable in Set Clause (#160 #165) (#167)
39c7af0 is described below
commit 39c7af008298bd61b962beef343b326f89d4ec29
Author: Pieterjan De Potter <pi...@ugent.be>
AuthorDate: Wed Dec 22 20:45:53 2021 +0100
Add test for handling incorrect variable in Set Clause (#160 #165) (#167)
---
regress/expected/cypher_set.out | 4 ++++
regress/sql/cypher_set.sql | 2 ++
2 files changed, 6 insertions(+)
diff --git a/regress/expected/cypher_set.out b/regress/expected/cypher_set.out
index 2011645..aa5d8a6 100644
--- a/regress/expected/cypher_set.out
+++ b/regress/expected/cypher_set.out
@@ -373,6 +373,10 @@ SELECT * FROM cypher('cypher_set', $$MATCH (n) SET wrong_var.i = 3$$) AS (a agty
ERROR: undefined reference to variable wrong_var in SET clause
LINE 1: ...ELECT * FROM cypher('cypher_set', $$MATCH (n) SET wrong_var....
^
+SELECT * FROM cypher('cypher_set', $$MATCH (n) SET i = 3$$) AS (a agtype);
+ERROR: SET clause expects a variable name
+LINE 1: ...ELECT * FROM cypher('cypher_set', $$MATCH (n) SET i = 3$$) A...
+ ^
--
-- SET refactor regression tests
--
diff --git a/regress/sql/cypher_set.sql b/regress/sql/cypher_set.sql
index e03e45a..f3b762f 100644
--- a/regress/sql/cypher_set.sql
+++ b/regress/sql/cypher_set.sql
@@ -133,6 +133,8 @@ SELECT * FROM cypher('cypher_set', $$SET n.i = NULL$$) AS (a agtype);
SELECT * FROM cypher('cypher_set', $$MATCH (n) SET wrong_var.i = 3$$) AS (a agtype);
+SELECT * FROM cypher('cypher_set', $$MATCH (n) SET i = 3$$) AS (a agtype);
+
--
-- SET refactor regression tests
--