Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix tests
  • Loading branch information
jqin61 committed Apr 5, 2024
commit 46be511f9108d51e088957b2ed2cfb9f99f82a0e
4 changes: 0 additions & 4 deletions pyiceberg/expressions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ def __eq__(self, other: Any) -> bool:
@abstractmethod
def as_unbound(self) -> Type[UnboundPredicate[Any]]: ...


def __hash__(self) -> int:
"""Return hash value of the BoundPredicate class."""
return hash(str(self))
Expand Down Expand Up @@ -393,8 +392,6 @@ def __repr__(self) -> str:
def as_bound(self) -> Type[BoundUnaryPredicate[Any]]: ...




class BoundUnaryPredicate(BoundPredicate[L], ABC):
def __repr__(self) -> str:
"""Return the string representation of the BoundUnaryPredicate class."""
Expand Down Expand Up @@ -751,7 +748,6 @@ def as_unbound(self) -> Type[EqualTo[L]]:
return EqualTo



class BoundNotEqualTo(BoundLiteralPredicate[L]):
def __invert__(self) -> BoundEqualTo[L]:
"""Transform the Expression into its negated version."""
Expand Down
1 change: 0 additions & 1 deletion pyiceberg/io/pyarrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1776,7 +1776,6 @@ def write_parquet(task: WriteTask) -> DataFile:
fo = io.new_output(file_path)
with fo.create(overwrite=True) as fos:
with pq.ParquetWriter(fos, schema=arrow_file_schema, **parquet_writer_kwargs) as writer:
writer.write(pa.Table.from_batches(task.record_batches), row_group_size=row_group_size)
arrow_table = pa.Table.from_batches(task.record_batches)
# align the columns accordingly in case input arrow table has columns in order different from iceberg table
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide an example of when this would happen? This only handles top-level columns.

df_to_write = arrow_table.select(arrow_file_schema.names)
Expand Down
2 changes: 1 addition & 1 deletion tests/table/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import re
import uuid
from copy import copy
from typing import Any, Dict, Set, Union, List
from typing import Any, Dict, List, Union

import pyarrow as pa
import pytest
Expand Down