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 — allReduce(...) may evaluate true cases as false · Issue #4043 · ArcadeData/arcadedb Closed DescriptionArcadeDB version
Environment
Describe the bug In the minimized repro below, the accumulator takes values To Reproduce Query: RETURN allReduce(acc = 0, x IN [1, 2, 3] | acc + x, x > 0) AS result; Expected behavior Actual behavior Control cases Plain RETURN reduce(acc = 0, x IN [1, 2, 3] | acc + x) AS total; Observed result: Plain RETURN all(x IN [1, 2, 3] WHERE x > 0) AS result; Observed result: So the issue is not a general Additional controls If the predicate is actually false for every iteration, both engines return RETURN allReduce(acc = 0, x IN [1, 2, 3] | acc + x, x > 10) AS result; Observed result on both engines: If the list is empty, Neo4j returns vacuous truth, but ArcadeDB still returns RETURN allReduce(acc = 0, x IN [] | acc + x, x > 0) AS result; Observed results:
This suggests ArcadeDB may be using the wrong default truth value for If the predicate depends on the accumulator instead, both engines can still agree: RETURN allReduce(acc = 0, x IN [1, 2, 3] | acc + x, acc >= 0) AS result; Observed result on both engines: So the failure is not that 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. |