Skip to content

Commit 3bd8a21

Browse files
committed
avoid resolve safe
Signed-off-by: xinyual <xinyual@amazon.com>
1 parent ae31cde commit 3bd8a21

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

core/src/main/java/org/opensearch/sql/calcite/CalciteRexNodeVisitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ public RexNode visitFunction(Function node, CalcitePlanContext context) {
343343
List<RexNode> arguments =
344344
node.getFuncArgs().stream().map(arg -> analyze(arg, context)).collect(Collectors.toList());
345345
RexNode resolvedNode =
346-
PPLFuncImpTable.INSTANCE.resolveSafe(
346+
PPLFuncImpTable.INSTANCE.resolve(
347347
context.rexBuilder, node.getFuncName(), arguments.toArray(new RexNode[0]));
348348
if (resolvedNode != null) {
349349
return resolvedNode;

core/src/main/java/org/opensearch/sql/expression/function/PPLFuncImpTable.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,6 @@ private PPLFuncImpTable(Builder builder) {
117117
this.map = ImmutableMap.copyOf(mapBuilder.build());
118118
}
119119

120-
public @Nullable RexNode resolveSafe(
121-
final RexBuilder builder, final String functionName, RexNode... args) {
122-
try {
123-
return resolve(builder, functionName, args);
124-
} catch (Exception e) {
125-
return null;
126-
}
127-
}
128-
129120
public RexNode resolve(final RexBuilder builder, final String functionName, RexNode... args) {
130121
Optional<BuiltinFunctionName> funcNameOpt = BuiltinFunctionName.of(functionName);
131122
if (funcNameOpt.isEmpty()) {

0 commit comments

Comments
 (0)