关注 spark技术分享,
撸spark源码 玩spark最佳实践

WindowSpecDefinition

WindowSpecDefinition Unevaluable Expression

WindowSpecDefinition is an unevaluable expression (i.e. with no support for eval and doGenCode methods).

WindowSpecDefinition is created when:

Table 1. WindowSpecDefinition’s Properties
Name Description

children

Window partition and order specifications (for which WindowExpression was created).

dataType

Unsupported (i.e. reports a UnsupportedOperationException)

foldable

Disabled (i.e. false)

nullable

Enabled (i.e. true)

resolved

Enabled when children are and the input DataType is valid and the input frameSpecification is a SpecifiedWindowFrame.

sql

Contains PARTITION BY with comma-separated elements of partitionSpec (if defined) with ORDER BY with comma-separated elements of orderSpec (if defined) followed by frameSpecification.

Creating WindowSpecDefinition Instance

WindowSpecDefinition takes the following when created:

  • Expressions for window partition specification

  • Window order specifications (as SortOrder unary expressions)

  • Window frame specification (as WindowFrame)

Validating Data Type Of Window Order– isValidFrameType Internal Method

isValidFrameType is positive (true) when the data type of the window order specification and the input ft data type are as follows:

Otherwise, isValidFrameType is negative (false).

Note
isValidFrameType is used exclusively when WindowSpecDefinition is requested to checkInputDataTypes (with RangeFrame as the window frame specification)

Checking Input Data Types — checkInputDataTypes Method

Note
checkInputDataTypes is part of the Expression Contract to checks the input data types.

checkInputDataTypes…​FIXME

赞(0) 打赏
未经允许不得转载:spark技术分享 » WindowSpecDefinition
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏