java.lang.Object
com.pervasive.datarush.operators.source.Sequences
Contains sequence functions.
NOTE: These functions should not be used within
DeriveFields when running distributed.-
Method Summary
Modifier and TypeMethodDescriptionstatic ScalarValuedFunctionsequence(ScalarTokenType resultType) Creates a sequence function that increments the value with each invocation.static ScalarValuedFunctionsequence(ScalarTokenType resultType, BigDecimal startValue, BigDecimal stepSize) Creates a sequence function that increments the value with each invocation.static ScalarValuedFunctionsequenceDouble(double startValue, double stepSize) Creates a sequence function that increments/decrements its value by the specified step size with each invocation.static ScalarValuedFunctionsequenceFloat(float startValue, float stepSize) Creates a sequence function that increments/decrements its value by the specified step size with each invocation.static ScalarValuedFunctionsequenceInteger(int startValue, int stepSize) Creates a sequence function that increments/decrements its value by the specified step size with each invocation.static ScalarValuedFunctionsequenceLong(long startValue, long stepSize) Creates a sequence function that increments/decrements its value by the specified step size with each invocation.static ScalarValuedFunctionsequenceMoney(BigDecimal startValue, BigDecimal stepSize) Creates a sequence function that increments/decrements its value by the specified step size with each invocation.static ScalarValuedFunctionsequenceNumeric(BigDecimal startValue, BigDecimal stepSize) Creates a sequence function that increments/decrements its value by the specified step size with each invocation.
-
Method Details
-
sequence
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 withinDeriveFieldswhen 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 withinDeriveFieldswhen 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
Creates a sequence function that increments/decrements its value by the specified step size with each invocation. NOTE: this function should not be used withinDeriveFieldswhen 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
Creates a sequence function that increments/decrements its value by the specified step size with each invocation. NOTE: this function should not be used withinDeriveFieldswhen 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
Creates a sequence function that increments/decrements its value by the specified step size with each invocation. NOTE: this function should not be used withinDeriveFieldswhen 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
Creates a sequence function that increments/decrements its value by the specified step size with each invocation. NOTE: this function should not be used withinDeriveFieldswhen 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
Creates a sequence function that increments/decrements its value by the specified step size with each invocation. NOTE: this function should not be used withinDeriveFieldswhen 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
Creates a sequence function that increments/decrements its value by the specified step size with each invocation. NOTE: this function should not be used withinDeriveFieldswhen 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
-