You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2015/02/26 13:04:04 UTC
[jira] [Commented] (METAMODEL-113) Queries ALIAS and LEFT JOIN
[ https://issues.apache.org/jira/browse/METAMODEL-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14338298#comment-14338298 ]
Kasper Sørensen commented on METAMODEL-113:
-------------------------------------------
Hi there,
Well as you've guessed from the exceptions - no :) Let me elaborate on the issues MM faces here:
* The first query is using a USING keyword which is probably a MySQL specific thing. Normally I'd expect to see the ON keyword in a join.
* The second query is referencing a column of the name "2" I think? Maybe we need to recognize that kind of column name - I never saw before that one would name columns with digits.
> Queries ALIAS and LEFT JOIN
> ---------------------------
>
> Key: METAMODEL-113
> URL: https://issues.apache.org/jira/browse/METAMODEL-113
> Project: Apache MetaModel
> Issue Type: Bug
> Affects Versions: 4.3.2
> Reporter: Francisco Javier Cano
>
> DataSet: http://dev.mysql.com/doc/sakila/en/
> Does MM support these queries? We get an error:
> ----
> {code}
> SELECT l.name as language, COUNT(f.film_id) as films FROM language l LEFT JOIN sakila.film f USING (language_id) GROUP BY l.name
> {code}
> {code}
> org.apache.metamodel.query.parser.QueryParserException: Not capable of parsing FROM token: language l LEFT JOIN sakila.film f USING (language_id). Expected parenthesis to start at first character.
> {code}
> ----
> ----
> {code}
> SELECT l.name as name, 2 as dos FROM language l
> {code}
> {code}
> org.apache.metamodel.query.parser.QueryParserException: Not capable of parsing SELECT token: 2
> {code}
> ----
> Thanks a lot,
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)