On Jan 26, 2010, at 1:19 PM, Andrey Razumovsky wrote:

I'm very surprised it is left join by default. I think it should be inner
join, as it is also analogue with SelectQuery (e.g. "artist" path in
expression means inner Join).

I am somewhat 50/50, or maybe 60/40 in favor of inner. SelectQuery has no exact precedent as it doesn't allow for paths in SELECT clause. Of course implicit path's in all other places (such as WHERE) result in INNER joins. Except for a special case of flattened attributes/ relationships, that started using OUTER joins since 3.1 (the idea being that NULL flattened attributes should be allowed).

So here the decision is whether the case we are talking about is more like a general rule ("a path anywhere in the query results in an inner join, unless it is explicitly specified as OUTER"), or more like a flattened rule.

Since I hope in 3.1 we'll allow path+ outer join syntax anywhere in the query, I guess the default should be inner.

What does specification say?

Nothing useful that I could find except for implicit hint at INNER when explaining how COUNT(p.artist) should work (but I didn't search extensively). Now I also can't remember why we decided to use OUTER JOIN in the first place :-)

Andrus

Reply via email to