Materialize/optimize an invariant, non-correlated scalar subquery in the WHERE 
clause
-------------------------------------------------------------------------------------

                 Key: DERBY-2231
                 URL: https://issues.apache.org/jira/browse/DERBY-2231
             Project: Derby
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 10.2.2.0
            Reporter: Christian d'Heureuse


The attached test case shows that an invariant, non-correlated scalar subquery 
in the WHERE clause is not materialized/optimized.

A scalar subquery is only allowed to return a single row with a single column. 
If the subquery contains no references to outside fields, it should be replaced 
by a constant value, before the main query is executed.

see also DERBY-1733

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to