We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue by jgaskins Saturday Mar 23, 2019 at 07:40 GMT Originally opened as neo4j-contrib/neo4j-apoc-procedures#1129
Specifying min or max as a grouping operator on a datetime property groups
min
max
datetime
Specifying min or max as a grouping operator on a datetime property results in an empty set.
I imagine this applies to other temporal types, as well, but I just happened to be using datetime when I discovered it.
First we create some nodes with datetime timestamps:
UNWIND range(1, 1000) AS minutes CREATE (:Foo { created_at: datetime({ year: 2019, month: 3, day: 23 }) - duration({minutes: minutes}) })
Then we truncate those timestamps to some level of granularity we'll be grouping on:
MATCH (foo:Foo) WHERE NOT exists(foo.created_at_hour) SET foo.created_at_hour = datetime.truncate('hour', foo.created_at)
[Query 1]
CALL apoc.nodes.group(['Foo'], ['created_at_hour'], [{}]) YIELD node RETURN node
[Query 2]
CALL apoc.nodes.group(['Foo'], ['created_at_hour'], [{ created_at: 'min' }]) YIELD node RETURN node
Currently used versions
The text was updated successfully, but these errors were encountered:
Comment by jexp Saturday Mar 23, 2019 at 07:45 GMT
Good find, I guess it was because it was implemented before those datatypes were added.
Sorry, something went wrong.
No branches or pull requests
Issue by jgaskins
Saturday Mar 23, 2019 at 07:40 GMT
Originally opened as neo4j-contrib/neo4j-apoc-procedures#1129
Expected Behavior (Mandatory)
Specifying
min
ormax
as a grouping operator on adatetime
property groupsActual Behavior (Mandatory)
Specifying
min
ormax
as a grouping operator on adatetime
property results in an empty set.I imagine this applies to other temporal types, as well, but I just happened to be using
datetime
when I discovered it.How to Reproduce the Problem
Simple Dataset (where it's possibile)
First we create some nodes with
datetime
timestamps:Then we truncate those timestamps to some level of granularity we'll be grouping on:
Steps (Mandatory)
datetime
properties, no data is returned[Query 1]
[Query 2]
Screenshots (where it's possibile)
Specifications (Mandatory)
Currently used versions
Versions
The text was updated successfully, but these errors were encountered: