diff --git a/core/src/main/java/org/opensearch/sql/expression/function/NestedFunctionResolver.java b/core/src/main/java/org/opensearch/sql/expression/function/NestedFunctionResolver.java index 4ead7a8b43..63c876daef 100644 --- a/core/src/main/java/org/opensearch/sql/expression/function/NestedFunctionResolver.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/NestedFunctionResolver.java @@ -12,9 +12,7 @@ import org.opensearch.sql.expression.FunctionExpression; import org.opensearch.sql.expression.env.Environment; -/** - * Nested Function Resolver returns a builder to resolve nested function expressions - */ +/** Nested Function Resolver returns a builder to resolve nested function expressions */ public class NestedFunctionResolver implements FunctionResolver { @Override public Pair resolve(FunctionSignature unresolvedSignature) { diff --git a/core/src/main/java/org/opensearch/sql/expression/function/OpenSearchFunction.java b/core/src/main/java/org/opensearch/sql/expression/function/OpenSearchFunction.java index 735a2cd616..ab84750488 100644 --- a/core/src/main/java/org/opensearch/sql/expression/function/OpenSearchFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/function/OpenSearchFunction.java @@ -19,16 +19,16 @@ import org.opensearch.sql.expression.env.Environment; /** - * OpenSearch functions are FunctionExpression objects used by the core analyzer - * TODO: move to the OpenSearch module as part of the analyzer and optimizer refactor + * OpenSearch functions are FunctionExpression objects used by the core analyzer TODO: move to the + * OpenSearch module as part of the analyzer and optimizer refactor */ public class OpenSearchFunction extends FunctionExpression { private final FunctionName functionName; private final List arguments; /** - * Determines if SCORE needs to be tracked on the function for relevance-based search - * used by the planner for the OpenSearch request. + * Determines if SCORE needs to be tracked on the function for relevance-based search used by the + * planner for the OpenSearch request. */ @Getter @Setter private boolean isScoreTracked; diff --git a/opensearch/src/test/java/org/opensearch/sql/opensearch/expression/ExpressionTestBase.java b/opensearch/src/test/java/org/opensearch/sql/opensearch/expression/ExpressionTestBase.java index 8949f1ce55..dc69edd9ec 100644 --- a/opensearch/src/test/java/org/opensearch/sql/opensearch/expression/ExpressionTestBase.java +++ b/opensearch/src/test/java/org/opensearch/sql/opensearch/expression/ExpressionTestBase.java @@ -26,24 +26,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import java.util.List; -import java.util.function.Function; import org.opensearch.sql.data.model.ExprValue; -import org.opensearch.sql.data.type.ExprType; -import org.opensearch.sql.expression.DSL; import org.opensearch.sql.expression.Expression; -import org.opensearch.sql.expression.FunctionExpression; import org.opensearch.sql.expression.ReferenceExpression; import org.opensearch.sql.expression.env.Environment; -import org.opensearch.sql.expression.function.BuiltinFunctionName; -import org.opensearch.sql.expression.function.FunctionProperties; public class ExpressionTestBase { - - protected FunctionProperties functionProperties = new FunctionProperties(); - - protected Environment typeEnv; - protected static Environment valueEnv() { return var -> { if (var instanceof ReferenceExpression) { @@ -82,26 +70,4 @@ protected static Environment valueEnv() { } }; } - - protected Environment typeEnv() { - return typeEnv; - } - - protected Function, FunctionExpression> functionMapping( - BuiltinFunctionName builtinFunctionName) { - switch (builtinFunctionName) { - case ADD: - return (expressions) -> DSL.add(expressions.get(0), expressions.get(1)); - case SUBTRACT: - return (expressions) -> DSL.subtract(expressions.get(0), expressions.get(1)); - case MULTIPLY: - return (expressions) -> DSL.multiply(expressions.get(0), expressions.get(1)); - case DIVIDE: - return (expressions) -> DSL.divide(expressions.get(0), expressions.get(1)); - case MODULUS: - return (expressions) -> DSL.modulus(expressions.get(0), expressions.get(1)); - default: - throw new RuntimeException(); - } - } }