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

Timothy Potter commented on SOLR-10016:
---------------------------------------

update on this ... not having much luck with functions (UDF or built-in). 
Julian mentioned that push-down of functions to adapters is not implemented in 
Calcite yet, so not sure this is worth pursuing?

As for the built-in functions like RAND(), I tried this SQL:

{code}
select movie_id, user_id, RAND() as some_rand from ratings order by movie_id 
desc LIMIT 100
{code}

The the RAND definitely comes into the Solr code (in SolrProject), but then it 
looks like we'd have to call that function for every tuple while processing the 
stream? Feels like I'm missing something basic here ...



> SQL should support sorting by random_<SEED>
> -------------------------------------------
>
>                 Key: SOLR-10016
>                 URL: https://issues.apache.org/jira/browse/SOLR-10016
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Parallel SQL
>            Reporter: Timothy Potter
>            Assignee: Timothy Potter
>         Attachments: SOLR-10016.patch
>
>
> I tried using the handy sort=random_<SEED> feature in normal queries with SQL 
> and it failed:
> {code} 
> curl --data-urlencode "stmt=select rating, movie_id, user_id from ratings 
> order by random_5150 asc" \
> >  "http://localhost:8983/solr/ratings/sql";
> {"result-set":{"docs":[
> {"EXCEPTION":"Fields in the sort spec must be included in the field 
> list:random_5150","EOF":true}]}}
> {code}
> I'd like to take a stab at fixing this if there are no objections to me doing 
> so?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to