-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(rust): Refactor Schema
to use generic struct from new polars-schema
crate
#18539
Conversation
where | ||
D: Clone + Default, | ||
{ | ||
pub fn with_capacity(capacity: usize) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generic functions moved from impl Schema
from polars-core
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #18539 +/- ##
==========================================
- Coverage 79.87% 79.85% -0.02%
==========================================
Files 1501 1502 +1
Lines 201823 201828 +5
Branches 2868 2868
==========================================
- Hits 161200 161178 -22
- Misses 40077 40104 +27
Partials 546 546 ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #18539 will not alter performanceComparing Summary
|
Failing CI is unrelated (uv) Run uv pip install -r py-polars/requirements-dev.txt -r docs/requirements.txt
Resolved 158 packages in 1.39s
error: Failed to prepare distributions
Caused by: Failed to fetch wheel: llvmlite==0.36.0
Caused by: Build backend failed to determine extra requires with `build_wheel()` with exit status: 1
--- stdout:
--- stderr:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/runner/.cache/uv/builds-v0/.tmpLksiJD/lib/python3.[12](https://github.com/pola-rs/polars/actions/runs/10695782907/job/29649770387?pr=18539#step:5:13)/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.cache/uv/builds-v0/.tmpLksiJD/lib/python3.12/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
self.run_setup()
File "/home/runner/.cache/uv/builds-v0/.tmpLksiJD/lib/python3.12/site-packages/setuptools/build_meta.py", line 503, in run_setup
super().run_setup(setup_script=setup_script)
File "/home/runner/.cache/uv/builds-v0/.tmpLksiJD/lib/python3.12/site-packages/setuptools/build_meta.py", line 3[18](https://github.com/pola-rs/polars/actions/runs/10695782907/job/29649770387?pr=18539#step:5:19), in run_setup
exec(code, locals())
File "<string>", line 55, in <module>
File "<string>", line 52, in _guard_py_ver
RuntimeError: Cannot install on Python version 3.12.5; only versions >=3.6,<3.10 are supported. |
The migration of `Schema` into its own crate in pola-rs#18539 change the (internal) field name from `inner` to the more obvious `fields`. This was exposed in the Python IR, so bump the major version.
FromIterator<impl Into<Field>>
polars_schema::Schema
, addFromIterator<impl Into<(PlSmallStr, D)>>
polars_core::Field
, we implInto<(PlSmallStr, D)>
From<&[Series]>
iter().map(|s| (s.name().clone(), s.dtype().clone())
From<&ArrowSchema>
.into()
s withfn Schema::from_arrow_schema