nebula icon indicating copy to clipboard operation
nebula copied to clipboard

Refine DOT operator

Open czpmango opened this issue 2 years ago • 1 comments

Describe the bug (required) The usage of DOT operator in the cypher standard is to access the property of a node, relationship or literal map, but our implementation has a lot of inconsistencies with this. For example:

  1. v.player.age This notation actually expands the semantics of DOT for taking tags and even specifying tags, which is obscure and ambiguous. Better to use v:player.age or reconsider the conceptual distinction between tag and label, but the compatibility impact needs to be carefully evaluated.
  2. Error handling
(root@nebula) [nba]> match (v:player) with collect(v) as vs return vs.player.name
+----------------+
| vs.player.name |
+----------------+
| BAD_TYPE       |
+----------------+
(root@nebula) [nba]> match (v:player) with collect(v) as vs unwind vs as v return v.player.name
+---------------+
| v.player.name |
+---------------+
| BAD_TYPE      |
| BAD_TYPE      |
| BAD_TYPE      |
| BAD_TYPE      |
| BAD_TYPE      |
| BAD_TYPE      |
| BAD_TYPE      |
+----------------+

We need to recognize the essential difference between compile-time errors and run-time errors.

More detail please refer to cypher standard.

czpmango avatar Jan 05 '23 04:01 czpmango

Considering the amount of work, better to fix it in later version after v3.5.

dutor avatar Mar 30 '23 09:03 dutor