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] Commented: (DERBY-4369) Give a more useful error message when join specification is missing
Date Mon, 07 Sep 2009 21:02:57 GMT

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

Dag H. Wanvik commented on DERBY-4369:

The example with CROSS as an alias for t1 is sufficiently nasty, that if we don't implement
DERBY-4355 (add CROSS JOIN), I think the above case should give an error even if CROSS
is a legal identifier in other contexts. Ideally I'd like to see CROSS being a reserved keyword,
that could break apps which use that identifier in more innocuous context, of course.

> Give a more useful error message when join specification is missing
> -------------------------------------------------------------------
>                 Key: DERBY-4369
>                 URL: https://issues.apache.org/jira/browse/DERBY-4369
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-4369-1a.diff, releaseNote.html
> Currently, if a join is missing a join specification, we see the following rather cryptic
> 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.
> The parser already has code to check if the join specification is missing, but since
the join specification is required in the grammar, we'll never get to that point in the code
if it is missing. If we make the join specification optional in the grammar, the code path
with the more helpful message will be enabled, and we'll see this instead:
> ij> select * from t1 join t2;
> ERROR 42Y11: A join specification is required with the 'INNER JOIN' clause.
> This will make it clearer what the problem is.

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

View raw message