Skip to content

Commit 224a19f

Browse files
committed
clarify struct results
1 parent c942bf3 commit 224a19f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/datafusion/functions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,6 +1532,10 @@ def struct(*args: Expr) -> Expr:
15321532
... dfn.col("a"), dfn.col("b")
15331533
... ).alias("s")
15341534
... )
1535+
1536+
Children in the new struct will always be `c0`, ..., `cN-1`
1537+
for `N` children.
1538+
15351539
>>> result.collect_column("s")[0].as_py() == {"c0": 1, "c1": 2}
15361540
True
15371541
"""

0 commit comments

Comments
 (0)