Skip to content

Commit 91be0dc

Browse files
committed
Remove unnecessary import on doctest
1 parent b6466f4 commit 91be0dc

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

python/datafusion/functions.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2658,7 +2658,6 @@ def arrow_cast(expr: Expr, data_type: Expr | str | pa.DataType) -> Expr:
26582658
>>> result.collect_column("c")[0].as_py()
26592659
1.0
26602660
2661-
>>> import pyarrow as pa
26622661
>>> result = df.select(
26632662
... dfn.functions.arrow_cast(
26642663
... dfn.col("a"), data_type=pa.float64()
@@ -2681,7 +2680,6 @@ def arrow_metadata(expr: Expr, key: Expr | str | None = None) -> Expr:
26812680
If called with two arguments, returns the value for the specified metadata key.
26822681
26832682
Examples:
2684-
>>> import pyarrow as pa
26852683
>>> field = pa.field("val", pa.int64(), metadata={"k": "v"})
26862684
>>> schema = pa.schema([field])
26872685
>>> batch = pa.RecordBatch.from_arrays([pa.array([1])], schema=schema)
@@ -2750,7 +2748,6 @@ def union_extract(union_expr: Expr, field_name: Expr | str) -> Expr:
27502748
variant, otherwise returns NULL.
27512749
27522750
Examples:
2753-
>>> import pyarrow as pa
27542751
>>> ctx = dfn.SessionContext()
27552752
>>> types = pa.array([0, 1, 0], type=pa.int8())
27562753
>>> offsets = pa.array([0, 0, 1], type=pa.int32())
@@ -2775,7 +2772,6 @@ def union_tag(union_expr: Expr) -> Expr:
27752772
"""Returns the tag (active field name) of a union type.
27762773
27772774
Examples:
2778-
>>> import pyarrow as pa
27792775
>>> ctx = dfn.SessionContext()
27802776
>>> types = pa.array([0, 1, 0], type=pa.int8())
27812777
>>> offsets = pa.array([0, 0, 1], type=pa.int32())

0 commit comments

Comments
 (0)