asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Jacobs (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (ASTERIXDB-1608) Unexpected result from a join with a Non-Pure function
Date Tue, 29 Nov 2016 18:12:58 GMT

     [ https://issues.apache.org/jira/browse/ASTERIXDB-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Steven Jacobs closed ASTERIXDB-1608.
------------------------------------
    Resolution: Fixed

> Unexpected result from a join with a Non-Pure function
> ------------------------------------------------------
>
>                 Key: ASTERIXDB-1608
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1608
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Preston Carman
>            Assignee: Steven Jacobs
>            Priority: Minor
>
> The following query should give a unique UUID for each record. The optimizer pushes the
create-uuid() onto one branch thus resulting in three UUID's instead of nine.
> Query:
> for $x in range(1, 3)
> for $y in range(1, 3)
> return {"id": create-uuid(), "x": $x};
> Result:
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da1"), "x": 1 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da1"), "x": 1 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da1"), "x": 1 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da2"), "x": 2 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da2"), "x": 2 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da2"), "x": 2 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da3"), "x": 3 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da3"), "x": 3 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da3"), "x": 3 }
> Expected Result:
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da1"), "x": 1 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da2"), "x": 1 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da3"), "x": 1 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da4"), "x": 2 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da5"), "x": 2 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da6"), "x": 2 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da7"), "x": 3 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da8"), "x": 3 }
> { "id": uuid("a5b5cc1e-02e1-8428-cc8e-dcf75d2d4da9"), "x": 3 }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message