You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
array_append mishandles NULL values with non-empty offset ranges #25222
The result is computed from the input's offset ranges without considering the validity buffer; it is possible for the validity buffer to indicate that a value is NULL, in which case non-empty offsets are allowed but should be ignored.
To Reproduce
CREATETABLEtASVALUES ([1,2,3], [1,2,3], 1), ([4,5,6], [7], 2);
CREATEVIEWvASSELECT column3 AS id, column1 AS l, NULLIF(column1, column2) AS nl FROM t;
SELECT id, nl, array_append(nl, 9), array_prepend(9, nl) FROM v ORDER BY id;
-- row 1: nl = NULL → [1, 2, 3, 9] and [9, 1, 2, 3]-- expected (matches a true NULL input): [9] and [9]
Activity
fix: Ensure `array_append`, `array_prepend` handle NULLs correctly (a…
fix: Ensure `array_append`, `array_prepend` handle NULLs correctly (a…