db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Klebanoff (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-278) Document INTERSECT and EXCEPT operations
Date Tue, 17 May 2005 21:54:23 GMT
     [ http://issues.apache.org/jira/browse/DERBY-278?page=comments#action_65623 ]
     
Jack Klebanoff commented on DERBY-278:
--------------------------------------

There is a problem in document rrefsqlj1083019.html. Item 4 reads:
"... in rule rrefsqlj1083019.html#rrefsqlj1083019__sqlj30695". I think that we need a more
descriptive text for the link.

Document rrefsqlj21571.html is incorrect about the precedence of the intersect, except, and
union operators. It confuses precedence with the number of duplicates in the output. The document
states "... INTERSECT, EXCEPT, or UNION operations. These operations are evaluated from left
to right when no parentheses are present". This is incorrect. In the absence of parentheses
INTERSECTs are evaluated before EXCEPT, or UNION operations, but EXCEPT and UNION operations
are evaluated from left to right. That is, INTERSECT has higher precedence than EXCEPT or
UNION and EXCEPT and UNION have the same precedence.

The sentence "You can combine two queries into one using the ALL parameter" is misleading.
The set operators combine two queries into one with or without the ALL parameter. Change the
sentence to something like: "The ALL and DISTINCT keywords determine whether duplicates are
eliminated from the result. If you specify DISTINCT then there will be no duplicate rows in
the result. If you specify ALL then there may be duplicates in the result, depending on whether
there were duplicates in the input. DISTINCT is the default: if you specify neither ALL nor
DISTINCT then duplicates will be eliminated".

The next section in rrefsqlj21571.html is titled "Precedence of UNION, INTERSECT, and EXCEPT"
and starts with "There are rules of precedence in how many duplicates will be contained...".
Precedence has nothing to do with the number of duplicates in the output. Change the title
to "Duplicates in UNION/INTERSECT/EXCEPT ALL". Include the previous paragraph in this section.
Remove the sentence "There are rules of precedence ..."

I think that the examples in rrefsqlj21571.html should have a header, e.g. "Examples". My
first thought was that the examples were part of the discussion of the number of duplicates.
A header would separate the two.

> Document INTERSECT and EXCEPT operations
> ----------------------------------------
>
>          Key: DERBY-278
>          URL: http://issues.apache.org/jira/browse/DERBY-278
>      Project: Derby
>         Type: Task
>   Components: Documentation
>  Environment: All
>     Reporter: Jeff Levitt
>     Assignee: Jeff Levitt
>     Priority: Minor
>      Fix For: 10.1.0.0
>  Attachments: intersectdocs.zip
>
> Currently the documentation does not discuss using INTERSECT and EXCEPT in queries. 
We just added the DISTINCT keyword recently to those operations as well as to the UNION operation,
so I will attempt to document the DISTINCT keyword for UNION, and add the INTERSECT and EXCEPT
syntax as I go along.

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


Mime
View raw message