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

Joel Bernstein edited comment on SOLR-9916 at 1/6/17 1:31 AM:
--------------------------------------------------------------

Looks really good to me. Having the ability to nest the different types of 
operations with conditional logic in the select stream is really powerful.

I'm just about to commit a small change so that LeafOperations can accept a 
metric identifier without single quotes. Currently you have to do the following 
or the parser will parse the metric and not know how to use it as a value 
operand.

{code}
having(expr, eq('sum(a_i)', 9))
{code}

After this small commit it will support:

{code}
having(expr, eq(sum(a_i), 9))
{code}

This will just be relevant for Solr 6.4 which is coming in a few days.

The work you're doing on this ticket will supersede this change but it's nice 
to have for 6.4.





was (Author: joel.bernstein):
Looks really good to me.

I'm just about to commit a small change so that LeafOperations can accept a 
metric identifier without single quotes. Currently you have to do the following 
or the parser will parse the metric and not know how to use it as a value 
operand.

{code}
having(expr, eq('sum(a_i)', 9))
{code}

After this small commit it will support:

{code}
having(expr, eq(sum(a_i), 9))
{code}

This will just be relevant for Solr 6.4 which is coming in a few days.

The work you're doing on this ticket will supersede this change but it's nice 
to have for 6.4.




> Add arithmetic operations to the SelectStream
> ---------------------------------------------
>
>                 Key: SOLR-9916
>                 URL: https://issues.apache.org/jira/browse/SOLR-9916
>             Project: Solr
>          Issue Type: New Feature
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Joel Bernstein
>
> One of the things that will be needed as the SQL implementation matures is 
> the ability to do arithmetic operations. For example:
> select (a+b) from x;
> select sum(a)+sum(b) from x;
> We will need to support arithmetic operations within the Streaming API to 
> support these types of operations.
> It looks like adding arithmetic operations to the SelectStream is the best 
> place to add this functionality.



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

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

Reply via email to