[teiid-issues] [JBoss JIRA] (TEIID-2273) org.teiid.query.sql.lang.SubqueryFromClause does not quote keywords in the alias
Steven Hawkins (JIRA)
jira-events at lists.jboss.org
Fri Oct 26 08:30:01 EDT 2012
[ https://issues.jboss.org/browse/TEIID-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Hawkins resolved TEIID-2273.
-----------------------------------
Fix Version/s: 8.2
Resolution: Done
Thanks Mark, added the missing call to escapeSinglePart.
> 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
> Components: Query Engine
> Affects Versions: 7.7
> Reporter: Mark Addleman
> Assignee: Steven Hawkins
> Fix For: 8.2
>
>
> 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