Skip to content

Commit

Permalink
Merge pull request #11241 from rouault/pyarrow_18
Browse files Browse the repository at this point in the history
autotest: fix pyarrow 18 compatibility
  • Loading branch information
rouault authored Nov 10, 2024
2 parents 33ce63d + fbe5743 commit 1f4ec9b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions autotest/ogr/ogr_mem.py
Original file line number Diff line number Diff line change
Expand Up @@ -2872,9 +2872,12 @@ def test_ogr_mem_arrow_json():
lyr.CreateField(field_def)

stream = lyr.GetArrowStreamAsPyArrow()
md = stream.schema["field_json"].metadata
assert b"ARROW:extension:name" in md
assert md[b"ARROW:extension:name"] == b"arrow.json"
field_schema = stream.schema["field_json"]
# Since pyarrow 18, the field type is extension<arrow.json>
if str(field_schema.type) != "extension<arrow.json>":
md = field_schema.metadata
assert b"ARROW:extension:name" in md
assert md[b"ARROW:extension:name"] == b"arrow.json"


###############################################################################
Expand Down

0 comments on commit 1f4ec9b

Please sign in to comment.