Skip to content

Commit 7175490

Browse files
committed
Merge branch 'main' of github.com:apache/iceberg-python into fd-rename-conf
2 parents 92b5d1e + bfe9991 commit 7175490

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
lines changed

.asf.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ github:
4444
projects: true
4545
collaborators: # Note: the number of collaborators is limited to 10
4646
- ajantha-bhat
47-
- syun64
48-
- kevinjqliu
47+
- ndrluis
4948
ghp_branch: gh-pages
5049
ghp_path: /
5150

dev/provision.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,3 +389,13 @@
389389
VALUES (4)
390390
"""
391391
)
392+
393+
spark.sql(
394+
f"""
395+
CREATE OR REPLACE TABLE {catalog_name}.default.test_empty_scan_ordered_str (id string NOT NULL)
396+
USING iceberg
397+
TBLPROPERTIES ('format-version'='2')
398+
"""
399+
)
400+
spark.sql(f"ALTER TABLE {catalog_name}.default.test_empty_scan_ordered_str WRITE ORDERED BY id")
401+
spark.sql(f"INSERT INTO {catalog_name}.default.test_empty_scan_ordered_str VALUES 'a', 'c'")

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyiceberg/io/pyarrow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@ def schema_partner(self, partner: Optional[pa.Array]) -> Optional[pa.Array]:
15971597
return partner
15981598

15991599
def field_partner(self, partner_struct: Optional[pa.Array], field_id: int, _: str) -> Optional[pa.Array]:
1600-
if partner_struct:
1600+
if partner_struct is not None:
16011601
# use the field name from the file schema
16021602
try:
16031603
name = self.file_schema.find_field(field_id).name

tests/integration/test_reads.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,3 +663,11 @@ def another_task() -> None:
663663

664664
table.transaction().set_properties(lock="xxx").commit_transaction()
665665
assert table.properties.get("lock") == "xxx"
666+
667+
668+
@pytest.mark.integration
669+
@pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive"), pytest.lazy_fixture("session_catalog")])
670+
def test_empty_scan_ordered_str(catalog: Catalog) -> None:
671+
table_empty_scan_ordered_str = catalog.load_table("default.test_empty_scan_ordered_str")
672+
arrow_table = table_empty_scan_ordered_str.scan(EqualTo("id", "b")).to_arrow()
673+
assert len(arrow_table) == 0

0 commit comments

Comments
 (0)