Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Style fix
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Kwok <[email protected]>
andy-k-improving committed Jan 11, 2025
1 parent da7af99 commit c302b13
Showing 4 changed files with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -57,5 +57,4 @@ private ExprValue exprCidrMatch(ExprValue addressExprValue, ExprValue rangeExprV
? ExprValueUtils.LITERAL_FALSE
: ExprValueUtils.LITERAL_TRUE;
}

}
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@
import org.opensearch.sql.data.model.ExprValue;
import org.opensearch.sql.expression.DSL;
import org.opensearch.sql.expression.Expression;
import org.opensearch.sql.expression.FunctionExpression;
import org.opensearch.sql.expression.env.Environment;

@ExtendWith(MockitoExtension.class)
Original file line number Diff line number Diff line change
@@ -99,10 +99,10 @@ public PhysicalPlan visitRemove(RemoveOperator node, Object context) {
public PhysicalPlan visitEval(EvalOperator node, Object context) {
if (node instanceof OpenSearchEvalOperator evalOperator) {
return doProtect(
new OpenSearchEvalOperator(
visitInput(evalOperator.getInput(), context),
evalOperator.getExpressionList(),
evalOperator.getNodeClient()));
new OpenSearchEvalOperator(
visitInput(evalOperator.getInput(), context),
evalOperator.getExpressionList(),
evalOperator.getNodeClient()));
}
return new EvalOperator(visitInput(node.getInput(), context), node.getExpressionList());
}
Original file line number Diff line number Diff line change
@@ -346,21 +346,20 @@ public void test_visitTrendline() {
void test_visitOpenSearchEval() {
NodeClient nodeClient = mock(NodeClient.class);
OpenSearchEvalOperator evalOperator =
// ADOperator adOperator =
new OpenSearchEvalOperator(
values(emptyList()),
List.of(
ImmutablePair.of(
new ReferenceExpression("ageInAbs", OpenSearchTextType.of()),
DSL.abs(DSL.abs(new ReferenceExpression("age", ExprCoreType.LONG))))
),
nodeClient);
// ADOperator adOperator =
new OpenSearchEvalOperator(
values(emptyList()),
List.of(
ImmutablePair.of(
new ReferenceExpression("ageInAbs", OpenSearchTextType.of()),
DSL.abs(DSL.abs(new ReferenceExpression("age", ExprCoreType.LONG))))),
nodeClient);

assertEquals(
executionProtector.doProtect(evalOperator), executionProtector.visitEval(evalOperator, null));
executionProtector.doProtect(evalOperator),
executionProtector.visitEval(evalOperator, null));
}


PhysicalPlan resourceMonitor(PhysicalPlan input) {
return new ResourceMonitorPlan(input, resourceMonitor);
}

0 comments on commit c302b13

Please sign in to comment.