Skip to content

Commit

Permalink
Fix typos in UnaryPredicateOperator.
Browse files Browse the repository at this point in the history
Signed-off-by: currantw <taylor.curran@improving.com>
  • Loading branch information
currantw committed Oct 29, 2024
1 parent 8533862 commit 4e46166
Showing 1 changed file with 15 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,20 @@

package org.opensearch.sql.expression.operator.predicate;

import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL;
import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_TRUE;
import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN;
import static org.opensearch.sql.expression.function.FunctionDSL.impl;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import lombok.experimental.UtilityClass;
import org.opensearch.sql.data.model.ExprBooleanValue;
import org.opensearch.sql.data.model.ExprValue;
import org.opensearch.sql.data.type.ExprCoreType;
import org.opensearch.sql.expression.function.BuiltinFunctionName;
import org.opensearch.sql.expression.function.BuiltinFunctionRepository;
import org.opensearch.sql.expression.function.DefaultFunctionResolver;
import org.opensearch.sql.expression.function.FunctionBuilder;
import org.opensearch.sql.expression.function.FunctionDSL;
import org.opensearch.sql.expression.function.FunctionName;
import org.opensearch.sql.expression.function.FunctionSignature;
import org.opensearch.sql.expression.function.SerializableFunction;
import org.opensearch.sql.expression.function.*;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_NULL;
import static org.opensearch.sql.data.model.ExprValueUtils.LITERAL_TRUE;
import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN;
import static org.opensearch.sql.expression.function.FunctionDSL.impl;

/**
* The definition of unary predicate function not, Accepts one Boolean value and produces a Boolean.
Expand Down Expand Up @@ -148,19 +142,19 @@ private static DefaultFunctionResolver nullIf() {
/**
* v2 if v1 is null.
*
* @param v1 varable 1
* @param v2 varable 2
* @param v1 variable 1
* @param v2 variable 2
* @return v2 if v1 is null
*/
public static ExprValue exprIfNull(ExprValue v1, ExprValue v2) {
return (v1.isNull() || v1.isMissing()) ? v2 : v1;
}

/**
* return null if v1 equls to v2.
* return null if v1 equals to v2.
*
* @param v1 varable 1
* @param v2 varable 2
* @param v1 variable 1
* @param v2 variable 2
* @return null if v1 equals to v2
*/
public static ExprValue exprNullIf(ExprValue v1, ExprValue v2) {
Expand Down

0 comments on commit 4e46166

Please sign in to comment.