Skip to content

Commit d8ce99c

Browse files
committed
move import
1 parent a58f099 commit d8ce99c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pyiceberg/table/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
manifest_evaluator,
6363
)
6464
from pyiceberg.io import FileIO, load_file_io
65-
from pyiceberg.io.pyarrow import ArrowScan, expression_to_pyarrow, schema_to_pyarrow
6665
from pyiceberg.manifest import (
6766
POSITIONAL_DELETE_SCHEMA,
6867
DataFile,
@@ -1150,6 +1149,7 @@ def upsert(
11501149
Returns:
11511150
An UpsertResult class (contains details of rows updated and inserted)
11521151
"""
1152+
from pyiceberg.io.pyarrow import expression_to_pyarrow
11531153
from pyiceberg.table import upsert_util
11541154

11551155
if join_cols is None:
@@ -1770,7 +1770,7 @@ def to_arrow_batch_reader(self) -> pa.RecordBatchReader:
17701770
"""
17711771
import pyarrow as pa
17721772

1773-
from pyiceberg.io.pyarrow import ArrowScan
1773+
from pyiceberg.io.pyarrow import ArrowScan, schema_to_pyarrow
17741774

17751775
target_schema = schema_to_pyarrow(self.projection())
17761776
batches = ArrowScan(
@@ -1828,6 +1828,8 @@ def to_polars(self) -> pl.DataFrame:
18281828
return result
18291829

18301830
def count(self) -> int:
1831+
from pyiceberg.io.pyarrow import ArrowScan
1832+
18311833
# Usage: Calculates the total number of records in a Scan that haven't had positional deletes.
18321834
res = 0
18331835
# every task is a FileScanTask

0 commit comments

Comments
 (0)