db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (DERBY-4736) ASSERT FAIL when code generating a column reference in a join predicate in presence of other outer join reordering
Date Fri, 20 Aug 2010 15:17:16 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886105#action_12886105
] 

Dag H. Wanvik edited comment on DERBY-4736 at 8/20/10 11:17 AM:
----------------------------------------------------------------

This smaller part of the query gives a wrong result, too, unless I comment out the reorder
logic:

 SELECT count(*) FROM (T2 LEFT JOIN (T3 left outer JOIN T4 ON 1=1) ON T2.X = T3.X)

returns 32 rows, but should return 20, and does if I comment out the reorder logic. So does
PostgreSQL. Manually rewriting this query to be left-deep gives 32 rows with both Derby and
PostgreSQL.  DERBY-4471?
(Answer: yes. Edited dhw 2010-08-20)

      was (Author: dagw):
    This smaller part of the query gives a wrong result, too, unless I comment out the reorder
logic:

 SELECT count(*) FROM (T2 LEFT JOIN (T3 left outer JOIN T4 ON 1=1) ON T2.X = T3.X)

returns 32 rows, but should return 20, and does if I comment out the reorder logic. So does
PostgreSQL. Manually rewriting this query to be left-deep gives 32 rows with both Derby and
PostgreSQL.  DERBY-4471?
  
> ASSERT FAIL when code generating a column reference in a join predicate in presence of
other outer join reordering
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4736
>                 URL: https://issues.apache.org/jira/browse/DERBY-4736
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 10.7.0.0
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>             Fix For: 10.7.0.0
>
>         Attachments: derby-4736-1a.diff, derby-4736-1a.stat, derby-4736-1b.diff, derby-4736-1b.stat,
derby-4736-1c.diff, derby-4736-1c.stat, derby-4736-1d.diff, derby-4736-1d.stat, loj-analysis.txt,
query_plan_derby_4736.pdf
>
>
> From schema given in DERBY-4712, this query gives an ASSERT with sane Derby:
> rs = s.executeQuery("SELECT 1 FROM (T0 LEFT JOIN (T1 LEFT JOIN (T2 LEFT JOIN " +
>                                " (T3 LEFT JOIN T4 ON 1=1) ON T2.X = T3.X) ON 1=1) ON
1=1) " +
>                                " LEFT JOIN " +
>                                " (T5 INNER JOIN T6 ON 1=1) " +
>                                " ON T2.X = 1 ");
> Cf the attachments in DERBY-4712 assert-bind-opt-trees.*. 
> From preliminary analysis, this error seems to be unrelated to the NPEs reported in DERBY-4712,
so filing this as a sub-issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message