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 2018/03/02 00:57:00 UTC
[jira] [Commented] (ASTERIXDB-2307) Incorrect result of quantified
expression when condition returns NULL/MISSING
[ https://issues.apache.org/jira/browse/ASTERIXDB-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16382943#comment-16382943 ]
ASF subversion and git services commented on ASTERIXDB-2307:
------------------------------------------------------------
Commit c166adc3464d9afe45b2b3cfaea27227dee07767 in asterixdb's branch refs/heads/master from [~dlychagin-cb]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=c166adc ]
[ASTERIXDB-2307][COMP] Incorrect result with quantified expression
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Fixed incorrect result with EVERY quantified expression
when its condition returns NULL/MISSING
Change-Id: I9e282071c87a9551829c31af43909970d307e417
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2441
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Taewoo Kim <wa...@gmail.com>
> Incorrect result of quantified expression when condition returns NULL/MISSING
> -----------------------------------------------------------------------------
>
> Key: ASTERIXDB-2307
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2307
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: COMP - Compiler
> Reporter: Dmitry Lychagin
> Assignee: Dmitry Lychagin
> Priority: Minor
>
> Input data:
> { "custid": "C1",
> "name": "James",
> "rating": 750
> },
> { "custid": "C2",
> "name": "Mary",
> "rating": 690
> },
> { "custid": "C3",
> "name": "John"
> },
> { "custid": "C4",
> "name": "Patricia",
> "rating": null
> },
> { "custid": "C5",
> "name": "Robert",
> "rating": 750
> },
> { "custid": "C6",
> "name": "Jennifer",
> "rating": 640
> }
>
> Query:
> SELECT VALUE COUNT(c1.name)
> FROM customers AS c1
> WHERE EVERY r IN
> (SELECT VALUE c2.rating FROM customers AS c2)
> SATISFIES c1.rating >= r
> Result: 4, which is incorrect because for some customers the 'rating' field is either missing or null, therefore the quantified expression can never succeed. The correct result should be 0
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)