cypher-for-gremlin
cypher-for-gremlin copied to clipboard
Support for temporal data
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
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 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?
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 , i think we should push tinkerpop to support this basic type, not by custom function