Skip to content

[python] Use arrow API to cast python tables before sending to C++#4359

Merged
jp-dark merged 9 commits intomainfrom
dark/python-safe-cast-on-write
Jan 8, 2026
Merged

[python] Use arrow API to cast python tables before sending to C++#4359
jp-dark merged 9 commits intomainfrom
dark/python-safe-cast-on-write

Conversation

@jp-dark
Copy link
Copy Markdown
Collaborator

@jp-dark jp-dark commented Dec 19, 2025

Issue and/or context: Close SOMA-721

Changes:
Use pyarrow API to attempt to cast data before writing with the C++ API.

Still needs the following:
* fix schema names for GeometryDataFrame
* test unsafe casting
Comment thread apis/python/src/tiledbsoma/_geometry_dataframe.py Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 5, 2026

Codecov Report

❌ Patch coverage is 82.85714% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.04%. Comparing base (e7629a2) to head (7d13c83).
⚠️ Report is 51 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4359      +/-   ##
==========================================
+ Coverage   86.66%   89.04%   +2.38%     
==========================================
  Files         139       62      -77     
  Lines       20931     7148   -13783     
  Branches       15        0      -15     
==========================================
- Hits        18139     6365   -11774     
+ Misses       2792      783    -2009     
Flag Coverage Δ
python 89.04% <82.85%> (-0.16%) ⬇️
r ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
python_api 89.04% <82.85%> (-0.16%) ⬇️
libtiledbsoma ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jp-dark jp-dark merged commit a1f6a68 into main Jan 8, 2026
21 of 27 checks passed
@jp-dark jp-dark deleted the dark/python-safe-cast-on-write branch January 8, 2026 15:04
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 8, 2026

The backport to release-2.3 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-2.3 release-2.3
# Navigate to the new working tree
cd .worktrees/backport-release-2.3
# Create a new branch
git switch --create backport-4359-to-release-2.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a1f6a685b4752a7fd67961c2676438a6e625d371
# Push it to GitHub
git push --set-upstream origin backport-4359-to-release-2.3
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-2.3

Then, create a pull request where the base branch is release-2.3 and the compare/head branch is backport-4359-to-release-2.3.

jp-dark added a commit that referenced this pull request Jan 12, 2026
…4359)

* (WIP) Safe-cast pyarrow tables on write

Still needs the following:
* fix schema names for GeometryDataFrame
* test unsafe casting

* Fix casting for geometry dataframe outlines

* Update history

* Switch from deprecated `field_by_name` to `field`

* Update error message and remove unneeded type declaration

* Take tests from PR #4311

Add test for dictionary casting from
#4311

Co-authored-by:  XanthosXanthopoulos <[email protected]>

* Add xfail to uncovered bug

* Remove test that is checking for unsafe cast

* Fix syntax for xfail

---------

Co-authored-by: XanthosXanthopoulos <[email protected]>
(cherry picked from commit a1f6a68)
jp-dark added a commit that referenced this pull request Jan 12, 2026
…4359)

* (WIP) Safe-cast pyarrow tables on write

Still needs the following:
* fix schema names for GeometryDataFrame
* test unsafe casting

* Fix casting for geometry dataframe outlines

* Update history

* Switch from deprecated `field_by_name` to `field`

* Update error message and remove unneeded type declaration

* Take tests from PR #4311

Add test for dictionary casting from
#4311

Co-authored-by:  XanthosXanthopoulos <[email protected]>

* Add xfail to uncovered bug

* Remove test that is checking for unsafe cast

* Fix syntax for xfail

---------

Co-authored-by: XanthosXanthopoulos <[email protected]>
(cherry picked from commit a1f6a68)
jp-dark added a commit that referenced this pull request Jan 13, 2026
…4359) (#4369)

* (WIP) Safe-cast pyarrow tables on write

Still needs the following:
* fix schema names for GeometryDataFrame
* test unsafe casting

* Fix casting for geometry dataframe outlines

* Update history

* Switch from deprecated `field_by_name` to `field`

* Update error message and remove unneeded type declaration

* Take tests from PR #4311

Add test for dictionary casting from
#4311



* Add xfail to uncovered bug

* Remove test that is checking for unsafe cast

* Fix syntax for xfail

---------


(cherry picked from commit a1f6a68)

Co-authored-by: XanthosXanthopoulos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants