Skip to content

Commit

Permalink
Cleanup: remove a few redundant local variables.
Browse files Browse the repository at this point in the history
Signed-off-by: currantw <[email protected]>
  • Loading branch information
currantw committed Nov 7, 2024
1 parent 17decc8 commit e8b6f4e
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ private static DefaultFunctionResolver ifFunction() {
.map(v -> impl((UnaryPredicateOperator::exprIf), v, BOOLEAN, v, v))
.collect(Collectors.toList());

DefaultFunctionResolver functionResolver = FunctionDSL.define(functionName, functionsOne);
return functionResolver;
return FunctionDSL.define(functionName, functionsOne);
}

private static DefaultFunctionResolver ifNull() {
Expand All @@ -122,21 +121,18 @@ private static DefaultFunctionResolver ifNull() {
.map(v -> impl((UnaryPredicateOperator::exprIfNull), v, v, v))
.collect(Collectors.toList());

DefaultFunctionResolver functionResolver = FunctionDSL.define(functionName, functionsOne);
return functionResolver;
return FunctionDSL.define(functionName, functionsOne);
}

private static DefaultFunctionResolver nullIf() {
FunctionName functionName = BuiltinFunctionName.NULLIF.getName();
List<ExprCoreType> typeList = ExprCoreType.coreTypes();

DefaultFunctionResolver functionResolver =
FunctionDSL.define(
return FunctionDSL.define(
functionName,
typeList.stream()
.map(v -> impl((UnaryPredicateOperator::exprNullIf), v, v, v))
.collect(Collectors.toList()));
return functionResolver;
}

/**
Expand Down

0 comments on commit e8b6f4e

Please sign in to comment.