mirror of https://github.com/apache/lucene.git
SOLR-10933: LetStream variables are not evaluated in proper order
This commit is contained in:
parent
44d1f1fe3f
commit
eff583ee88
|
@ -18,7 +18,7 @@ package org.apache.solr.client.solrj.io.stream;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
@ -41,7 +41,7 @@ public class LetStream extends TupleStream implements Expressible {
|
|||
private static final long serialVersionUID = 1;
|
||||
private TupleStream stream;
|
||||
private StreamContext streamContext;
|
||||
private Map letParams = new HashMap();
|
||||
private Map letParams = new LinkedHashMap();
|
||||
|
||||
public LetStream(StreamExpression expression, StreamFactory factory) throws IOException {
|
||||
List<StreamExpression> streamExpressions = factory.getExpressionOperandsRepresentingTypes(expression, Expressible.class, TupleStream.class);
|
||||
|
|
|
@ -6550,7 +6550,7 @@ public class StreamExpressionTest extends SolrCloudTestCase {
|
|||
updateRequest.commit(cluster.getSolrClient(), COLLECTIONORALIAS);
|
||||
|
||||
String expr = "search("+COLLECTIONORALIAS+", q=\"*:*\", fl=\"id,test_t, test_i\", sort=\"id desc\")";
|
||||
String cat = "let(a ="+expr+", b = add(1,3), c=col(a, test_i), tuple(test = add(1,1), test1=b, results=a, test2=add(c)))";
|
||||
String cat = "let(d ="+expr+", b = add(1,3), c=col(d, test_i), tuple(test = add(1,1), test1=b, results=d, test2=add(c)))";
|
||||
ModifiableSolrParams paramsLoc = new ModifiableSolrParams();
|
||||
paramsLoc.set("expr", cat);
|
||||
paramsLoc.set("qt", "/stream");
|
||||
|
|
Loading…
Reference in New Issue