- java.lang.Object
-
- com.pervasive.datarush.functions.ListFunctions
-
public class ListFunctions extends Object
Provides implementations of common List functions. These functions can be combined to construct more complex expressions.These functions accept list objects as input parameters.
-
-
Constructor Summary
Constructors Constructor Description ListFunctions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ScalarValuedFunction
listConcat(ScalarValuedFunction leftExpr, ScalarValuedFunction rightExpr)
Builds an expression concatenating the values of the two specified subexpressions.static ScalarValuedFunction
listConcat(ScalarValuedFunction leftExpr, String rightField)
Builds an expression concatenating a the value of the specified field and subexpression.static ScalarValuedFunction
listConcat(ScalarValuedFunction leftExpr, List<Object> rightValue)
Builds an expression concatenating a constant to the value of the specified subexpression.static ScalarValuedFunction
listConcat(String leftField, ScalarValuedFunction rightExpr)
Builds an expression concatenating the value of a specified field and subexpression.static ScalarValuedFunction
listConcat(String leftField, String rightField)
Builds an expression concatenating the values of the two specified fields.static ScalarValuedFunction
listConcat(String leftField, List<Object> rightValue)
Builds an expression concatenating a constant to the value of the specified field.static ScalarValuedFunction
listConcat(List<Object> leftValue, ScalarValuedFunction rightExpr)
Builds an expression concatenating a the value of the specified field and subexpression.static ScalarValuedFunction
listConcat(List<Object> leftValue, String rightField)
Builds an expression concatenating a constant to the value of the specified field.static ScalarValuedFunction
listContains(ScalarValuedFunction leftExpr, ScalarValuedFunction rightExpr)
Builds an expression to check if an expression contains a value specified by a ScalarValuedFunction.static ScalarValuedFunction
listContains(ScalarValuedFunction leftExpr, String rightField)
Builds an expression to check if an expression contains a value specified by a field.static ScalarValuedFunction
listContains(ScalarValuedFunction expr, List<Object> value)
Builds an expression to check if an expression contains a value specified by a field.static ScalarValuedFunction
listContains(String leftField, ScalarValuedFunction rightExpr)
Builds an expression to check if a field contains a value specified by an expression.static ScalarValuedFunction
listContains(String leftField, String rightField)
Builds an expression to check if a field contains a value specified by the other field.static ScalarValuedFunction
listContains(String field, List<Object> value)
Builds an expression to check if a field contains a value specified by an expression.static ScalarValuedFunction
listContains(List<Object> leftValue, ScalarValuedFunction rightExpr)
Builds an expression to check if a constant contains a value specified by an expression.static ScalarValuedFunction
listContains(List<Object> leftValue, String rightField)
Builds an expression to check if a constant contains a value specified by other field.static ScalarValuedFunction
listContainsAll(ScalarValuedFunction leftExpr, ScalarValuedFunction rightExpr)
Builds an expression to check if an expression contains a value specified by a ScalarValuedFunction.static ScalarValuedFunction
listContainsAll(ScalarValuedFunction leftExpr, String rightField)
Builds an expression to check if an expression contains a value specified by a field.static ScalarValuedFunction
listContainsAll(ScalarValuedFunction expr, List<Object> value)
Builds an expression to check if an expression contains a value specified by a field.static ScalarValuedFunction
listContainsAll(String leftField, ScalarValuedFunction rightExpr)
Builds an expression to check if a field contains a value specified by an expression.static ScalarValuedFunction
listContainsAll(String leftField, String rightField)
Builds an expression to check if a field contains a value specified by the other field.static ScalarValuedFunction
listContainsAll(String field, List<Object> value)
Builds an expression to check if a field contains a value specified by an expression.static ScalarValuedFunction
listContainsAll(List<Object> leftValue, ScalarValuedFunction rightExpr)
Builds an expression to check if a constant contains a value specified by an expression.static ScalarValuedFunction
listContainsAll(List<Object> leftValue, String rightField)
Builds an expression to check if a constant contains a value specified by other field.static ScalarValuedFunction
listDistinct(ScalarValuedFunction expr)
Builds an expression to get distinct set of elements from a ScalarValuedFunction.static ScalarValuedFunction
listDistinct(String field)
Builds an expression to get distinct set of elements from a specified field.static ScalarValuedFunction
listGet(ScalarValuedFunction leftExpr, int rightValue)
Builds an expression to get the value at a particular index from specified field.static ScalarValuedFunction
listGet(ScalarValuedFunction leftExpr, ScalarValuedFunction rightExpr)
Builds an expression to get the value at a particular index from specified expression.static ScalarValuedFunction
listGet(ScalarValuedFunction leftExpr, String rightField)
Builds an expression to get the value at a particular index from specified field.static ScalarValuedFunction
listGet(String leftField, int rightValue)
Builds an expression to get the value at a particular index from specified field.static ScalarValuedFunction
listGet(String leftField, ScalarValuedFunction rightExpr)
Builds an expression to get the value at a particular index from specified field.static ScalarValuedFunction
listGet(String leftField, String rightField)
Builds an expression to get the value at a particular index from specified field.static ScalarValuedFunction
listGet(List<Object> leftValue, ScalarValuedFunction rightExpr)
Builds an expression to get the value at a particular index from specified field.static ScalarValuedFunction
listGet(List<Object> leftValue, String rightField)
Builds an expression to get the value at a particular index from specified field.static ScalarValuedFunction
listReverse(ScalarValuedFunction expr)
Builds an expression to reverse the order of the elements in the specified expression.static ScalarValuedFunction
listReverse(String field)
Builds an expression to reverse the order of the elements in the specified field.static ScalarValuedFunction
listSize(ScalarValuedFunction expr)
Builds an expression to get the number of elements in specified ScalarValuedFunction expression.static ScalarValuedFunction
listSize(String field)
Builds an expression to get the number of elements in specified field.static ScalarValuedFunction
listSort(ScalarValuedFunction leftExpr, ScalarValuedFunction rightExpr)
Builds an expression to sort elements of a ScalarValuedFunction as specified by the other.static ScalarValuedFunction
listSort(ScalarValuedFunction leftExpr, String rightField)
Builds an expression to sort elements of a ScalarValuedFunction as specified by a field.static ScalarValuedFunction
listSort(String leftField, ScalarValuedFunction rightExpr)
Builds an expression to sort elements of a field as specified by a ScalarValuedFunction.static ScalarValuedFunction
listSort(String leftField, String rightField)
Builds an expression to sort elements of a field as specified by the other.static ScalarValuedFunction
listSort(List<Object> leftValue, ScalarValuedFunction rightExpr)
Builds an expression to sort elements of a constant as specified by a ScalarValuedFunction.static ScalarValuedFunction
listSort(List<Object> leftValue, String rightField)
Builds an expression to sort elements of a constant as specified by the other.static ScalarValuedFunction
listToString(ScalarValuedFunction expr)
Builds an expression to get the string representation of a ScalarValuedFunction.static ScalarValuedFunction
listToString(String field)
Builds an expression to get the string representation of a specified field.static ScalarValuedFunction
subList(ScalarValuedFunction expr, int fromIndexValue, int toIndexValue)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive.static ScalarValuedFunction
subList(ScalarValuedFunction expr, ScalarValuedFunction fromIndexExpr, ScalarValuedFunction toIndexExpr)
Builds an expression finding a view of the portion of a ScalarValuedFunction between the specified fromIndex, inclusive, and toIndex, exclusive.static ScalarValuedFunction
subList(ScalarValuedFunction expr, String fromIndexField, String toIndexField)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive.static ScalarValuedFunction
subList(String field, int fromIndexValue, int toIndexValue)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive.static ScalarValuedFunction
subList(String field, ScalarValuedFunction fromIndexExpr, ScalarValuedFunction toIndexExpr)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive.static ScalarValuedFunction
subList(String field, String fromIndexField, String toIndexField)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive.static ScalarValuedFunction
subList(List<Object> value, ScalarValuedFunction fromIndexExpr, ScalarValuedFunction toIndexExpr)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive.static ScalarValuedFunction
subList(List<Object> value, String fromIndexField, String toIndexField)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive.
-
-
-
Method Detail
-
listConcat
public static ScalarValuedFunction listConcat(String leftField, String rightField)
Builds an expression concatenating the values of the two specified fields. The specified fields must be of type ObjectThe result type is Object If both values are null
, the result isnull
.- Parameters:
leftField
- the record field value on the left side of concatenationrightField
- the record field value on the right side of concatenation- Returns:
- a function evaluating the expression
-
listConcat
public static ScalarValuedFunction listConcat(String leftField, List<Object> rightValue)
Builds an expression concatenating a constant to the value of the specified field. The specified fields must be of type ObjectThe result type is Object If both values are null
, the result isnull
.- Parameters:
leftField
- the record field value on the left side of concatenationrightValue
- the constant value on the right side of concatenation- Returns:
- a function evaluating the expression
-
listConcat
public static ScalarValuedFunction listConcat(String leftField, ScalarValuedFunction rightExpr)
Builds an expression concatenating the value of a specified field and subexpression. The specified field and subexpression must be of type ObjectThe result type is Object If both values are null
, the result isnull
.- Parameters:
leftField
- the record field value on the left side of concatenationrightExpr
- an expression on the right side of concatenation- Returns:
- a function evaluating the expression
-
listConcat
public static ScalarValuedFunction listConcat(List<Object> leftValue, String rightField)
Builds an expression concatenating a constant to the value of the specified field. The specified field and subexpression must be of type ObjectThe result type is Object If both values are null
, the result isnull
.- Parameters:
leftValue
- the constant value on the left side of concatenationrightField
- the record field value on the right side of concatenation- Returns:
- a function evaluating the expression
-
listConcat
public static ScalarValuedFunction listConcat(List<Object> leftValue, ScalarValuedFunction rightExpr)
Builds an expression concatenating a the value of the specified field and subexpression. The specified field and subexpression must be of type ObjectThe result type is Object If both values are null
, the result isnull
.- Parameters:
leftValue
- the constant value on the left side of concatenationrightExpr
- an expression on the right side of concatenation- Returns:
- a function evaluating the expression
-
listConcat
public static ScalarValuedFunction listConcat(ScalarValuedFunction leftExpr, String rightField)
Builds an expression concatenating a the value of the specified field and subexpression. The specified field and subexpression must be of type ObjectThe result type is Object If both values are null
, the result isnull
.- Parameters:
leftExpr
- an expression on the left side of concatenationrightField
- the record field value on the right side of concatenation- Returns:
- a function evaluating the expression
-
listConcat
public static ScalarValuedFunction listConcat(ScalarValuedFunction leftExpr, List<Object> rightValue)
Builds an expression concatenating a constant to the value of the specified subexpression. The specified field and subexpression must be of type ObjectThe result type is Object If both evaluate to null
, the result isnull
.- Parameters:
leftExpr
- an expression on the left side of concatenationrightValue
- the constant value on the right side of concatenation- Returns:
- a function evaluating the expression
-
listConcat
public static ScalarValuedFunction listConcat(ScalarValuedFunction leftExpr, ScalarValuedFunction rightExpr)
Builds an expression concatenating the values of the two specified subexpressions. The specified field and subexpression must be of type ObjectThe result will be of type Object If both expressions evaluate to null
, the result isnull
.- Parameters:
leftExpr
- an expression on the left side of concatenationrightExpr
- an expression on the right side of concatenation- Returns:
- a function evaluating the expression
-
listGet
public static ScalarValuedFunction listGet(String leftField, String rightField)
Builds an expression to get the value at a particular index from specified field. The specified field must be of type ObjectThe result will be of type Object. If the field value is null
, the result isnull
.- Parameters:
leftField
- the record field value on the left side of listGetrightField
- the record field value on the right side of listGet- Returns:
- a function evaluating the expression
-
listGet
public static ScalarValuedFunction listGet(String leftField, int rightValue)
Builds an expression to get the value at a particular index from specified field. The specified field must be of type ObjectThe result will be of type Object. If the field value is null
, the result isnull
.- Parameters:
leftField
- the record field value on the left side of listGetrightValue
- the constant value on the right side of listGet- Returns:
- a function evaluating the expression
-
listGet
public static ScalarValuedFunction listGet(String leftField, ScalarValuedFunction rightExpr)
Builds an expression to get the value at a particular index from specified field. The specified field must be of type ObjectThe result will be of type Object. If the field value is null
, the result isnull
.- Parameters:
leftField
- the record field value on the left side of listGetrightExpr
- an expression on the right side of listGet- Returns:
- a function evaluating the expression
-
listGet
public static ScalarValuedFunction listGet(List<Object> leftValue, String rightField)
Builds an expression to get the value at a particular index from specified field. The specified field must be of type ObjectThe result will be of type Object. If the field value is null
, the result isnull
.- Parameters:
leftValue
- the constant value on the left side of listGetrightField
- the record field value on the right side of listGet- Returns:
- a function evaluating the expression
-
listGet
public static ScalarValuedFunction listGet(List<Object> leftValue, ScalarValuedFunction rightExpr)
Builds an expression to get the value at a particular index from specified field. The specified field must be of type ObjectThe result will be of type Object. If the field value is null
, the result isnull
.- Parameters:
leftValue
- the constant value on the left side of listGetrightExpr
- an expression on the right side of listGet- Returns:
- a function evaluating the expression
-
listGet
public static ScalarValuedFunction listGet(ScalarValuedFunction leftExpr, String rightField)
Builds an expression to get the value at a particular index from specified field. The specified field must be of type ObjectThe result will be of type Object. If the field value is null
, the result isnull
.- Parameters:
leftExpr
- an expression on the left side of listGetrightField
- the record field value on the right side of listGet- Returns:
- a function evaluating the expression
-
listGet
public static ScalarValuedFunction listGet(ScalarValuedFunction leftExpr, int rightValue)
Builds an expression to get the value at a particular index from specified field. The specified field must be of type ObjectThe result will be of type Object. If the field value is null
, the result isnull
.- Parameters:
leftExpr
- an expression on the left side of listGetrightValue
- the constant value on the right side of listGet- Returns:
- a function evaluating the expression
-
listGet
public static ScalarValuedFunction listGet(ScalarValuedFunction leftExpr, ScalarValuedFunction rightExpr)
Builds an expression to get the value at a particular index from specified expression. The specified expression must evaluate to ObjectThe result will be of type Object. If an expression evaluates to null
, the result isnull
.- Parameters:
leftExpr
- an expression on the left side of listGetrightExpr
- an expression on the right side of listGet- Returns:
- a function evaluating the expression
-
listSize
public static ScalarValuedFunction listSize(String field)
Builds an expression to get the number of elements in specified field. The specified field must be of type ObjectThe result will be of type integer. If the field value is null
, the result isnull
.- Parameters:
field
- the record field value- Returns:
- a function evaluating the expression
-
listSize
public static ScalarValuedFunction listSize(ScalarValuedFunction expr)
Builds an expression to get the number of elements in specified ScalarValuedFunction expression. The specified expression must evaluate to ObjectThe result will be of type integer. If an expression evaluates to null
, the result isnull
.- Parameters:
expr
- the ScalarValuedFunction expression- Returns:
- a function evaluating the expression
-
listToString
public static ScalarValuedFunction listToString(String field)
Builds an expression to get the string representation of a specified field. The specified field must be of type ObjectThe result will be of type String. If the field value is null
, the result isnull
.- Parameters:
field
- the record field value- Returns:
- a function evaluating the expression
-
listToString
public static ScalarValuedFunction listToString(ScalarValuedFunction expr)
Builds an expression to get the string representation of a ScalarValuedFunction. The specified expression must evaluate to ObjectThe result will be of type String. If an expression evaluates to null
, the result isnull
.- Parameters:
expr
- the ScalarValuedFunction expression- Returns:
- a function evaluating the expression
-
listContains
public static ScalarValuedFunction listContains(String leftField, String rightField)
Builds an expression to check if a field contains a value specified by the other field. Left operand must be of type Objectand right operand must be a contained value. The result type is BOOLEAN. If an expression representing a list evaluates to null
, the result isnull
.- Parameters:
leftField
- the record field value on the left side of listContainsrightField
- the record field value on the right side of listContains- Returns:
- a function evaluating the expression
-
listContains
public static ScalarValuedFunction listContains(String field, List<Object> value)
Builds an expression to check if a field contains a value specified by an expression. Left operand must be of type Objectand right operand must be a contained value. The result type is BOOLEAN. If an expression representing a list evaluates to null
, the result isnull
.- Parameters:
field
- the record field value on the left side of listContainsvalue
- the constant value on the right side of listContains- Returns:
- a function evaluating the expression
-
listContains
public static ScalarValuedFunction listContains(String leftField, ScalarValuedFunction rightExpr)
Builds an expression to check if a field contains a value specified by an expression. Left operand must be of type Objectand right operand must be a contained value. The result type is BOOLEAN. If an expression representing a list evaluates to null
, the result isnull
.- Parameters:
leftField
- the record field value on the left side of listContainsrightExpr
- an expression on the right side of listContains- Returns:
- a function evaluating the expression
-
listContains
public static ScalarValuedFunction listContains(List<Object> leftValue, String rightField)
Builds an expression to check if a constant contains a value specified by other field. Left operand must be of type Objectand right operand must be a contained value. The result type is BOOLEAN. If an expression representing a list evaluates to null
, the result isnull
.- Parameters:
leftValue
- the constant value on the left side of listContainsrightField
- the record field value on the right side of listContains- Returns:
- a function evaluating the expression
-
listContains
public static ScalarValuedFunction listContains(List<Object> leftValue, ScalarValuedFunction rightExpr)
Builds an expression to check if a constant contains a value specified by an expression. Left operand must be of type Objectand right operand must be a contained value. The result type is BOOLEAN. If an expression representing a list evaluates to null
, the result isnull
.- Parameters:
leftValue
- the constant value on the left side of listContainsrightExpr
- an expression on the right side of listContains- Returns:
- a function evaluating the expression
-
listContains
public static ScalarValuedFunction listContains(ScalarValuedFunction leftExpr, String rightField)
Builds an expression to check if an expression contains a value specified by a field. Left operand must be of type Objectand right operand must be a contained value. The result type is BOOLEAN. If an expression representing a list evaluates to null
, the result isnull
.- Parameters:
leftExpr
- an expression on the left side of listContainsrightField
- the record field value on the right side of listContains- Returns:
- a function evaluating the expression
-
listContains
public static ScalarValuedFunction listContains(ScalarValuedFunction expr, List<Object> value)
Builds an expression to check if an expression contains a value specified by a field. Left operand must be of type Objectand right operand must be a contained value. The result type is BOOLEAN. If an expression representing a list evaluates to null
, the result isnull
.- Parameters:
expr
- an expression on the left side of listContainsvalue
- the constant value on the right side of listContains- Returns:
- a function evaluating the expression
-
listContains
public static ScalarValuedFunction listContains(ScalarValuedFunction leftExpr, ScalarValuedFunction rightExpr)
Builds an expression to check if an expression contains a value specified by a ScalarValuedFunction. Left operand must be of type Objectand right operand must be a contained value. The result type is BOOLEAN. If an expression representing a list evaluates to null
, the result isnull
.- Parameters:
leftExpr
- an expression on the left side of listContainsrightExpr
- an expression on the right side of listContains- Returns:
- a function evaluating the expression
-
listContainsAll
public static ScalarValuedFunction listContainsAll(String leftField, String rightField)
Builds an expression to check if a field contains a value specified by the other field. Both operands must be of type Object. The result type is BOOLEAN. If the field representing a list is null
, the result isnull
.- Parameters:
leftField
- the record field value on the left side of listContainsAllrightField
- the record field value on the right side of listContainsAll- Returns:
- a function evaluating the expression
-
listContainsAll
public static ScalarValuedFunction listContainsAll(String field, List<Object> value)
Builds an expression to check if a field contains a value specified by an expression. Both operands must be of type Object. The result type is BOOLEAN. If the field representing a list is null
, the result isnull
.- Parameters:
field
- the record field value on the left side of listContainsAllvalue
- the constant value on the right side of listContainsAll- Returns:
- a function evaluating the expression
-
listContainsAll
public static ScalarValuedFunction listContainsAll(String leftField, ScalarValuedFunction rightExpr)
Builds an expression to check if a field contains a value specified by an expression. Both operands must be of type Object. The result type is BOOLEAN. If the field representing a list is null
, the result isnull
.- Parameters:
leftField
- the record field value on the left side of listContainsAllrightExpr
- an expression on the right side of listContainsAll- Returns:
- a function evaluating the expression
-
listContainsAll
public static ScalarValuedFunction listContainsAll(List<Object> leftValue, String rightField)
Builds an expression to check if a constant contains a value specified by other field. Both operands must be of type Object. The result type is BOOLEAN. If the constant representing a list is null
, the result isnull
.- Parameters:
leftValue
- the constant value on the left side of listContainsAllrightField
- the record field value on the right side of listContainsAll- Returns:
- a function evaluating the expression
-
listContainsAll
public static ScalarValuedFunction listContainsAll(List<Object> leftValue, ScalarValuedFunction rightExpr)
Builds an expression to check if a constant contains a value specified by an expression. Both operands must be of type Object. The result type is BOOLEAN. If the constant representing a list is null
, the result isnull
.- Parameters:
leftValue
- the constant value on the left side of listContainsAllrightExpr
- an expression on the right side of listContainsAll- Returns:
- a function evaluating the expression
-
listContainsAll
public static ScalarValuedFunction listContainsAll(ScalarValuedFunction leftExpr, String rightField)
Builds an expression to check if an expression contains a value specified by a field. Both operands must be of type Object. The result type is BOOLEAN. If an expression representing a list evaluates to null
, the result isnull
.- Parameters:
leftExpr
- an expression on the left side of listContainsAllrightField
- the record field value on the right side of listContainsAll- Returns:
- a function evaluating the expression
-
listContainsAll
public static ScalarValuedFunction listContainsAll(ScalarValuedFunction expr, List<Object> value)
Builds an expression to check if an expression contains a value specified by a field. Both operands must be of type Object. The result type is BOOLEAN. If an expression representing a list evaluates to null
, the result isnull
.- Parameters:
expr
- an expression on the left side of listContainsAllvalue
- the constant value on the right side of listContainsAll- Returns:
- a function evaluating the expression
-
listContainsAll
public static ScalarValuedFunction listContainsAll(ScalarValuedFunction leftExpr, ScalarValuedFunction rightExpr)
Builds an expression to check if an expression contains a value specified by a ScalarValuedFunction. Both operands must be of type Object. The result type is BOOLEAN. If an expression representing a list evaluates to null
, the result isnull
.- Parameters:
leftExpr
- an expression on the left side of listContainsAllrightExpr
- an expression on the right side of listContainsAll- Returns:
- a function evaluating the expression
-
listDistinct
public static ScalarValuedFunction listDistinct(String field)
Builds an expression to get distinct set of elements from a specified field. The specified field must be of type ObjectThe result will be of type Object If the field is null
, the result isnull
.- Parameters:
field
- the record field value- Returns:
- a function evaluating the expression
-
listDistinct
public static ScalarValuedFunction listDistinct(ScalarValuedFunction expr)
Builds an expression to get distinct set of elements from a ScalarValuedFunction. The specified expression must evaluate to ObjectThe result will be of type Object If an expression evaluates to null
, the result isnull
.- Parameters:
expr
- the ScalarValuedFunction expression- Returns:
- a function evaluating the expression
-
listReverse
public static ScalarValuedFunction listReverse(String field)
Builds an expression to reverse the order of the elements in the specified field. The specified field must be of type ObjectThe result will be of type Object If the field is null
, the result isnull
.- Parameters:
field
- the record field value- Returns:
- a function evaluating the expression
-
listReverse
public static ScalarValuedFunction listReverse(ScalarValuedFunction expr)
Builds an expression to reverse the order of the elements in the specified expression. The specified expression must evaluate to ObjectThe result will be of type Object If an expression evaluates to null
, the result isnull
.- Parameters:
expr
- the ScalarValuedFunction expression- Returns:
- a function evaluating the expression
-
listSort
public static ScalarValuedFunction listSort(String leftField, String rightField)
Builds an expression to sort elements of a field as specified by the other. Operands must be of type Objectand String respectively. The result is of type Object If the field representing a list is null
, the result isnull
. If the field for sort order isnull
, elements are sorted in ASCENDING order.- Parameters:
leftField
- the record field value on the left side of sortrightField
- the record field value on the right side of sort- Returns:
- a function evaluating the expression
-
listSort
public static ScalarValuedFunction listSort(String leftField, ScalarValuedFunction rightExpr)
Builds an expression to sort elements of a field as specified by a ScalarValuedFunction. Operands must evaluate to Objectand String respectively. The result is of type Object If the field representing a list is null
, the result isnull
. If an expression for sort order evaluates tonull
, elements are sorted in ASCENDING order.- Parameters:
leftField
- the record field value on the left side of sortrightExpr
- the ScalarValuedFunction expression on the right side of sort- Returns:
- a function evaluating the expression
-
listSort
public static ScalarValuedFunction listSort(List<Object> leftValue, String rightField)
Builds an expression to sort elements of a constant as specified by the other. Operands must be of type Objectand String respectively. The result is of type Object If the constant representing a list evaluates to null
, the result isnull
. If the field for sort order isnull
, elements are sorted in ASCENDING order.- Parameters:
leftValue
- the constant value on the left side of sortrightField
- the record field value on the right side of sort- Returns:
- a function evaluating the expression
-
listSort
public static ScalarValuedFunction listSort(List<Object> leftValue, ScalarValuedFunction rightExpr)
Builds an expression to sort elements of a constant as specified by a ScalarValuedFunction. Operands must be of type Objectand String respectively. The result is of type Object If the constant representing a list evaluates to null
, the result isnull
. If an expression for sort order isnull
, elements are sorted in ASCENDING order.- Parameters:
leftValue
- the constant value on the left side of sortrightExpr
- the ScalarValuedFunction expression on the right side of sort- Returns:
- a function evaluating the expression
-
listSort
public static ScalarValuedFunction listSort(ScalarValuedFunction leftExpr, String rightField)
Builds an expression to sort elements of a ScalarValuedFunction as specified by a field. Operands must evaluate to Objectand String respectively. The result is of type Object If an expression representing a list evaluates to null
, the result isnull
. If the field for sort order isnull
, elements are sorted in ASCENDING order.- Parameters:
leftExpr
- the ScalarValuedFunction expression on the left side of sortrightField
- the record field value on the right side of sort- Returns:
- a function evaluating the expression
-
listSort
public static ScalarValuedFunction listSort(ScalarValuedFunction leftExpr, ScalarValuedFunction rightExpr)
Builds an expression to sort elements of a ScalarValuedFunction as specified by the other. Operands must evaluate to Objectand String respectively. The result is of type Object If an expression representing a list evaluates to null
, the result isnull
. If an expression for sort order isnull
, elements are sorted in ASCENDING order.- Parameters:
leftExpr
- the ScalarValuedFunction on the left side of sortrightExpr
- the ScalarValuedFunction on the right side of sort- Returns:
- a function evaluating the expression
-
subList
public static ScalarValuedFunction subList(String field, String fromIndexField, String toIndexField)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive. Operands must be of type Object, integer and integer respectively. The result is of type Object If the field representing a list is null
, the result isnull
. fromIndex and toIndex should never be null.- Parameters:
field
- the record field valuefromIndexField
- the record field value representing low endpoint (inclusive) of the subListtoIndexField
- the record field value representing high endpoint (exclusive) of the subList- Returns:
- a function evaluating the expression
-
subList
public static ScalarValuedFunction subList(String field, int fromIndexValue, int toIndexValue)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive. Operands must be of type Object, integer and integer respectively. The result is of type Object If the field representing a list is null
, the result isnull
. fromIndex and toIndex should never be null.- Parameters:
field
- the record field valuefromIndexValue
- the constant value representing low endpoint (inclusive) of the subListtoIndexValue
- the constant value representing high endpoint (exclusive) of the subList- Returns:
- a function evaluating the expression
-
subList
public static ScalarValuedFunction subList(String field, ScalarValuedFunction fromIndexExpr, ScalarValuedFunction toIndexExpr)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive. Operands must be of type Object, integer and integer respectively. The result is of type Object If the field representing a list is null
, the result isnull
. fromIndex and toIndex should never be null.- Parameters:
field
- the record field valuefromIndexExpr
- an expression representing low endpoint (inclusive) of the subListtoIndexExpr
- an expression representing high endpoint (exclusive) of the subList- Returns:
- a function evaluating the expression
-
subList
public static ScalarValuedFunction subList(List<Object> value, String fromIndexField, String toIndexField)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive. Operands must be of type Object, integer and integer respectively. The result is of type Object If the field representing a list is null
, the result isnull
. fromIndex and toIndex should never be null.- Parameters:
value
- the constant valuefromIndexField
- the record field value representing low endpoint (inclusive) of the subListtoIndexField
- the record field value representing high endpoint (exclusive) of the subList- Returns:
- a function evaluating the expression
-
subList
public static ScalarValuedFunction subList(List<Object> value, ScalarValuedFunction fromIndexExpr, ScalarValuedFunction toIndexExpr)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive. Operands must be of type Object, integer and integer respectively. The result is of type Object If the field representing a list is null
, the result isnull
. fromIndex and toIndex should never be null.- Parameters:
value
- the constant valuefromIndexExpr
- an expression representing low endpoint (inclusive) of the subListtoIndexExpr
- an expression representing high endpoint (exclusive) of the subList- Returns:
- a function evaluating the expression
-
subList
public static ScalarValuedFunction subList(ScalarValuedFunction expr, String fromIndexField, String toIndexField)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive. Operands must be of type Object, integer and integer respectively. The result is of type Object If the field representing a list is null
, the result isnull
. fromIndex and toIndex should never be null.- Parameters:
expr
- a ScalarValuedFunction expressionfromIndexField
- the record field value representing low endpoint (inclusive) of the subListtoIndexField
- the record field value representing high endpoint (exclusive) of the subList- Returns:
- a function evaluating the expression
-
subList
public static ScalarValuedFunction subList(ScalarValuedFunction expr, int fromIndexValue, int toIndexValue)
Builds an expression finding a view of the portion of the field between the specified fromIndex, inclusive, and toIndex, exclusive. Operands must be of type Object, integer and integer respectively. The result is of type Object If the field representing a list is null
, the result isnull
. fromIndex and toIndex should never be null.- Parameters:
expr
- a ScalarValuedFunction expressionfromIndexValue
- the constant value representing low endpoint (inclusive) of the subListtoIndexValue
- the constant value representing high endpoint (exclusive) of the subList- Returns:
- a function evaluating the expression
-
subList
public static ScalarValuedFunction subList(ScalarValuedFunction expr, ScalarValuedFunction fromIndexExpr, ScalarValuedFunction toIndexExpr)
Builds an expression finding a view of the portion of a ScalarValuedFunction between the specified fromIndex, inclusive, and toIndex, exclusive. Operands must evaluate to Object, integer and integer respectively. The result is of type Object If an expression representing a list evaluates to null
, the result isnull
. fromIndex and toIndex should never be null.- Parameters:
expr
- the ScalarValuedFunction expressionfromIndexExpr
- an expression representing low endpoint (inclusive) of the subListtoIndexExpr
- an expression representing high endpoint (exclusive) of the subList- Returns:
- a function evaluating the expression
-
-