Skip to content

OffsetWindowFunction — Unevaluable Window Function Expressions

OffsetWindowFunction is the <> of <> that are unevaluable and ImplicitCastInputTypes.

[[contract]] [source, scala]

package org.apache.spark.sql.catalyst.expressions

abstract class OffsetWindowFunction ... { // only required properties (vals and methods) that have no implementation // the others follow val default: Expression val direction: SortDirection val input: Expression val offset: Expression }

.(Subset of) OffsetWindowFunction Contract [cols="1m,2",options="header",width="100%"] |=== | Property | Description

| default | [[default]]

| direction | [[direction]]

| input | [[input]]

| offset | [[offset]] |===

[[children]] OffsetWindowFunction uses the <>, <> and <> expressions as the children.

[[foldable]] OffsetWindowFunction is not <>.

[[nullable]] OffsetWindowFunction is <> when the <> is not defined or the <> or the <> expressions are.

[[dataType]] When requested for the <>, OffsetWindowFunction simply requests the <> expression for the data type.

[[dataType]] When requested for the <>, OffsetWindowFunction returns the AnyDataType, IntegerType with the data type of the <> expression and the NullType.

[[toString]] OffsetWindowFunction uses the following text representation (i.e. toString):

[prettyName]([input], [offset], [default])

[[extensions]] .OffsetWindowFunctions (Direct Implementations) [cols="1,2",options="header",width="100%"] |=== | OffsetWindowFunction | Description

| Lag | [[Lag]]

| Lead | [[Lead]] |===

=== [[frame]] frame Lazy Property

[source, scala]

frame: WindowFrame

NOTE: frame is part of the <> to define the WindowFrame for function expression execution.


=== [[checkInputDataTypes]] Verifying Input Data Types -- checkInputDataTypes Method

[source, scala]

checkInputDataTypes(): TypeCheckResult

NOTE: checkInputDataTypes is part of the <> to verify (check the correctness of) the input data types.


Last update: 2021-05-20