Is there a bug with UINT?


According to the docs the max value of UINT is 18446744073709551615.

However when I try to store the max value in an UINT type it maxes out at 9223372036854775807.

Here is my simple query.

CREATE QUERY addPerson(UINT number) FOR GRAPH Test {
INSERT INTO Person (PRIMARY_ID, bigNumber) VALUES (number, number);

The Person vertex has a primary key of type UNIT which checked off as an attribute. The bigNumber attribute is also of type UINT. When I call this query the id becomes 9223372036854775807 and the bigNumber attribute is rounded to 9223372036854776000.

Is this a bug? Can someone explain what’s going on? Thx!


@alvinchan checking with the team regarding question above.

After experimenting a bit I think I know why this is happening. I am using Graph Studio and running the query in interpreted mode. Since the browser is running javascript it is only has integer precision to 2^53-1. So I think javascript is screwing up either the input or output or both.

Can you please let me know the GSQL query for this type of use case
To know the list of movies where Tom Cruise not worked

suppose we have an edge between Actor and Movie (worked_in)

Movies = {Movie.*};
Tom = SELECT a FROM Actor:a WHERE a.firstName == ‘Tom’ and a.lastName == ‘Cruise’;
TomsMovies = SELECT m FROM Tom -(worked_in>) - Movie:m;
NotTom = Movies MINUS TomsMovies;

1 Like

Thanks, @markmegerian! @pkr2 if you use this query just make sure that you signify SYNTAX v2 in the create statement.

1 Like