From 1b81dcdeba925f205f3db37db7bfb7ed82c0e519 Mon Sep 17 00:00:00 2001 From: Joel Bernstein Date: Wed, 12 Apr 2017 17:26:30 -0400 Subject: [PATCH] SOLR-10485: Fix precommit --- solr/core/src/java/org/apache/solr/handler/StreamHandler.java | 2 +- .../apache/solr/client/solrj/io/stream/CalculatorStream.java | 1 - .../solr/client/solrj/io/stream/StreamExpressionTest.java | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java index fda9f3b0b6a..f976e5db27c 100644 --- a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java @@ -203,7 +203,7 @@ public class StreamHandler extends RequestHandlerBase implements SolrCoreAware, .withFunctionName("significantTerms", SignificantTermsStream.class) .withFunctionName("cartesianProduct", CartesianProductStream.class) .withFunctionName("shuffle", ShuffleStream.class) - .withFunctionName("calc", CalculatorStream.class) + .withFunctionName("eval", CalculatorStream.class) // metrics .withFunctionName("min", MinMetric.class) diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CalculatorStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CalculatorStream.java index 5b5c23da853..4a73e22dd2a 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CalculatorStream.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CalculatorStream.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.Date; import org.apache.solr.client.solrj.io.Tuple; import org.apache.solr.client.solrj.io.comp.StreamComparator; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java index 559c29b827d..85e775b5538 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java @@ -4787,7 +4787,7 @@ public class StreamExpressionTest extends SolrCloudTestCase { @Test public void testCalculatorStream() throws Exception { - String expr = "select(calc(), add(1, 1) as result)"; + String expr = "select(eval(), add(1, 1) as result)"; ModifiableSolrParams paramsLoc = new ModifiableSolrParams(); paramsLoc.set("expr", expr); paramsLoc.set("qt", "/stream");