I am getting this warning and not sure how to proceed
Received notification from DBMS server: {severity: WARNING} {code: Neo.ClientNotification.Statement.AggregationSkippedNull} {category: UNRECOGNIZED} {title: The query contains an aggregation function that skips null values.} {description: null value eliminated in set function.} {position: None} for query: "\n UNWIND $updates AS update\n MATCH (d:Domain)\n WHERE elementId(d) = update.element_id AND d.checked_out_by = $process_id\n\n // Unset the checked_out flags\n SET d.checked_out = FALSE, d.checked_out_by = NULL, d.checked_out_at = NULL\n WITH d, update\n\n // Find the latest status event per domain\n OPTIONAL MATCH (d)-[:HAS_STATUS]->(s:StatusEvent)\n WITH d, s, update\n\n OPTIONAL MATCH (d)-[:HAS_STATUS]->(s:StatusEvent)\n ORDER BY s.checkedAt DESC\n WITH d, collect(s) AS statuses, update\n\n // Handle the case where statuses might be empty\n WITH d, \n CASE WHEN size(statuses) > 0 THEN statuses[0] ELSE NULL END AS latestStatus, \n update\n\n // Decide whether to update the existing status or create a new one\n FOREACH (_ IN CASE \n WHEN update.new_status = 'Unknown' AND latestStatus IS NOT NULL AND latestStatus.status = 'Unknown' THEN [1] \n WHEN latestStatus IS NOT NULL AND latestStatus.status = update.new_status THEN [1] \n ELSE [] \n END | \n SET latestStatus.checkedAt = date()\n )\n\n // Create a new 'StatusEvent' if necessary\n FOREACH (_ IN CASE \n WHEN latestStatus IS NULL OR (latestStatus IS NOT NULL AND latestStatus.status <> update.new_status AND update.new_status <> 'Unknown') THEN [1] \n ELSE [] \n END | \n CREATE (newStatus:StatusEvent {status: update.new_status, checkedAt: date()})\n CREATE (d)-[:HAS_STATUS]->(newStatus)\n )\n\n // Return the updated domain information\n RETURN d.url AS domain, \n update.new_status AS new_status, \n date() AS last_checked\n\n "
Here's the exact query
UNWIND $updates AS update
MATCH (d:Domain)
WHERE elementId(d) = update.element_id AND d.checked_out_by = $process_id
// Unset the checked_out flags
SET d.checked_out = FALSE, d.checked_out_by = NULL, d.checked_out_at = NULL
WITH d, update
// Find the latest status event per domain
OPTIONAL MATCH (d)-[:HAS_STATUS]->(s:StatusEvent)
WITH d, s, update
OPTIONAL MATCH (d)-[:HAS_STATUS]->(s:StatusEvent)
ORDER BY s.checkedAt DESC
WITH d, collect(s) AS statuses, update
// Handle the case where statuses might be empty
WITH d,
CASE WHEN size(statuses) > 0 THEN statuses[0] ELSE NULL END AS latestStatus,
update
// Decide whether to update the existing status or create a new one
FOREACH (_ IN CASE
WHEN update.new_status = 'Unknown' AND latestStatus IS NOT NULL AND latestStatus.status = 'Unknown' THEN [1]
WHEN latestStatus IS NOT NULL AND latestStatus.status = update.new_status THEN [1]
ELSE []
END |
SET latestStatus.checkedAt = date()
)
// Create a new 'StatusEvent' if necessary
FOREACH (_ IN CASE
WHEN latestStatus IS NULL OR (latestStatus IS NOT NULL AND latestStatus.status <> update.new_status AND update.new_status <> 'Unknown') THEN [1]
ELSE []
END |
CREATE (newStatus:StatusEvent {status: update.new_status, checkedAt: date()})
CREATE (d)-[:HAS_STATUS]->(newStatus)
)
// Return the updated domain information
RETURN d.url AS domain,
update.new_status AS new_status,
date() AS last_checked
Please keep the following things in mind:
neo4j --version
5.24.0
I am using no plugins just the browsers and some scripts to communicate via python.
I am not sure if that warning is severe, is it possible to rework the query not give warnings?