Steps to reproduce:
- run a Cypher query to create a node, with a timestamp property created like
MERGE (n:Foo) ON CREATE SET n.created=timestamp()
- If you check out the graph in RedisInsight, you can see the
created being a Unix timestamp
- If you use JRedisGraph client to retrieve the node, you will notice that the
created property is deserialized into an integer. Because a 64-bit Unix timestamp cannot fit into a 32-bit Java integer, it overflows and yields some strange integer values.
RedisGraph says the numeric types could be either 64-bit doubles and 64-bit signed integer. In Java, 64-bit signed Integer should be Long, instead of Integer. The ResultSetScalarTypes should really contain VALUE_LONG instead of VALUE_INTEGER. Likewise, In ResultSetImpl#deserializeScalar, we shouldn't cast the Long to an Integer.
Steps to reproduce:
MERGE (n:Foo) ON CREATE SET n.created=timestamp()createdbeing a Unix timestampcreatedproperty is deserialized into an integer. Because a 64-bit Unix timestamp cannot fit into a 32-bit Java integer, it overflows and yields some strange integer values.RedisGraph says the numeric types could be either 64-bit doubles and 64-bit signed integer. In Java, 64-bit signed Integer should be
Long, instead ofInteger. The ResultSetScalarTypes should really containVALUE_LONGinstead ofVALUE_INTEGER. Likewise, In ResultSetImpl#deserializeScalar, we shouldn't cast the Long to an Integer.