Skip to content

A window function for tree traversal. #29701

@alexey-milovidov

Description

@alexey-milovidov

Use case

#29693
A table has child -> parent relationship but does not have "top_ancestor" column.
We want to calculate it on the fly.

Describe the solution you'd like

A window function treeTopAncestor(child, parent) collects a tree in memory for every window and then outputs the most reachable ancestor for every row.

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp-window-functionsWindow function execution + frame handling (ROW_NUMBER/RANK/LAG/LEAD, frames, partitions, order).feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions