Class FunctionUtil


  • public class FunctionUtil
    extends Object
    A collection of useful utilities for implementing classes related to functions.
    • Constructor Detail

      • FunctionUtil

        public FunctionUtil()
    • Method Detail

      • widestInputType

        public static ScalarTokenType widestInputType​(FunctionContext ctx)
        Returns the widest input type for all ScalarValuedFunction arguments in the context.
        Parameters:
        ctx - the processing context
        Returns:
        the widest of all the input types. If there is no such type (that is, it is TokenTypeConstant.SCALAR), null is returned.
      • widestInputType

        public static ScalarTokenType widestInputType​(FunctionContext ctx,
                                                      int... indices)
        Returns the widest input type for all specified ScalarValuedFunction arguments in the context.
        Parameters:
        ctx - the processing context
        indices - the arguments to use in the calculation
        Returns:
        the widest of all the specified input types. If there is no such type (that is, it is TokenTypeConstant.SCALAR), null is returned.