aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/grouping/request/StrLenFunction.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/grouping/request/StrLenFunction.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/grouping/request/StrLenFunction.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/grouping/request/StrLenFunction.java b/container-search/src/main/java/com/yahoo/search/grouping/request/StrLenFunction.java
index e9ca48b3db3..d784e37b337 100644
--- a/container-search/src/main/java/com/yahoo/search/grouping/request/StrLenFunction.java
+++ b/container-search/src/main/java/com/yahoo/search/grouping/request/StrLenFunction.java
@@ -8,6 +8,7 @@ import java.util.Arrays;
* number of bytes in the string result of the argument.
*
* @author Simon Thoresen Hult
+ * @author bratseth
*/
public class StrLenFunction extends FunctionNode {
@@ -17,7 +18,17 @@ public class StrLenFunction extends FunctionNode {
* @param exp The expression to evaluate, must evaluate to a string.
*/
public StrLenFunction(GroupingExpression exp) {
- super("strlen", Arrays.asList(exp));
+ this(null, null, exp);
}
+
+ private StrLenFunction(String label, Integer level, GroupingExpression exp) {
+ super("strlen", label, level, Arrays.asList(exp));
+ }
+
+ @Override
+ public StrLenFunction copy() {
+ return new StrLenFunction(getLabel(), getLevelOrNull(), getArg(0).copy());
+ }
+
}