You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/11/23 23:36:58 UTC

[jira] [Commented] (TRAFODION-2367) Fix documentation issues with Explain

    [ https://issues.apache.org/jira/browse/TRAFODION-2367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15691665#comment-15691665 ] 

ASF GitHub Bot commented on TRAFODION-2367:
-------------------------------------------

GitHub user DaveBirdsall opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/852

    [TRAFODION-2367] EXPLAIN documentation updates + syntax tweak

    Three changes:
    
    1. Noted in EXPLAIN documentation that some non-reserved keywords can be used for statement names in PREPARE but cause syntax errors when used in EXPLAIN. Noted that as a workaround, one can change the name to a delimited identifier.
    
    2. Tweaked the EXPLAIN syntax in the SQL parser to accept all one-letter non-reserved keywords as statement names. So, for example, "explain c;" will now work instead of raising a syntax error.
    
    3. Fixed the EXPLAIN documentation to note that one can do "EXPLAIN query_text" as well.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/DaveBirdsall/incubator-trafodion Trafodion2367

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/852.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #852
    
----
commit 93741f7d60d689778aa405c6e10be187a20e3a6f
Author: Dave Birdsall <db...@apache.org>
Date:   2016-11-23T23:30:57Z

    [TRAFODION-2367] EXPLAIN documentation updates + syntax tweak

----


> Fix documentation issues with Explain
> -------------------------------------
>
>                 Key: TRAFODION-2367
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2367
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: documentation, sql-cmp
>    Affects Versions: 2.1-incubating
>            Reporter: David Wayne Birdsall
>            Assignee: David Wayne Birdsall
>            Priority: Minor
>
> Because of an oddity in the parser, it is possible to use some non-reserved keywords as statement names in PREPARE and EXECUTE statements, but not in EXPLAIN. Though one can still use the statement name in EXPLAIN if the delimited identifier format is used. For example:
> prepare c from select count(*) from t1;
> explain options 'f' c;   <--- fails with a syntax error; C is a non-reserved keyword
> explain options 'f' "C";  <--- works fine
> execute c;  <--- works fine
> This oddity needs to be documented. (It would be nice too if it could be fixed, or at least reduced in frequency.)
> Also, Trafodion supports explain + query text, but the manual does not document this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)