Skip to content

Commit

Permalink
SOLR-9661 added missing operations[withField,withValue] for expressio…
Browse files Browse the repository at this point in the history
…n on stream operations (#934)

* added missing operations[withField,withValue] to stream functions

Co-authored-by: epugh@opensourceconnections.com <epugh@opensourceconnections.com>
  • Loading branch information
ackepenek and epugh committed Jul 9, 2022
1 parent 4923261 commit 6f3cbd8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions solr/CHANGES.txt
Expand Up @@ -78,6 +78,8 @@ Bug Fixes

* SOLR-16142: Fix Admin UI's spatial parameter generation. (Arsal Jalib, Christine Poerschke)

* SOLR-9661: Fix explanation of select() streaming expression that uses replace() operation (Ahmet Can Kepenek via Eric Pugh)

Other Changes
---------------------
* SOLR-16245: Make DenseVectorField codec agnostic (Elia Porciani via Alessandro Benedetti)
Expand Down
4 changes: 4 additions & 0 deletions solr/solrj/src/java/org/apache/solr/client/solrj/io/Lang.java
Expand Up @@ -28,6 +28,8 @@
import org.apache.solr.client.solrj.io.ops.DistinctOperation;
import org.apache.solr.client.solrj.io.ops.GroupOperation;
import org.apache.solr.client.solrj.io.ops.ReplaceOperation;
import org.apache.solr.client.solrj.io.ops.ReplaceWithFieldOperation;
import org.apache.solr.client.solrj.io.ops.ReplaceWithValueOperation;
import org.apache.solr.client.solrj.io.stream.*;
import org.apache.solr.client.solrj.io.stream.expr.Explanation;
import org.apache.solr.client.solrj.io.stream.expr.Expressible;
Expand Down Expand Up @@ -116,6 +118,8 @@ public static void register(StreamFactory streamFactory) {

// tuple manipulation operations
.withFunctionName("replace", ReplaceOperation.class)
.withFunctionName("withValue", ReplaceWithValueOperation.class)
.withFunctionName("withField", ReplaceWithFieldOperation.class)

// stream reduction operations
.withFunctionName("group", GroupOperation.class)
Expand Down
Expand Up @@ -103,6 +103,8 @@ public class TestLang extends SolrTestCase {
"sum",
"count",
"replace",
"withValue",
"withField",
"concat",
"group",
"distinct",
Expand Down

0 comments on commit 6f3cbd8

Please sign in to comment.