JustinBinber opened a new pull request, #1838:
URL: https://github.com/apache/datafusion-python/pull/1838
# Which issue does this PR close?
Closes #1837
# Rationale for this change
`select_exprs()` leaks a native DataFrame instead of returning the public
Python wrapper. A subsequent `filter(col("total") > 6)` or `filter("total >
6")` then raises `TypeError` because the native method expects an internal
expression.
# What changes are included in this PR?
- Wrap the native projection result with `DataFrame(...)`, following sibling
methods.
- Add regression coverage that chains both public-expression and SQL-string
predicates, a public expression projection, sorting and result conversion.
- Add a runnable `select_exprs` docstring example.
Validation:
- Before the fix: the two new cases fail with `TypeError`; the existing
arithmetic/collection control passes (**2 failed, 1 passed**).
- After the fix: **3 passed**.
- Related DataFrame tests, DataFrame-module doctests and docstring checks:
**399 passed, 2 skipped** (optional Polars), with **4 unrelated native
interrupt stress cases deselected**.
- Configured pre-commit checks pass for both changed files: Ruff **0.15.1**
lint/format, pinned ty **0.0.84**, and codespell. `git diff --check` passes.
- Validation used current checkout Python sources with the released **55.0.0
native wheel**, reporting engine **55.2.0**, on Windows/Python 3.11.7/PyArrow
26.0.1. Rust was not rebuilt locally.
# Are there any user-facing changes?
`select_exprs()` now returns its documented public `DataFrame`, allowing
normal Python expression and SQL-string query composition. Its signature and
SQL projection semantics are unchanged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]