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

David Wayne Birdsall commented on TRAFODION-2972:
-------------------------------------------------

Thinking about the query a little more: I will guess that ANY and SOME 
comparisons are meant to be alternative ways of formulating EXISTS predicates. 
If this is true, then we should expect deterministic behavior from the query.

> Follow up on supposed non-deterministic query in core/TEST002
> -------------------------------------------------------------
>
>                 Key: TRAFODION-2972
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2972
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 2.3
>            Reporter: David Wayne Birdsall
>            Priority: Major
>
> Regression test core/TEST002 has a query that is commented out:
> ```
> -- This test disabled since it is non -deterministic.
> -- It will be enabled after further investigation.
> -- ?section Genesis_10_000222_6892_p1
> -- SELECT 1 FROM T002T3 T1
> -- GROUP BY T1.A
> -- HAVING T1.A >ANY
> -- ( SELECT 2 FROM T002T1 T2
> -- WHERE T2.C >SOME
> -- ( SELECT AVG (T1.A) FROM T002T1 T3 )
> -- );
> ```
> From git blame, it appears this has been commented out since before Trafodion 
> was moved to github, so we don't have any available pedigree or background 
> info on why this was commented out.
> We should investigate why this is non-deterministic, and if it is not 
> inherently so, fix any bug that is making it non-deterministic. If it is 
> inherently non-deterministic, then the test should be modified to take that 
> into account.
> Just looking at the query without any deep investigation, I will guess that 
> it is in fact inherently non-deterministic, as ANY and SOME make no 
> guarantees as to which row they will return; they just return some row.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to