Skip to content

Commit 18e1a96

Browse files
committed
Fix Cypher's Operators and Add RETURN Clause Back
Cypher Operators were not being created correctly causing an error. Fix that issue and add back the RETURN stmt to the Grammar
1 parent d1069a8 commit 18e1a96

File tree

2 files changed

+346
-166
lines changed

2 files changed

+346
-166
lines changed

regress/expected/expr.out

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,45 +35,53 @@ USE GRAPH expr;
3535
-- a bunch of comparison operators
3636
--
3737
RETURN 1 = 1.0;
38-
ERROR: operator is not unique: postgraph.gtype = postgraph.gtype
39-
LINE 1: RETURN 1 = 1.0;
40-
^
41-
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
38+
?column?
39+
----------
40+
t
41+
(1 row)
42+
4243
RETURN 1 > -1.0;
43-
ERROR: operator is not unique: postgraph.gtype > postgraph.gtype
44-
LINE 1: RETURN 1 > -1.0;
45-
^
46-
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
44+
?column?
45+
----------
46+
t
47+
(1 row)
48+
4749
RETURN -1.0 < 1;
48-
ERROR: operator is not unique: postgraph.gtype < postgraph.gtype
49-
LINE 1: RETURN -1.0 < 1;
50-
^
51-
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
50+
?column?
51+
----------
52+
t
53+
(1 row)
54+
5255
RETURN 'aaa' < 'z';
53-
ERROR: operator is not unique: postgraph.gtype < postgraph.gtype
54-
LINE 1: RETURN 'aaa' < 'z';
55-
^
56-
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
56+
?column?
57+
----------
58+
t
59+
(1 row)
60+
5761
RETURN 'z' > 'aaa';
58-
ERROR: operator is not unique: postgraph.gtype > postgraph.gtype
59-
LINE 1: RETURN 'z' > 'aaa';
60-
^
61-
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
62+
?column?
63+
----------
64+
t
65+
(1 row)
66+
6267
RETURN false = false;
63-
ERROR: operator is not unique: postgraph.gtype = postgraph.gtype
64-
LINE 1: RETURN false = false;
65-
^
66-
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
68+
?column?
69+
----------
70+
t
71+
(1 row)
72+
6773
RETURN ('string' < true);
68-
ERROR: operator is not unique: postgraph.gtype < postgraph.gtype
69-
LINE 1: RETURN ('string' < true);
70-
^
71-
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
74+
?column?
75+
----------
76+
t
77+
(1 row)
78+
7279
RETURN true < 1;
73-
ERROR: operator is not unique: postgraph.gtype < postgraph.gtype
74-
LINE 1: RETURN true < 1;
75-
^
76-
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
80+
?column?
81+
----------
82+
t
83+
(1 row)
84+
7785
RETURN (1 + 1.0) = (7 % 5);
7886
?column?
7987
----------

0 commit comments

Comments
 (0)