ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-6501) select distinct exception in simple sqlQuery request.
Date Tue, 09 Oct 2018 09:18:00 GMT

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

Vladimir Ozerov commented on IGNITE-6501:
-----------------------------------------

We should explain users that {{SqlQuery}} is a sugar on top {{SqlFieldsQuery}}. It is convenient
in some cases, as it returns key-value pairs, but on the other hand in can be used only in
two forms:

1) {{FROM ...}} - i.e. without SELECT at all
2) {{SELECT * FROM ...}} - i.e. only asterisk inside a select. If there are several tables,
then an alias could be used with an asterisk as well: {{SELECT p.* FROM Person p INNER JOIN
Department d ON p.deptId = d.id}}

All other forms, e.g. aforementioned {{DISTINCT}} are illegal. {{SqlFieldsQuery}} should be
used in this case.

> select distinct exception in simple sqlQuery request.
> -----------------------------------------------------
>
>                 Key: IGNITE-6501
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6501
>             Project: Ignite
>          Issue Type: Bug
>          Components: documentation, sql
>    Affects Versions: 2.0, 2.1
>            Reporter: Stanilovsky Evgeny
>            Assignee: Vladimir Ozerov
>            Priority: Major
>             Fix For: 2.7
>
>         Attachments: DistinctTest.java
>
>
> SqlQuery throws exception
> {code}
> Failed to parse query: SELECT distinct Value._KEY, distinct Value._VAL from Value
> {code}
> while SqlFieldsQuery works properly well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message