Bolt Backend Window Function Support

qianmoQqianmoQ· 更新于 2026-10-02· 阅读 4 分钟· 0 次阅读

登录后可跨设备保存划线和私人笔记登录

Window Functions Support Status in Bolt

Spark FunctionsSpark ExpressionsStatusRestrictions
cume_distCumeDistSReturns a DOUBLE cumulative distribution value within the partition.
dense_rankDenseRankSReturns the dense rank within each partition.
lagLagSOffset must be ≥ 0; offset = 0 returns the current row. Optional default value is supported. IGNORE NULLS is supported and lag operates over the whole partition, not limited by frame.
leadLeadSSame rules as lag: offset ≥ 0, offset = 0 returns the current row, optional default value and IGNORE NULLS are supported, operates over the whole partition.
nth_valueNthValueSReturn type matches the value expression. Offset must be ≥ 1 for both constant and column offsets; smaller values are rejected. IGNORE NULLS is supported in the engine for the PrestoSQL mapping.
ntileNTileSNumber of buckets must be > 0; 0 or negative values are rejected. When buckets exceed the partition size, the bucket index effectively follows the row number. If the bucket expression is NULL, the result is NULL.
percent_rankPercentRankSReturns a DOUBLE in \[0, 1], computed as (rank - 1) / (partition_row_count - 1) (0 when there is only one row in the partition).
rankRankSReturns the rank within each partition using standard SQL rank semantics.
row_numberRowNumberSAssigns a sequential row number within each partition.

评论

登录后参与评论

正在加载评论…