Thanks Joel for your reply.

will test it out it in the next version.


Thanks,
Radhakrishnan D


On Thu, Dec 29, 2016 at 12:41 PM, Joel Bernstein <joels...@gmail.com> wrote:

> There are test cases with multiple order by fields for SELECT DISTINCT and
> GROUP BY.  But not for simple SELECT.
>
> We are just about to release a new version of the SQL interface which uses
> Apache Calcite rather then Presto. I'll make sure that this is working in
> the new release.
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Thu, Dec 29, 2016 at 3:33 PM, Joel Bernstein <joels...@gmail.com>
> wrote:
>
> > This would be a bug. I'll take a look at the test cases and see if there
> > is a test case for this.
> >
> > Joel Bernstein
> > http://joelsolr.blogspot.com/
> >
> > On Thu, Dec 29, 2016 at 3:17 PM, radha krishnan <
> > dradhakrishna...@gmail.com> wrote:
> >
> >> Hi,
> >>
> >> when i was trying out the SQL functionality, i realized that
> >>
> >> multiple order by clauses work only when " select distinct " command is
> >> used where as it does not work with a " select "command
> >>
> >> Eg:
> >>
> >> SELECT distinct name, salary, distance_from_office FROM "employees_core"
> >> ORDER BY salary desc , name desc -- this one works
> >>
> >> SELECT name, salary, distance_from_office FROM "employees_core" ORDER BY
> >> salary desc , name desc -- this does not work and fails with the
> response,
> >>
> >>
> >> {
> >>
> >>   "result-set":{"docs":[
> >>
> >> {
> >>
> >>     "EXCEPTION":"java.util.concurrent.ExecutionException:
> >> java.io.IOException: --> http://localhost:8983/solr/
> employees_core/:Can't
> >> determine a Sort Order (asc or desc) in sort spec 'salary descname
> desc',
> >> pos=6",
> >>
> >>     "EOF":true,
> >>
> >>     "RESPONSE_TIME":152}]}}
> >>
> >>
> >>
> >> is it by design that multiple order by will work only with select
> >> distinct ?
> >>
> >>
> >>
> >>
> >> Thanks,
> >>
> >> Radhakrishnan D
> >>
> >
> >
>

Reply via email to