GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — List subscript with an inline aggregate index may return null · Issue #4100 · ArcadeData/arcadedb Closed DescriptionArcadeDB version
Environment
Describe the bug
In the minimized repro below, Neo4j returns the first score ( To Reproduce Setup: CREATE (:Person {name:'Alice', scores:[85,92,78]}); Query: MATCH (p:Person {name:'Alice'}) OPTIONAL MATCH (p)-[:HAS_FRIEND]->(f:Person) WITH p, collect(f) AS friends RETURN p AS person, p.scores[toInteger(avg(size(friends)))] AS selectedScore; Expected behavior
So the query should return the first score: Observed Neo4j result: Actual behavior Control query 1 MATCH (p:Person {name:'Alice'}) OPTIONAL MATCH (p)-[:HAS_FRIEND]->(f:Person) WITH p, collect(f) AS friends WITH p, toInteger(avg(size(friends))) AS idx RETURN p AS person, p.scores[idx] AS selectedScore, idx; Observed result on both Neo4j and ArcadeDB: So the aggregate expression itself is not the problem. Control query 2 MATCH (p:Person {name:'Alice'}) OPTIONAL MATCH (p)-[:HAS_FRIEND]->(f:Person) WITH p, collect(f) AS friends RETURN p AS person, p.scores[size(friends)] AS selectedScore; Observed result on both Neo4j and ArcadeDB: This makes the boundary clearer: the failure is tied to using the aggregate expression inline inside the list subscript. Activity
MetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |