Skip to content

Timestamp values are deserialized into Integer #72

@xujiaxj

Description

@xujiaxj

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions