db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4355) Implement CROSS JOIN
Date Thu, 03 Sep 2009 00:15:32 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750743#action_12750743

Knut Anders Hatlen commented on DERBY-4355:

For the new message (42Y14) I basically followed the pattern for 42Y11, which is the message
for missing join specification used by inner join and left/right outer join. One thing to
notice with the existing message, is that without the patch, the join specification is required
in the grammar, so skipping the ON clause in one of the currently supported join types will
never cause an exception with the specialized error message (42Y11) to be thrown. Instead,
a cryptic EOF error will be raised by the parser if the ON clause is missing. Now that the
patch has made the join specification optional in the grammar, one unintended side effect
is that the EOF error is not raised by the parser, and the clearer specialized message is
shown instead.

So currently on trunk, we have this:

ij> select * from t1 join t2;
ERROR 42X01: Syntax error: Encountered "<EOF>" at line 1, column 24.
Issue the 'help' command for general information on IJ command syntax.
Any unrecognized commands are treated as potential SQL commands and executed directly.
Consult your DBMS server reference documentation for details of the SQL syntax supported by
your server.

With the patch, we get this:

ij> select * from t1 join t2;
ERROR 42Y11: A join specification is required with the 'INNER JOIN' clause.

This will certainly cause failures in the regression tests because the canons expect the EOF
message for negative join tests, but it looks like an improvement to me.

> Implement CROSS JOIN
> --------------------
>                 Key: DERBY-4355
>                 URL: https://issues.apache.org/jira/browse/DERBY-4355
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>         Environment: any
>            Reporter: Bernt M. Johnsen
>         Attachments: cross.diff
> Implement the CROSS JOIN syntax
> SELECT * from t1 CROSS JOIN t2;
> as an alternative syntax to
> SELECT * FROM t1, t2; 
> This should be pretty straight forward and ease the migration of SQL code to Derby.

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

View raw message