Skip to content

Commit

Permalink
fix: Import for arrow_orc_datasource
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonLuttenberger committed Jun 14, 2023
1 parent fd051b1 commit 3dd4fa9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from typing import Any, Dict, List, Optional

import pyarrow as pa
from pyarrow import orc
from ray.data.block import BlockAccessor

from awswrangler._arrow import _add_table_partitions, _df_to_table
Expand All @@ -21,6 +20,8 @@ def _read_file( # type: ignore[override]
path_root: str,
**reader_args: Any,
) -> pa.Table:
from pyarrow import orc

columns: Optional[List[str]] = reader_args.get("columns", None)

table: pa.Table = orc.read_table(f, columns=columns)
Expand Down Expand Up @@ -48,6 +49,8 @@ def _write_block( # type: ignore[override]
pandas_kwargs: Optional[Dict[str, Any]],
**writer_args: Any,
) -> None:
from pyarrow import orc

schema: Optional[pa.schema] = writer_args.get("schema", None)
dtype: Optional[Dict[str, str]] = writer_args.get("dtype", None)
index: bool = writer_args.get("index", False)
Expand Down

0 comments on commit 3dd4fa9

Please sign in to comment.