Skip to content

append() drops every remaining argument when the first one is null, contradicting its own per-argument null skip #7028

Closed

Description

@ruispereira

Summary

append() skips a null argument when it appears anywhere except first, but drops every remaining argument when the FIRST one is null. The method contradicts its own per-argument null handling.

Repro

Measured at c50338bd8:

'x'.append(null,'A','B')     ->  "x"      A and B silently dropped
'x'.append('A',null,'B')     ->  "xAB"    the null is skipped, the rest appended

The second line establishes the intended contract: a null argument is skipped and the others are still appended. The first line breaks it - a leading null terminates the whole append.

Impact

append() over a set of optional values is the natural use - name.append(middle, last) where middle may be null. If the first optional value happens to be null, every later value is lost, and the result is a plausible-looking shorter string with no error. Whether a row is correct then depends on which of its optional columns happen to be populated.

Suggested fix

Make the first argument take the same path as the rest: continue past a null rather than returning. A test asserting 'x'.append(null,'A','B') == 'xAB' alongside the existing middle-null case pins both directions.

Scope / confidence

High - reproduced, with the contrasting case in the same run.

Activity

  1. added this to the 26.9.1 milestone on Sep 2, 2026
  2. added
    in progress
    on Sep 3, 2026
  3. self-assigned this
    on Sep 3, 2026
  4. lvca commented on Sep 3, 2026

    @lvca
    Member

    Fixed in #7092 (26.9.1). A null argument to append() is now skipped wherever it appears: 'x'.append(null, 'A', 'B') returns xAB, the same as 'x'.append('A', null, 'B').


    ❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.

  5. removed
    in progress
    on Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions