Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Statements of version 2.0.1 are not compatible in version 2.5.0 #1329

Closed
foesa-yang opened this issue Aug 19, 2021 · 4 comments
Closed

Statements of version 2.0.1 are not compatible in version 2.5.0 #1329

foesa-yang opened this issue Aug 19, 2021 · 4 comments
Labels
bug Type: something is unexpected incompatible PR: incompatible with the master branches in the storage or common repos

Comments

@foesa-yang
Copy link

In Nebula Graph version v2.5.0:

(root@nebula) [basketballplayer]> LOOKUP ON player \
                               ->         YIELD player.age As playerage \
                               ->         | GROUP BY $-.playerage \
                               ->         YIELD $-.playerage as age, count(*) AS number \
                               ->         | ORDER BY number DESC, age DESC;

[ERROR (-1009)]: SemanticError: Order by with invalid expression `number'

But in Nebula Graph version v2.0.1 the result is the follows:

(root@nebula) [basketballplayer]> LOOKUP ON player \
                               ->         YIELD player.age As playerage \
                               ->         | GROUP BY $-.playerage \
                               ->         YIELD $-.playerage as age, count(*) AS number \
                               ->         | ORDER BY number DESC, age DESC;
+-----+--------+
| age | number |
+-----+--------+
| 34  | 4      |
+-----+--------+
| 33  | 4      |
+-----+--------+
| 30  | 4      |
+-----+--------+
...
@whitewum whitewum added the bug Type: something is unexpected label Aug 20, 2021
@czpmango
Copy link
Contributor

(czp@nebula) [basketballplayer]> LOOKUP ON player \
                               ->         YIELD player.age As playerage \
                               ->         | GROUP BY $-.playerage \
                               ->         YIELD $-.playerage as age, count(*) AS number \
                               ->         | ORDER BY number DESC, age DESC;

[ERROR (-1009)]: SemanticError: Order by with invalid expression `number'

The above is the expected behavior in version 2.5. Only $-. can be used to refer to the variable in front of the pipe, this is my test in version 2.5:

(czp@nebula) [basketballplayer]> LOOKUP ON player \
                               ->         YIELD player.age As playerage \
                               ->         | GROUP BY $-.playerage \
                               ->         YIELD $-.playerage as age, count(*) AS number \
                               ->         | ORDER BY $-.number DESC, $-.age DESC;
+-----+--------+
| age | number |
+-----+--------+
| 34  | 4      |
+-----+--------+
| 33  | 4      |
+-----+--------+
| 30  | 4      |
+-----+--------+
...

Thanks for your careful test. Closing but feel free to ask if anything.

@whitewum
Copy link
Contributor

@Sophie-Xie
please confirm this behavior change.
It's not written in the release note.

@whitewum whitewum added the incompatible PR: incompatible with the master branches in the storage or common repos label Aug 23, 2021
@whitewum whitewum reopened this Aug 23, 2021
@Sophie-Xie
Copy link
Contributor

Sophie-Xie commented Aug 23, 2021

@CPWstatic
Copy link
Contributor

Sorry for this incompatible. I'll close this issue firstly, since we had announce the change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Type: something is unexpected incompatible PR: incompatible with the master branches in the storage or common repos
Projects
None yet
Development

No branches or pull requests

5 participants