MuhammadTahaNaveed opened a new pull request, #2405:
URL: https://github.com/apache/age/pull/2405

   The scalar branch of agtype_add lacked an AGTV_NULL case and fell through to 
the scalar-scalar concat path, so `null + 1` produced the two-element list 
`[null, 1]` instead of null. This surfaced most visibly inside a list 
comprehension projection (e.g. `[x IN [1, null, 2] | x + 1]` yielded `[2, 
[null, 1], 3]`) because there both operands are typed agtype and bypass the 
agtype_any_add wrapper that already short-circuits on null.
   
   The sibling operators (-, *, /, %, ^, unary -) had the same gap but surfaced 
as "Invalid input parameter types" errors rather than concats.
   
   Short-circuit all seven functions to SQL NULL when any operand is AGTV_NULL. 
SQL NULL (not a wrapped AGTV_NULL scalar) matches AGE's existing convention: 
`RETURN null AS v` already yields SQL NULL at the row level, and agtype_any_add 
already returns PG NULL for AGTV_NULL input, so the two operator-resolution 
paths stay indistinguishable. List aggregation re-packs SQL NULL entries as 
AGTV_NULL, so `[x IN [1, null, 2] | x + 1]` now renders as `[2, null, 3]`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to