org.apache.hadoop.hive.ql.exec
Annotation Type WindowFunctionDescription


@Retention(value=RUNTIME)
@Target(value=TYPE)
@Documented
public @interface WindowFunctionDescription


Required Element Summary
 Description description
           
 
Optional Element Summary
 boolean impliesOrder
          Using in analytical functions to specify that UDF implies an ordering
 boolean pivotResult
          A WindowFunc is implemented as GenericUDAFResolver2.
 boolean rankingFunction
          Used in translations process to validate arguments
 boolean supportsWindow
          controls whether this function can be applied to a Window.
 

Element Detail

description

public abstract Description description

supportsWindow

public abstract boolean supportsWindow
controls whether this function can be applied to a Window.

Ranking function: Rank, Dense_Rank, Percent_Rank and Cume_Dist don't operate on Windows. Why? a window specification implies a row specific range i.e. every row gets its own set of rows to process the UDAF on. For ranking defining a set of rows for every row makes no sense.

All other UDAFs can be computed for a Window.

Default:
true

pivotResult

public abstract boolean pivotResult
A WindowFunc is implemented as GenericUDAFResolver2. It returns only one value. If this is true then the function must return a List which is taken to be the column for this function in the Output table returned by the WindowingTableFunction. Otherwise the output is assumed to be a single value, the column of the Output will contain the same value for all the rows.

Default:
false

rankingFunction

public abstract boolean rankingFunction
Used in translations process to validate arguments

Returns:
true if ranking function
Default:
false

impliesOrder

public abstract boolean impliesOrder
Using in analytical functions to specify that UDF implies an ordering

Returns:
true if the function implies order
Default:
false


Copyright © 2014 The Apache Software Foundation. All rights reserved.