[teiid-issues] [JBoss JIRA] (TEIID-2273) org.teiid.query.sql.lang.SubqueryFromClause does not quote keywords in the alias

Mark Addleman (JIRA) jira-events at lists.jboss.org
Thu Oct 25 13:29:01 EDT 2012


    [ https://issues.jboss.org/browse/TEIID-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729235#comment-12729235 ] 

Mark Addleman commented on TEIID-2273:
--------------------------------------

Spoke too quickly.  Looks like escapeSinglePart does check isReservedWord.  I'll debug and try to find the problem.
                
> org.teiid.query.sql.lang.SubqueryFromClause does not quote keywords in the alias
> --------------------------------------------------------------------------------
>
>                 Key: TEIID-2273
>                 URL: https://issues.jboss.org/browse/TEIID-2273
>             Project: Teiid
>          Issue Type: Bug
>            Reporter: Mark Addleman
>            Assignee: Steven Hawkins
>
> new SubqueryFromClause("user", QueryParser.getQueryParser()                                                                              .parseCommand("select 1")).toString()
> yields
> (SELECT 1) AS user
> it should be
> (SELECT 1) AS "user"
> Briefly looking at the code, I think the problem is in org.teiid.query.sql.visitor.SQLStringVisitor.escapeSinglePart(String).escape.  
> Shouldn't it check SQLStringVisitor.isReservedWord(String)?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list