Skip to content

Commit

Permalink
Style fix
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Kwok <[email protected]>
  • Loading branch information
andy-k-improving committed Jan 11, 2025
1 parent da7af99 commit c302b13
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c302b13

Please sign in to comment.