Skip to content
TheChatArchiveThe Chat Archive
composer-2.5· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

Untitled conversation

  1. User

    [SQL] "expand" projection is always named "value" ignoring "AS" ArcadeDB Server v26.5.1 (build b6d08fee549dd5930303b362223869901aab0fac/1778533954349/main)

    Running on Linux 6.17.0-29-generic - OpenJDK 64-Bit Server VM 25.0.3-ea

    Using expand in a projection, the result-set contains an property named value inspite an alias of the form AS x:

    SELECT expand([1,2,3,4]) AS test
    

    results in:

    {"result":[{"value":1},{"value":2},{"value":3},{"value":4}]}
    

    Interface

    No new interfaces are introduced.

  2. Assistant

    I'll investigate how SQL expand projections handle aliases and fix the bug so AS is respected.

  3. Assistant

    Reproducing the bug, then applying fixes in ExpandStep and ProjectionItem.getExpandContent().

  4. Assistant

    The bug had two causes in the expand pipeline.

    Root cause

    1. ProjectionItem.getExpandContent() stripped the AS alias when the planner peeled off the expand() wrapper, so the inner projection was computed without the user-defined name.
    2. ExpandStep hardcoded "value" when wrapping primitive elements from an expanded collection, instead of using the projection property name.

    Fix

    1. Preserve alias in getExpandContent() so SELECT expand([1,2,3,4]) AS test projects under test.
    2. Track expandPropertyName in ExpandStep from the incoming row and use it when materializing each expanded primitive value.

    Verification

    Added shouldExpandInlineArrayWithAlias in ExpandStepTest. SELECT expand([1,2,3,4]) AS test now returns:

    {"result":[{"test":1},{"test":2},{"test":3},{"test":4}]}
    

    ExpandStepTest and ExpandParseTest both pass.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.