Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update functions and expressions #629

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ double radians() | Converts degrees to radians. `radians(180)` returns `3.141592
## Example

```ngql
# The following clause supports aggregate functions.
# The following statement supports aggregate functions.
nebula> GO FROM "Tim Duncan" OVER like YIELD like._dst AS dst, $$.player.age AS age \
| GROUP BY $-.dst \
YIELD \
Expand Down
3 changes: 1 addition & 2 deletions docs-2.0/3.ngql-guide/6.functions-and-expressions/12.hash.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

The `hash()` function returns the hash value of the argument. The argument can be a number, a string, a list, a boolean, null, or an expression that evaluates to a value of the preceding data types.

The source code of the `hash()` function (MurmurHash2), seed (`0xc70f6907UL`), and other parameters can be found in [`MurmurHahs2.h`](https://github.com/vesoft-inc/nebula-common/blob/master/src/common/base/MurmurHash2.h).

The source code of the `hash()` function (MurmurHash2), seed (`0xc70f6907UL`), and other parameters can be found in [`MurmurHash2.h`](https://github.com/vesoft-inc/nebula/blob/master/src/common/base/MurmurHash2.h).

For Java, the hash function operates as follows.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ The `date()`, `time()`, and `datetime()` functions accept three kind of paramete
## Examples

```ngql
> RETURN now(), timestamp(), date(), time(), datetime(), timestamp();
> RETURN now(), timestamp(), date(), time(), datetime();
+------------+-------------+------------+-----------------+----------------------------+
| now() | timestamp() | date() | time() | datetime() |
+------------+-------------+------------+-----------------+----------------------------+
| 1625470028 | 1625470028 | 2021-07-05 | 07:27:07.944000 | 2021-07-05T07:27:07.944000 |
+------------+-------------+------------+-----------------+----------------------------+
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ nebula> MATCH p = (a:player)-[]->(b)-[]->(c:team) \
| [("player100" :player{age: 42, name: "Tim Duncan"}), ("player125" :player{age: 41, name: "Manu Ginobili"}), ("team204" :team{name: "Spurs"})] |
+-----------------------------------------------------------------------------------------------------------------------------------------------+

nebula> MATCH p = (a:player)-[]->(b)-[]->(c:team) WHERE a.name == "Tim Duncan" AND c.name == "Spurs" RETURN relationships(p)
nebula> MATCH p = (a:player)-[]->(b)-[]->(c:team) WHERE a.name == "Tim Duncan" AND c.name == "Spurs" RETURN relationships(p);
+-----------------------------------------------------------------------------------------------------------------------------+
| relationships(p) |
+-----------------------------------------------------------------------------------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ nebula> LOOKUP ON player \
YIELD player.age As playerage \
| GROUP BY $-.playerage \
YIELD $-.playerage as age, count(*) AS number \
| ORDER BY number DESC, age DESC;
| ORDER BY $-.number DESC, $-.age DESC;
+-----+--------+
| age | number |
+-----+--------+
Expand Down