Skip to content

arrayMap(x -> x + 1, [1, 2, 3]) returns wrong result #16

Closed
@l1t1

Description

@l1t1

it should return [2,3,4], rather than [1,4,9], others also wrong

D SELECT arrayMap(x -> x + 1, [1, 2, 3]); 
┌────────────────────────────────────────────────────┐
│ arraymap((x -> (x + 1)), main.list_value(1, 2, 3)) │
│                      int32[]                       │
├────────────────────────────────────────────────────┤
│ [1, 4, 9]                                          │
└────────────────────────────────────────────────────┘
D SELECT arrayMap(x -> x -1, [1, 2, 3]); --also wrong
┌────────────────────────────────────────────────────┐
│ arraymap((x -> (x - 1)), main.list_value(1, 2, 3)) │
│                      int32[]                       │
├────────────────────────────────────────────────────┤
│ [1, 4, 9]                                          │
└────────────────────────────────────────────────────┘
D SELECT arrayMap(x -> x, [1, 2, 3]); --also wrong
┌──────────────────────────────────────────────┐
│ arraymap((x -> x), main.list_value(1, 2, 3)) │
│                   int32[]                    │
├──────────────────────────────────────────────┤
│ [1, 4, 9]                                    │
└──────────────────────────────────────────────┘

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions