Class WindowFunctionNames

java.lang.Object
dev.frostlake.functions.window.WindowFunctionNames

public final class WindowFunctionNames extends Object
The window functions WindowFunctionEvaluator implements itself, i.e. the names that are valid in front of an OVER (...) clause without being registered in the FunctionRegistry scalar / aggregate maps.

This set is load-bearing for dispatch, not documentation: the evaluator rejects any name that is neither declared here nor a registered aggregate before it reaches its switch, so a new case that is not declared here simply does not work. That is what keeps SHOW FUNCTIONS — which enumerates this set through FunctionRegistry.allDispatchableNames() — from drifting away from what the engine can actually run, the drift that left 14 window functions unlisted.

Snowflake lists every one of these in SHOW FUNCTIONS / SHOW BUILTIN FUNCTIONS (SHOW BUILTIN FUNCTIONS LIKE 'ROW_NUMBER' returns one row with is_builtin = 'Y', and the same holds for RANK / DENSE_RANK / LAG / LEAD / FIRST_VALUE / LAST_VALUE / NTILE / PERCENT_RANK / CUME_DIST / RATIO_TO_REPORT / CONDITIONAL_TRUE_EVENT).

  • Method Details

    • handles

      public static boolean handles(String name)
      Whether WindowFunctionEvaluator implements this name itself (case-insensitive).
    • names

      public static SortedSet<String> names()
      Every window-function name the evaluator implements, upper-cased and sorted.