You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/11/29 18:06:59 UTC

[jira] [Commented] (ASTERIXDB-1608) Unexpected result from a join with a Non-Pure function

    [ https://issues.apache.org/jira/browse/ASTERIXDB-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15706050#comment-15706050 ] 

ASF subversion and git services commented on ASTERIXDB-1608:
------------------------------------------------------------

Commit 6b8a42f3df9cebb9bd5d56e5986215bc0d98e45c in asterixdb's branch refs/heads/master from [~sjaco002]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=6b8a42f ]

ASTERIXDB-1608, ASTERIXDB-1617 Match user query for nonpure function calls

This fix makes it so that nonpure functions are called in
the same place and with the same number of executions
as specified by the user in the query. This also means
that indexes cannot be used for queries that compare
with a nonpure call that is made on a per-record basis.
Added optimizer tests
Change-Id: I2dec322b30835625430c06acd7626d902bada137
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1057
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>


> 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)