asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glenn Galvizo (Jira)" <j...@apache.org>
Subject [jira] [Updated] (ASTERIXDB-2745) Different join query results for typed and untyped datasets
Date Sat, 13 Jun 2020 08:03:00 GMT

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

Glenn Galvizo updated ASTERIXDB-2745:
-------------------------------------
    Attachment: exists-typed-bug.tar.gz

> Different join query results for typed and untyped datasets
> -----------------------------------------------------------
>
>                 Key: ASTERIXDB-2745
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2745
>             Project: Apache AsterixDB
>          Issue Type: Bug
>    Affects Versions: 0.9.4.1
>            Reporter: Glenn Galvizo
>            Priority: Major
>         Attachments: exists-typed-bug.tar.gz
>
>
> Performing the query below, on a typed dataset:
> {code:sql}
>  SELECT U.name.first as first_name, S.categories
>  FROM UserTyped U, StoresTyped S
>  WHERE U.is_shopper AND
>        U.capacity = 3 AND
>        "Beverages" IN S.categories AND
>        EXISTS (
>          SELECT *
>          FROM WorkForTyped W
>          WHERE S.store_id = W.store_id AND
>                W.shopper_id = U.user_id AND
>                S.name = "Sheetz"
>        );
> {code}
> incorrectly returns less results than the same query on a non-typed dataset:
> {code:sql}
>  SELECT U.name.first as first_name, S.categories
>  FROM UserNotTyped U, StoresNotTyped S
>  WHERE U.is_shopper AND
>        U.capacity = 3 AND
>        "Beverages" IN S.categories AND
>        EXISTS (
>          SELECT *
>          FROM WorkForNotTyped W
>          WHERE S.store_id = W.store_id AND
>                W.shopper_id = U.user_id AND
>                S.name = "Sheetz"
>        );
> {code}
> Additionally, it was found that moving the 'S.name = "Sheetz"' term out of the EXISTS
clause and into the outer-level WHERE clause changes the output of the typed-query to be correct.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message