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

Dennis Gove commented on SOLR-8458:
-----------------------------------

Cao,

What's the purpose of ClientTupleStream? It appears it's only used in the tests 
and doesn't add any value as a Stream object.

I'd rather not replace all existing stream creations with a randomized choice 
between doing substitution and not. I think it'd be better to have explicit 
tests which exercise substitution. I don't think it'd be necessary to test that 
substitution on each and every stream class because the implementation is 
outside of the stream classes. Also, it appears that the randomization of the 
choice is non-repeatable. Ie, if I rerun the tests with a -Dtests.seed value 
would the random choices be the same?

It appears that the substitution is just picking some substring in the 
expression and marking it as being a parameter. I think this should test 
substituting entire expression clauses, like 
{code}
http://localhost:8983/col/stream?expr=merge($left, $right, 
...)&left=search(...)&right=search(...)
{code}
where left and right are entire clauses. The tests you've provided appear to do 
something like this
{code}
http://localhost:8983/col/stream?expr=merge(sear$left, se$right..), 
...)&left=ch(...)&right=arch(.
{code}
which I don't think makes much sense. Technically the substitution should 
handle that but I think the codification should be that one would want to 
substitute entire expressions.

> Add Streaming Expressions tests for parameter substitution
> ----------------------------------------------------------
>
>                 Key: SOLR-8458
>                 URL: https://issues.apache.org/jira/browse/SOLR-8458
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Joel Bernstein
>            Priority: Minor
>         Attachments: SOLR-8458.patch, SOLR-8458.patch
>
>
> This ticket is to add Streaming Expression tests that exercise the existing 
> macro expansion feature described here:  
> http://yonik.com/solr-query-parameter-substitution/
> Sample syntax below:
> {code}
> http://localhost:8983/col/stream?expr=merge(${left}, ${right}, 
> ...)&left=search(...)&right=search(...)
> {code}



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

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

Reply via email to