- java.lang.Object
-
- com.pervasive.datarush.operators.source.Sequences
-
public final class Sequences extends Object
Contains sequence functions. NOTE: These functions should not be used withinDeriveFields
when running distributed.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ScalarValuedFunction
sequence(ScalarTokenType resultType)
Creates a sequence function that increments the value with each invocation.static ScalarValuedFunction
sequence(ScalarTokenType resultType, BigDecimal startValue, BigDecimal stepSize)
Creates a sequence function that increments the value with each invocation.static ScalarValuedFunction
sequenceDouble(double startValue, double stepSize)
Creates a sequence function that increments/decrements its value by the specified step size with each invocation.static ScalarValuedFunction
sequenceFloat(float startValue, float stepSize)
Creates a sequence function that increments/decrements its value by the specified step size with each invocation.static ScalarValuedFunction
sequenceInteger(int startValue, int stepSize)
Creates a sequence function that increments/decrements its value by the specified step size with each invocation.static ScalarValuedFunction
sequenceLong(long startValue, long stepSize)
Creates a sequence function that increments/decrements its value by the specified step size with each invocation.static ScalarValuedFunction
sequenceMoney(BigDecimal startValue, BigDecimal stepSize)
Creates a sequence function that increments/decrements its value by the specified step size with each invocation.static ScalarValuedFunction
sequenceNumeric(BigDecimal startValue, BigDecimal stepSize)
Creates a sequence function that increments/decrements its value by the specified step size with each invocation.
-
-
-
Method Detail
-
sequence
public static ScalarValuedFunction sequence(ScalarTokenType resultType)
Creates a sequence function that increments the value with each invocation. The sequence starts at one and is incremented by one each time. NOTE: this function should not be used withinDeriveFields
when running distributed. You must disable distribution ofDeriveFields
; otherwise each partition will see the same sequence.- Parameters:
resultType
- the type of the value to produce- Returns:
- a sequence function that increments the value with each invocation
-
sequence
public static ScalarValuedFunction sequence(ScalarTokenType resultType, BigDecimal startValue, BigDecimal stepSize)
Creates a sequence function that increments the value with each invocation. The sequence starts at one and is incremented by one each time. NOTE: this function should not be used withinDeriveFields
when running distributed. You must disable distribution ofDeriveFields
; otherwise each partition will see the same sequence.- Parameters:
resultType
- the type of the value to producestartValue
- the initial value to returnstepSize
- the step size- Returns:
- a sequence function that increments the value with each invocation
-
sequenceInteger
public static ScalarValuedFunction sequenceInteger(int startValue, int stepSize)
Creates a sequence function that increments/decrements its value by the specified step size with each invocation. NOTE: this function should not be used withinDeriveFields
when running distributed. You must disable distribution ofDeriveFields
; otherwise each partition will see the same sequence.- Parameters:
startValue
- the initial value to returnstepSize
- the step size- Returns:
- a sequence function that increments/decrements its value by the specified step size with each invocation
-
sequenceLong
public static ScalarValuedFunction sequenceLong(long startValue, long stepSize)
Creates a sequence function that increments/decrements its value by the specified step size with each invocation. NOTE: this function should not be used withinDeriveFields
when running distributed. You must disable distribution ofDeriveFields
; otherwise each partition will see the same sequence.- Parameters:
startValue
- the initial value to returnstepSize
- the step size- Returns:
- a sequence function that increments/decrements its value by the specified step size with each invocation
-
sequenceFloat
public static ScalarValuedFunction sequenceFloat(float startValue, float stepSize)
Creates a sequence function that increments/decrements its value by the specified step size with each invocation. NOTE: this function should not be used withinDeriveFields
when running distributed. You must disable distribution ofDeriveFields
; otherwise each partition will see the same sequence.- Parameters:
startValue
- the initial value to returnstepSize
- the step size- Returns:
- a sequence function that increments/decrements its value by the specified step size with each invocation
-
sequenceDouble
public static ScalarValuedFunction sequenceDouble(double startValue, double stepSize)
Creates a sequence function that increments/decrements its value by the specified step size with each invocation. NOTE: this function should not be used withinDeriveFields
when running distributed. You must disable distribution ofDeriveFields
; otherwise each partition will see the same sequence.- Parameters:
startValue
- the initial value to returnstepSize
- the step size- Returns:
- a sequence function that increments/decrements its value by the specified step size with each invocation
-
sequenceNumeric
public static ScalarValuedFunction sequenceNumeric(BigDecimal startValue, BigDecimal stepSize)
Creates a sequence function that increments/decrements its value by the specified step size with each invocation. NOTE: this function should not be used withinDeriveFields
when running distributed. You must disable distribution ofDeriveFields
; otherwise each partition will see the same sequence.- Parameters:
startValue
- the initial value to returnstepSize
- the step size- Returns:
- a sequence function that increments/decrements its value by the specified step size with each invocation
-
sequenceMoney
public static ScalarValuedFunction sequenceMoney(BigDecimal startValue, BigDecimal stepSize)
Creates a sequence function that increments/decrements its value by the specified step size with each invocation. NOTE: this function should not be used withinDeriveFields
when running distributed. You must disable distribution ofDeriveFields
; otherwise each partition will see the same sequence.- Parameters:
startValue
- the initial value to returnstepSize
- the step size- Returns:
- a sequence function that increments/decrements its value by the specified step size with each invocation
-
-