You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Cassandra Targett (JIRA)" <ji...@apache.org> on 2016/11/01 17:32:59 UTC

[jira] [Commented] (SOLR-9146) Parallel SQL engine should support >, >=, <, <=, <>, != syntax

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

Cassandra Targett commented on SOLR-9146:
-----------------------------------------

[~risdenk]: I added a section to the Solr Ref Guide about supported WHERE operators at https://cwiki.apache.org/confluence/display/solr/Parallel+SQL+Interface#ParallelSQLInterface-SupportedWHEREOperators. However, I did not include '!=' because I didn't see it in the TestSQLHandler.java test. Let me know if it is supported even if it is not tested. If I should add other operators that are not supported, please let me know - I used a general list of operators and some feedback from the page comments.

Due to time constraints, I did not try to cover every scenario demonstrated in the test, just wanted to add a section based on this specific issue.

> Parallel SQL engine should support >, >=, <, <=, <>, != syntax
> --------------------------------------------------------------
>
>                 Key: SOLR-9146
>                 URL: https://issues.apache.org/jira/browse/SOLR-9146
>             Project: Solr
>          Issue Type: New Feature
>          Components: Parallel SQL
>            Reporter: Timothy Potter
>            Assignee: Kevin Risden
>             Fix For: 6.3
>
>         Attachments: SOLR-9146.patch, SOLR-9146.patch
>
>
> this gives expected result:
> {code}
>      SELECT title_s, COUNT(*) as cnt
>         FROM movielens
>      WHERE genre_ss='action' AND rating_i='[4 TO 5]'
> GROUP BY title_s
> ORDER BY cnt desc
>          LIMIT 5
> {code}
> but using >= 4 doesn't give same results (my ratings are 1-5):
> {code}
>       SELECT title_s, COUNT(*) as cnt
>          FROM movielens
>       WHERE genre_ss='action' AND rating_i >= 4
> GROUP BY title_s
> ORDER BY cnt desc
>           LIMIT 5
> {code}
> on the Solr side, I see queries forumlated as:
> {code}
> 2016-05-21 14:53:43.096 INFO  (qtp1435804085-1419) [c:movielens
> s:shard1 r:core_node1 x:movielens_shard1_replica1] o.a.s.c.S.Request
> [movielens_shard1_replica1]  webapp=/solr path=/export
> params={q=((genre_ss:"action")+AND+(rating_i:"4"))&distrib=false&fl=title_s&sort=title_s+desc&wt=json&version=2.2}
> hits=2044 status=0 QTime=0
> {code}
> which is obviously wrong ... 
> In general, rather than crafting an incorrect query that gives the
> wrong results, we should throw an exception stating that the syntax is
> not supported.
> Also, the ref guide should be updated to contain a known limitations section so users don't have to guess at what SQL features are supported by Solr.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org