Hi I was wondering if I could suppress this warning, by either log suppression or by changing the query:
{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}
The query I run is this one, to capture changes from the change log:
WITH current_id
OPTIONAL CALL db.cdc.query($change_cursor_id,$selectors) YIELD id as log_id, metadata, event
WITH current_id, count(log_id) as result_size, collect({log_id:log_id, metadata: metadata, event:event}) as change_entries
RETURN current_id, CASE result_size WHEN 0 THEN [] ELSE change_entries END as change_entries, result_size
It results in:
╒══════════════════════════════════════════════════════════╤══════════════╤═══════════╕
│current_id │change_entries│result_size│
╞══════════════════════════════════════════════════════════╪══════════════╪═══════════╡
│"CUAL0JzdYEVUrmuTUcXh5sMAAAAAAAhyY3__________AAABlc3pfKQ="│[] │0 │
└──────────────────────────────────────────────────────────┴──────────────┴───────────┘
or if it finds changes:
Table
Text
Code
╒══════════════════════════════════════════════════════════╤══════════════════════════════════════════════════════════════════════╤═══════════╕
│current_id │change_entries │result_size│
╞══════════════════════════════════════════════════════════╪══════════════════════════════════════════════════════════════════════╪═══════════╡
│"CUAL0JzdYEVUrmuTUcXh5sMAAAAAAAhzwH__________AAABlc32tl4="│[{log_id: "CUAL0JzdYEVUrmuTUcXh5sMAAAAAAAhzwAAAAAAAAAAAAAABlc32tl4=", │1 │
│ │metadata: {txMetadata: {}, executingUser: "neo4j", databaseName: "csp"│ │
│ │, connectionClient: "10.28.92.237:41828", authenticatedUser: "neo4j", │ │
│ │captureMode: "DIFF", connectionServer: "10.28.98.90:7688", connectionT│ │
│ │ype: "bolt", serverId: "801b141c", txStartTime: "2025-03-25T15:40:52.6│ │
│ │87000000Z", txCommitTime: "2025-03-25T15:40:52.702000000Z"}, event: {e│ │
│ │lementId: "4:400bd09c-dd60-4554-ae6b-9351c5e1e6c3:21712449", keys: {},│ │
│ │ state: {before: {properties: {cursor: "CUAL0JzdYEVUrmuTUcXh5sMAAAAAAA│ │
│ │hzvn__________AAABlc32fuw="}, labels: []}, after: {properties: {cursor│ │
│ │: "CUAL0JzdYEVUrmuTUcXh5sMAAAAAAAhzv3__________AAABlc32hzI="}, labels:│ │
│ │ []}}, eventType: "n", operation: "u", labels: ["CspCdcChangeCursor"]}│ │
│ │}] │ │
└──────────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────┴───────────┘
I'm satisfied with the results, but I want to get rid of the warning.
In another recommendation I read not to use OPTIONAL CALL
but use CALL
but If I do that the query stops with zero rows. Anyone has an idea how to solve it without the warning that fills our logs?
The database version we have is:
╒══════════════╤════════╤════════════╕
│name │version │edition │
╞══════════════╪════════╪════════════╡
│"Neo4j Kernel"│"5.26.2"│"enterprise"│
└──────────────┴────────┴────────────┘
I'm using the python bolt driver to query the database.