cypher-for-gremlin icon indicating copy to clipboard operation
cypher-for-gremlin copied to clipboard

Support for temporal data

Open mad opened this issue 5 years ago • 4 comments

For support queries like this:

MATCH (n)
WITH datetime.truncate('day', n.date) as day
RETURN day, count(day)

Where n.date it is Date or Instant

https://neo4j.com/docs/cypher-manual/current/functions/#header-query-functions-temporal

mad avatar Jun 03 '19 16:06 mad

Hello @mad,

we have looked into implementing Temporal Types. It is possible but requires a significant amount of custom logic and lots of efforts to implement. So it is currently unsupported.

dwitry avatar Jun 04 '19 07:06 dwitry

@dwitry Can you provide an overview of the work that needs to be done for this? What is so special about temporal types that makes them particularly difficult to implement support for?

vldt avatar Aug 19 '19 18:08 vldt

Hello @vldt,

as Gremlin does not have any steps to work with dates, it would require implementation of Custom Functions and Predicates for all range of temporal data functionality.

It means (re) implementing in Java all operations like temporal creation, property access, arithmetics, comparison, etc.

TCK scenarios (see features starting with Temporal*) may give an overview of the amount of functionality supported in Cypher.

An additional limitation is that custom functions will not work on cloud implementations like Neptune and Cosmos DB.

dwitry avatar Aug 20 '19 07:08 dwitry

@dwitry , i think we should push tinkerpop to support this basic type, not by custom function

sandszhouSZ avatar Dec 10 '19 02:12 sandszhouSZ