Class Sequences


  • public final class Sequences
    extends Object
    Contains sequence functions. NOTE: These functions should not be used within DeriveFields when running distributed.
    • 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 within DeriveFields when running distributed. You must disable distribution of DeriveFields; 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 within DeriveFields when running distributed. You must disable distribution of DeriveFields; otherwise each partition will see the same sequence.

        Parameters:
        resultType - the type of the value to produce
        startValue - the initial value to return
        stepSize - 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 within DeriveFields when running distributed. You must disable distribution of DeriveFields; otherwise each partition will see the same sequence.

        Parameters:
        startValue - the initial value to return
        stepSize - 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 within DeriveFields when running distributed. You must disable distribution of DeriveFields; otherwise each partition will see the same sequence.

        Parameters:
        startValue - the initial value to return
        stepSize - 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 within DeriveFields when running distributed. You must disable distribution of DeriveFields; otherwise each partition will see the same sequence.

        Parameters:
        startValue - the initial value to return
        stepSize - 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 within DeriveFields when running distributed. You must disable distribution of DeriveFields; otherwise each partition will see the same sequence.

        Parameters:
        startValue - the initial value to return
        stepSize - 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 within DeriveFields when running distributed. You must disable distribution of DeriveFields; otherwise each partition will see the same sequence.

        Parameters:
        startValue - the initial value to return
        stepSize - 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 within DeriveFields when running distributed. You must disable distribution of DeriveFields; otherwise each partition will see the same sequence.

        Parameters:
        startValue - the initial value to return
        stepSize - the step size
        Returns:
        a sequence function that increments/decrements its value by the specified step size with each invocation